JAPAn
Just Another Parity Analyzer
|
Concrete hardware channel for HAPPEX 18-bit ADC modules. More...
#include <QwADC18_Channel.h>
Public Member Functions | |
QwADC18_Channel () | |
QwADC18_Channel (TString name, TString datatosave="raw") | |
QwADC18_Channel (const QwADC18_Channel &value) | |
QwADC18_Channel (const QwADC18_Channel &value, VQwDataElement::EDataToSave datatosave) | |
~QwADC18_Channel () override | |
VQwHardwareChannel * | Clone (VQwDataElement::EDataToSave datatosave) const override |
void | InitializeChannel (TString name, TString datatosave) override |
Initialize the fields in this object. | |
void | InitializeChannel (TString subsystem, TString instrumenttype, TString name, TString datatosave) override |
Initialize the fields in this object. | |
void | LoadChannelParameters (QwParameterFile ¶mfile) override |
void | SetDefaultSampleSize (size_t num_samples_map) |
void | ClearEventData () override |
Clear the event data in this element. | |
void | RandomizeEventData (int helicity=0.0, double time=0.0) override |
Internally generate random event data. | |
void | ForceMapfileSampleSize () |
void | SmearByResolution (double resolution) override |
void | SetEventData (Double_t value) |
void | SetRawEventData () override |
void | EncodeEventData (std::vector< UInt_t > &buffer) override |
Encode the event data into a CODA buffer. | |
Bool_t | IsHeaderWord (UInt_t word) const |
Decode the event data from a CODA buffer. | |
Int_t | ProcessDataWord (UInt_t word) |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) override |
Process the CODA event buffer for this element. | |
void | ProcessEvent () override |
Process the event data according to pedestal and calibration factor. | |
QwADC18_Channel & | operator= (const QwADC18_Channel &value) |
void | AssignScaledValue (const QwADC18_Channel &value, Double_t scale) |
void | AssignValueFrom (const VQwDataElement *valueptr) override |
void | AddValueFrom (const VQwHardwareChannel *valueptr) override |
void | SubtractValueFrom (const VQwHardwareChannel *valueptr) override |
void | MultiplyBy (const VQwHardwareChannel *valueptr) override |
void | DivideBy (const VQwHardwareChannel *valueptr) override |
void | ArcTan (const QwADC18_Channel &value) |
QwADC18_Channel & | operator+= (const QwADC18_Channel &value) |
QwADC18_Channel & | operator-= (const QwADC18_Channel &value) |
QwADC18_Channel & | operator*= (const QwADC18_Channel &value) |
VQwHardwareChannel & | operator+= (const VQwHardwareChannel &input) override |
VQwHardwareChannel & | operator-= (const VQwHardwareChannel &input) override |
VQwHardwareChannel & | operator*= (const VQwHardwareChannel &input) override |
VQwHardwareChannel & | operator/= (const VQwHardwareChannel &input) override |
const QwADC18_Channel | operator+ (const QwADC18_Channel &value) const |
const QwADC18_Channel | operator- (const QwADC18_Channel &value) const |
const QwADC18_Channel | operator* (const QwADC18_Channel &value) const |
void | Sum (const QwADC18_Channel &value1, const QwADC18_Channel &value2) |
void | Difference (const QwADC18_Channel &value1, const QwADC18_Channel &value2) |
void | Ratio (const QwADC18_Channel &numer, const QwADC18_Channel &denom) |
void | Product (const QwADC18_Channel &value1, const QwADC18_Channel &value2) |
void | DivideBy (const QwADC18_Channel &denom) |
void | AddChannelOffset (Double_t Offset) |
void | Scale (Double_t Offset) override |
void | AccumulateRunningSum (const QwADC18_Channel &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) |
void | AccumulateRunningSum (const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override |
void | DeaccumulateRunningSum (const QwADC18_Channel &value, Int_t ErrorMask=0xFFFFFFF) |
void | CalculateRunningAverage () override |
Bool_t | MatchSequenceNumber (size_t seqnum) |
Bool_t | MatchNumberOfSamples (size_t numsamp) |
Bool_t | ApplySingleEventCuts (Double_t LL, Double_t UL) |
Bool_t | ApplySingleEventCuts () override |
void | PrintErrorCounters () const override |
report number of events failed due to HW and event cut failure | |
void | SetADC18SaturationLimt (Double_t sat_volts=8.5) |
Double_t | GetADC18SaturationLimt () |
Int_t | ApplyHWChecks () override |
void | IncrementErrorCounters () override |
Int_t | GetRawValue (size_t element) const override |
Double_t | GetValue (size_t element) const override |
Double_t | GetValueM2 (size_t element) const override |
Double_t | GetValueError (size_t element) const override |
void | ConstructHistograms (TDirectory *folder, TString &prefix) override |
Construct the histograms for this data element. | |
void | FillHistograms () override |
Fill the histograms for this data element. | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override |
void | ConstructBranch (TTree *tree, TString &prefix) override |
void | FillTreeVector (QwRootTreeBranchVector &values) const override |
Double_t | GetAverageVolts () const |
size_t | GetSequenceNumber () const |
size_t | GetNumberOfSamples () const |
void | SetCalibrationToVolts () |
void | PrintValue () const override |
Print single line of value and error of this data element. | |
void | PrintInfo () const override |
Print multiple lines of information about this data element. | |
void | Blind (const QwBlinder *blinder) |
Blind this channel as an asymmetry. | |
void | Blind (const QwBlinder *blinder, const QwADC18_Channel &yield) |
Blind this channel as a difference. | |
void | ScaledAdd (Double_t scale, const VQwHardwareChannel *value) override |
virtual void | LoadMockDataParameters (QwParameterFile ¶mfile) |
Load the mock data parameters from the current line in the param file. | |
Int_t | GetRawValue () const |
Double_t | GetValue () const |
Double_t | GetValueM2 () const |
Double_t | GetValueError () const |
Double_t | GetValueWidth () const |
Double_t | GetValueWidth (size_t element) const |
virtual void | DeaccumulateRunningSum (const VQwHardwareChannel *value, Int_t ErrorMask=0xFFFFFFF) |
virtual VQwHardwareChannel * | Clone () const |
![]() | |
VQwHardwareChannel () | |
VQwHardwareChannel (const VQwHardwareChannel &value) | |
VQwHardwareChannel (const VQwHardwareChannel &value, VQwDataElement::EDataToSave datatosave) | |
~VQwHardwareChannel () override | |
void | CopyFrom (const VQwHardwareChannel &value) |
void | ProcessOptions () |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. | |
size_t | GetNumberOfSubelements () |
Get the number of subelements in this data element. | |
Int_t | GetRawValue () const |
Double_t | GetValue () const |
Double_t | GetValueM2 () const |
Double_t | GetValueError () const |
Double_t | GetValueWidth () const |
Double_t | GetValueWidth (size_t element) const |
void | ClearEventData () override |
Clear the event data in this element. | |
void | InitializeChannel (TString name) |
Initialize the fields in this object. | |
void | SetEventCutMode (Int_t bcuts) |
virtual Bool_t | CheckForBurpFail (const VQwHardwareChannel *event) |
void | SetSingleEventCuts (Double_t min, Double_t max) |
Set the upper and lower limits (fULimit and fLLimit) for this channel. | |
void | SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability=-1.0, Double_t BurpLevel=-1.0) |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. | |
Double_t | GetEventCutUpperLimit () const |
Double_t | GetEventCutLowerLimit () const |
Double_t | GetStabilityLimit () const |
UInt_t | UpdateErrorFlag () override |
Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag". | |
void | UpdateErrorFlag (const VQwHardwareChannel &elem) |
virtual UInt_t | GetErrorCode () const |
VQwHardwareChannel & | operator= (const VQwHardwareChannel &value) |
Arithmetic assignment operator: Should only copy event-based data. | |
void | AssignScaledValue (const VQwHardwareChannel &value, Double_t scale) |
virtual void | Ratio (const VQwHardwareChannel *numer, const VQwHardwareChannel *denom) |
void | SetPedestal (Double_t ped) |
Double_t | GetPedestal () const |
void | SetCalibrationFactor (Double_t factor) |
Double_t | GetCalibrationFactor () const |
void | AddEntriesToList (std::vector< QwDBInterface > &row_list) |
virtual void | AddErrEntriesToList (std::vector< QwErrDBInterface > &) |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) |
virtual void | CopyParameters (const VQwHardwareChannel *) |
void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
VQwDataElement () | |
Default constructor. | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. | |
~VQwDataElement () override | |
Virtual destructor. | |
void | CopyFrom (const VQwDataElement &value) |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? | |
void | SetElementName (const TString &name) |
Set the name of this element. | |
virtual const TString & | GetElementName () const |
Get the name of this element. | |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. | |
UInt_t | GetGoodEventCount () const |
VQwDataElement & | operator+= (const VQwDataElement &) |
Addition-assignment operator. | |
VQwDataElement & | operator-= (const VQwDataElement &) |
Subtraction-assignment operator. | |
void | Sum (const VQwDataElement &, const VQwDataElement &) |
Sum operator (base class fallback throws runtime error) | |
void | Difference (const VQwDataElement &, const VQwDataElement &) |
Difference operator (base class fallback throws runtime error) | |
void | Ratio (const VQwDataElement &, const VQwDataElement &) |
Ratio operator (base class fallback throws runtime error) | |
void | SetSingleEventCuts (UInt_t, Double_t, Double_t, Double_t) |
set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel | |
Bool_t | CheckForBurpFail (const VQwDataElement *) |
virtual UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device | |
virtual void | SetNeedsExternalClock (Bool_t) |
virtual Bool_t | NeedsExternalClock () |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *) |
virtual void | SetExternalClockName (const std::string) |
virtual Double_t | GetNormClockValue () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. | |
TString | GetModuleType () const |
Return the type of the beam instrument. | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. | |
![]() | |
MQwMockable () | |
virtual | ~MQwMockable () |
void | SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Set a single set of harmonic drift parameters. | |
void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Add drift parameters to the internal set. | |
void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
Set the normal random event parameters. | |
void | SetRandomEventAsymmetry (Double_t asymmetry) |
Set the helicity asymmetry. | |
Double_t | GetRandomValue () |
void | UseExternalRandomVariable () |
Set the flag to use an externally provided random variable. | |
void | SetExternalRandomVariable (Double_t random_variable) |
Set the externally provided random variable. | |
void | SetMockDataAsDiff () |
Static Public Member Functions | |
static Int_t | GetBufferOffset (Int_t moduleindex, Int_t channelindex) |
static void | PrintErrorCounterHead () |
static void | PrintErrorCounterTail () |
static void | SetBurpHoldoff (Int_t holdoff) |
Static Public Attributes | |
static const Double_t | kTimePerSample = 2.0 * Qw::us |
Protected Member Functions | |
QwADC18_Channel & | operator/= (const QwADC18_Channel &value) |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. | |
void | SetNumberOfSubElements (const size_t elements) |
Set the number of data words in this data element. | |
void | SetDataToSave (TString datatosave) |
Set the flag indicating if raw or derived values are in this data element. | |
void | SetDataToSave (VQwDataElement::EDataToSave datatosave) |
Set the flag indicating if raw or derived values are in this data element. | |
void | SetDataToSaveByPrefix (const TString &prefix) |
Set the flag indicating if raw or derived values are in this data element based on prefix. | |
void | RangeCheck (size_t element) const |
Checks that the requested element is in range, to be used in accesses to subelements similar to std::vector::at(). | |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. | |
VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. | |
void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
MQwHistograms () | |
Default constructor. | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. | |
virtual | ~MQwHistograms () |
Virtual destructor. | |
MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. | |
Private Attributes | |
UInt_t | fDiff_Raw |
UInt_t | fBase_Raw |
UInt_t | fPeak_Raw |
UInt_t | fValue_Raw |
Double_t | fValue |
Double_t | fValueM2 |
Double_t | fValueError |
QwADC18_Channel * | fRunningSum |
Pointer to the running sum for this channel. | |
QwADC18_Channel * | fDAC |
Pointer to the DAC channel for this channel. | |
Static Private Attributes | |
static const Bool_t | kDEBUG = kFALSE |
static const Int_t | kHeaderWordsPerBank = 1 |
static const Int_t | kFooterWordsPerBank = 1 |
static const Int_t | kHeaderWordsPerModule = 12 |
static const Int_t | kFooterWordsPerModule = 1 |
static const Int_t | kDataWordsPerChannel = 3 |
static const Int_t | kMaxChannels = 4 |
static const UInt_t | mask31x = 0x80000000 |
static const UInt_t | mask3029x = 0x60000000 |
static const UInt_t | mask2625x = 0x06000000 |
static const UInt_t | mask2422x = 0x01c00000 |
static const UInt_t | mask21x = 0x00200000 |
static const UInt_t | mask200x = 0x001fffff |
static const UInt_t | mask2118x = 0x003c0000 |
static const UInt_t | mask170x = 0x0003ffff |
static const UInt_t | mask150x = 0x0000ffff |
ADC Calibration | |
static const Double_t | kADC18_VoltsPerBit = (20./(1<<18)) |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const QwADC18_Channel &channel) |
Channel configuration data members | |
UInt_t | fSequenceNumber |
Event sequence number for this channel. | |
UInt_t | fPreviousSequenceNumber |
Previous event sequence number for this channel. | |
UInt_t | fNumberOfSamples |
Number of samples read through the module. | |
UInt_t | fNumberOfSamples_map |
Number of samples in the expected to read through the module. This value is set in the QwBeamline map file. | |
Int_t | fErrorCount_HWSat |
check to see ADC channel is saturated | |
Int_t | fErrorCount_sample |
for sample size check | |
Int_t | fErrorCount_SW_HW |
HW_sum==SW_sum check. | |
Int_t | fErrorCount_Sequence |
sequence number check | |
Int_t | fErrorCount_SameHW |
check to see ADC returning same HW value | |
Int_t | fErrorCount_ZeroHW |
check to see ADC returning zero | |
Int_t | fNumEvtsWithEventCutsRejected |
Counts the Event cut rejected events. | |
Int_t | fADC_Same_NumEvt |
Keep track of how many events with same ADC value returned. | |
Int_t | fSequenceNo_Prev |
Keep the sequence number of the last event. | |
Int_t | fSequenceNo_Counter |
Internal counter to keep track of the sequence number. | |
Double_t | fPrev_HardwareBlockSum |
Previous Module-based sum of the four sub-blocks. | |
Double_t | fSaturationABSLimit |
absolute value of the ADC18 saturation volt | |
Bool_t | bHw_sum |
Bool_t | bHw_sum_raw |
Bool_t | bBlock |
Bool_t | bBlock_raw |
Bool_t | bNum_samples |
Bool_t | bDevice_Error_Code |
Bool_t | bSequence_number |
static const Bool_t | bDEBUG =kFALSE |
debugging display purposes | |
Additional Inherited Members | |
![]() | |
enum | EDataToSave { kRaw = 0 , kDerived , kMoments } |
![]() | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. | |
UInt_t | fNumberOfSubElements |
Number of subelements in this data element. | |
EDataToSave | fDataToSave |
size_t | fTreeArrayIndex |
size_t | fTreeArrayNumEntries |
Double_t | fPedestal |
Double_t | fCalibrationFactor |
Bool_t | kFoundPedestal |
Bool_t | kFoundGain |
Int_t | bEVENTCUTMODE |
Double_t | fULimit |
Double_t | fLLimit |
Double_t | fStability |
Double_t | fBurpThreshold |
Int_t | fBurpCountdown |
![]() | |
TString | fElementName |
Name of this data element. | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. | |
UInt_t | fGoodEventCount |
Number of good events accumulated in this element. | |
TString | fSubsystemName |
TString | fModuleType |
UInt_t | fErrorFlag |
This the standard error code generated for the channel that contains the global/local/stability flags and the Device error code (Unique error code for HW failures) | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. | |
bool | fUseExternalRandomVariable |
Flag to use an externally provided normal random variable. | |
double | fExternalRandomVariable |
Externally provided normal random variable. | |
bool | fCalcMockDataAsDiff |
Double_t | fMockAsymmetry |
Helicity asymmetry. | |
Double_t | fMockGaussianMean |
Mean of normal distribution. | |
Double_t | fMockGaussianSigma |
Sigma of normal distribution. | |
std::vector< Double_t > | fMockDriftAmplitude |
Harmonic drift amplitude. | |
std::vector< Double_t > | fMockDriftFrequency |
Harmonic drift frequency. | |
std::vector< Double_t > | fMockDriftPhase |
Harmonic drift phase. | |
static Int_t | fBurpHoldoff = 10 |
static boost::mt19937 | fRandomnessGenerator |
Internal randomness generator. | |
static boost::normal_distribution< double > | fNormalDistribution |
Internal normal probability distribution. | |
static boost::variate_generator< boost::mt19937, boost::normal_distribution< double > > | fNormalRandomVariable |
Internal normal random variable. | |
Concrete hardware channel for HAPPEX 18-bit ADC modules.
Decodes and processes data from HAPPEX 18-bit ADC channels, providing access to raw and calibrated values, statistical moments, single-event cuts, and running statistics. Implements the dual-operator pattern for both type-specific and polymorphic operations.
Definition at line 34 of file QwADC18_Channel.h.
|
inline |
Definition at line 61 of file QwADC18_Channel.h.
References InitializeChannel(), MQwMockable::MQwMockable(), and SetADC18SaturationLimt().
Referenced by AccumulateRunningSum(), AccumulateRunningSum(), AddValueFrom(), ArcTan(), AssignScaledValue(), AssignValueFrom(), Blind(), Clone(), DeaccumulateRunningSum(), Difference(), DivideBy(), DivideBy(), MultiplyBy(), operator*(), operator*=(), operator*=(), operator+(), operator+=(), operator+=(), operator-(), operator-=(), operator-=(), operator/=(), operator/=(), operator<<, operator=(), Product(), QwADC18_Channel(), QwADC18_Channel(), Ratio(), ScaledAdd(), SubtractValueFrom(), and Sum().
|
inline |
Definition at line 65 of file QwADC18_Channel.h.
References InitializeChannel(), MQwMockable::MQwMockable(), and SetADC18SaturationLimt().
|
inline |
Definition at line 69 of file QwADC18_Channel.h.
References fNumberOfSamples_map, fSaturationABSLimit, MQwMockable::MQwMockable(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
inline |
Definition at line 76 of file QwADC18_Channel.h.
References fNumberOfSamples_map, fSaturationABSLimit, MQwMockable::MQwMockable(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
inlineoverride |
Definition at line 83 of file QwADC18_Channel.h.
void QwADC18_Channel::AccumulateRunningSum | ( | const QwADC18_Channel & | value, |
Int_t | count = 0, | ||
Int_t | ErrorMask = 0xFFFFFFF ) |
Accumulate event values into the running sum with optional scaling.
value | Source channel to accumulate from. |
count | Event count scaling (0 means use value.fGoodEventCount). |
ErrorMask | Bit mask of error flags to exclude when accumulating. |
Moments and uncertainty calculation on the running sums and averages The calculation of the first and second moments of the running sum is not completely straightforward due to numerical instabilities associated with small variances and large average values. The naive computation taking the difference of the square of the average and the average of the squares leads to the subtraction of two very large numbers to get a small number.
Alternative algorithms (including for higher order moments) are supplied in Pebay, Philippe (2008), "Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments", Technical Report SAND2008-6212, Sandia National Laboratories. http://infoserve.sandia.gov/sand_doc/2008/086212.pdf
In the following formulas the moments \( M^1 \) and \( M^2 \) are defined
\begin{eqnarray} M^1 & = & \frac{1}{n} \sum^n y \\ M^2 & = & \sum^n (y - \mu) \end{eqnarray}
Recurrence relations for the addition of a single event:
\begin{eqnarray} M^1_n & = & M^1_{n-1} + \frac{y - M^1_{n-1}}{n} \\ M^2_n & = & M^2_{n-1} + (y - M^1_{n-1})(y - M^1_n) \end{eqnarray}
For the addition of an already accumulated sum:
\begin{eqnarray} M^1 & = & M^1_1 + n_2 \frac{M^1_2 - M^1_1}{n} \\ M^2 & = & M^2_1 + M^2_2 + n_1 n_2 \frac{(M^1_2 - M^1_1)^2}{n} \end{eqnarray}
In these recursive formulas we start from \( M^1 = y \) and \( M^2 = 0 \).
To calculate the mean and standard deviation we use
\begin{eqnarray} \mu & = & M^1 \\ \sigma^2 & = & \frac{1}{n} M^2 \end{eqnarray}
The standard deviation is a biased estimator, but this is what ROOT uses. Better would be to divide by \( (n-1) \).
We use the formulas provided there for the calculation of the first and second moments (i.e. average and variance).
Definition at line 1108 of file QwADC18_Channel.cc.
References QwLog::endl(), VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fValue, fValueM2, VQwDataElement::GetElementName(), kPreserveError, QwADC18_Channel(), and QwWarning.
Referenced by AccumulateRunningSum(), and DeaccumulateRunningSum().
|
inlineoverridevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 168 of file QwADC18_Channel.h.
References AccumulateRunningSum(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
void QwADC18_Channel::AddChannelOffset | ( | Double_t | offset | ) |
This function will add a offset to the hw_sum and add the same offset for blocks.
Definition at line 1039 of file QwADC18_Channel.cc.
References fValue, and VQwDataElement::IsNameEmpty().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 777 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 93 of file QwADC18_Channel.cc.
References bDEBUG, VQwHardwareChannel::bEVENTCUTMODE, QwLog::endl(), VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples_map, fSequenceNo_Counter, fSequenceNo_Prev, VQwDataElement::GetElementName(), GetNumberOfSamples(), GetSequenceNumber(), kErrorFlag_sample, kErrorFlag_Sequence, MatchNumberOfSamples(), MatchSequenceNumber(), and QwWarning.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1271 of file QwADC18_Channel.cc.
References VQwHardwareChannel::bEVENTCUTMODE, VQwDataElement::fErrorFlag, VQwHardwareChannel::fLLimit, VQwHardwareChannel::fULimit, GetValue(), kErrorFlag_EventCut_L, and kErrorFlag_EventCut_U.
Bool_t QwADC18_Channel::ApplySingleEventCuts | ( | Double_t | LL, |
Double_t | UL ) |
Definition at line 1255 of file QwADC18_Channel.cc.
References VQwDataElement::fErrorFlag, GetValue(), and kPreserveError.
void QwADC18_Channel::ArcTan | ( | const QwADC18_Channel & | value | ) |
Definition at line 1013 of file QwADC18_Channel.cc.
References fValue, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
void QwADC18_Channel::AssignScaledValue | ( | const QwADC18_Channel & | value, |
Double_t | scale ) |
Definition at line 751 of file QwADC18_Channel.cc.
References VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fValue, fValueError, fValueM2, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 765 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwDataElement::VQwDataElement().
void QwADC18_Channel::Blind | ( | const QwBlinder * | blinder | ) |
Blind this channel as an asymmetry.
Blind this channel as an asymmetry
blinder | Blinder |
Definition at line 1199 of file QwADC18_Channel.cc.
References QwBlinder::BlindValue(), VQwDataElement::fErrorFlag, fValue, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), QwBlinder::kValue_BlinderFail, and QwBlinder::ModifyThisErrorCode().
void QwADC18_Channel::Blind | ( | const QwBlinder * | blinder, |
const QwADC18_Channel & | yield ) |
Blind this channel as a difference.
Blind this channel as a difference with specified yield
blinder | Blinder |
yield | Corresponding yield |
Definition at line 1216 of file QwADC18_Channel.cc.
References QwBlinder::BlindValue(), VQwDataElement::fErrorFlag, fValue, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), QwBlinder::kValue_BlinderFail, QwBlinder::ModifyThisErrorCode(), and QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1161 of file QwADC18_Channel.cc.
References VQwDataElement::fGoodEventCount, fValueError, and fValueM2.
|
overridevirtual |
Clear the event data in this element.
Reimplemented from VQwDataElement.
Definition at line 234 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fPeak_Raw, fSequenceNumber, fValue, fValueError, and fValueM2.
Referenced by InitializeChannel().
|
inlinevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 112 of file VQwHardwareChannel.h.
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 87 of file QwADC18_Channel.h.
References QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 603 of file QwADC18_Channel.cc.
References fValue, VQwDataElement::GetElementName(), and VQwDataElement::IsNameEmpty().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 572 of file QwADC18_Channel.cc.
References VQwHardwareChannel::fDataToSave, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwDataElement::GetElementName(), gQwHists, VQwDataElement::IsNameEmpty(), VQwDataElement::kMoments, VQwDataElement::kRaw, QwRootTreeBranchVector::LeafList(), QwRootTreeBranchVector::push_back(), VQwHardwareChannel::SetDataToSaveByPrefix(), and QwRootTreeBranchVector::size().
|
overridevirtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Definition at line 511 of file QwADC18_Channel.cc.
References VQwHardwareChannel::fDataToSave, MQwHistograms::fHistograms, VQwDataElement::GetElementName(), gQwHists, VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, and VQwDataElement::kRaw.
|
inline |
Definition at line 177 of file QwADC18_Channel.h.
References AccumulateRunningSum(), and QwADC18_Channel().
|
inlinevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 255 of file VQwHardwareChannel.h.
void QwADC18_Channel::Difference | ( | const QwADC18_Channel & | value1, |
const QwADC18_Channel & | value2 ) |
Definition at line 948 of file QwADC18_Channel.cc.
References QwADC18_Channel().
void QwADC18_Channel::DivideBy | ( | const QwADC18_Channel & | denom | ) |
Definition at line 1056 of file QwADC18_Channel.cc.
References QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 813 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
overridevirtual |
Encode the event data into a CODA buffer.
Implements MQwMockable.
Definition at line 295 of file QwADC18_Channel.cc.
References QwLog::endl(), fPeak_Raw, VQwDataElement::IsNameEmpty(), kDataWordsPerChannel, mask170x, mask2422x, mask2625x, mask3029x, mask31x, and QwError.
|
overridevirtual |
Fill the histograms for this data element.
Implements VQwDataElement.
Definition at line 548 of file QwADC18_Channel.cc.
References VQwHardwareChannel::fDataToSave, VQwDataElement::fErrorFlag, MQwHistograms::fHistograms, GetRawValue(), GetValue(), VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, and VQwDataElement::kRaw.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 613 of file QwADC18_Channel.cc.
References QwLog::endl(), fBase_Raw, VQwHardwareChannel::fDataToSave, fDiff_Raw, VQwDataElement::fElementName, VQwDataElement::fErrorFlag, fPeak_Raw, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, fValue, fValue_Raw, fValueError, fValueM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), VQwDataElement::kMoments, VQwDataElement::kRaw, QwError, QwRootTreeBranchVector::SetValue(), and QwRootTreeBranchVector::size().
|
inline |
Forces the event "number of samples" variable to be what was expected from the mapfile. NOTE: this should only be used in mock data generation!
Definition at line 112 of file QwADC18_Channel.h.
References fNumberOfSamples, and fNumberOfSamples_map.
|
inline |
Definition at line 210 of file QwADC18_Channel.h.
References fSaturationABSLimit.
Double_t QwADC18_Channel::GetAverageVolts | ( | ) | const |
Definition at line 490 of file QwADC18_Channel.cc.
References fNumberOfSamples, fValue, and kADC18_VoltsPerBit.
|
static |
Class: QwADC18_Channel Base class containing decoding functions for the HAPPEX 18-bit ADC The functions in this class will decode a single channel worth of ADC18_Channel data and provide the components through member functions.
Static member function to return the word offset within a data buffer given the module number index and the channel number index.
moduleindex | Module index within this buffer; counts from zero |
channelindex | Channel index within this module; counts from -1 (header) |
Definition at line 62 of file QwADC18_Channel.cc.
References QwLog::endl(), kDataWordsPerChannel, kFooterWordsPerModule, kHeaderWordsPerBank, kHeaderWordsPerModule, kMaxChannels, and QwError.
Referenced by QwBeamDetectorID::QwBeamDetectorID().
|
inline |
Definition at line 242 of file QwADC18_Channel.h.
References fNumberOfSamples.
Referenced by ApplyHWChecks().
|
inline |
Definition at line 125 of file VQwHardwareChannel.h.
Referenced by FillHistograms().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 223 of file QwADC18_Channel.h.
References fValue_Raw.
|
inline |
Definition at line 241 of file QwADC18_Channel.h.
References fSequenceNumber.
Referenced by ApplyHWChecks().
|
inline |
Definition at line 126 of file VQwHardwareChannel.h.
Referenced by ApplySingleEventCuts(), ApplySingleEventCuts(), FillHistograms(), and PrintValue().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 224 of file QwADC18_Channel.h.
References fValue.
Referenced by operator<<.
|
inline |
Definition at line 128 of file VQwHardwareChannel.h.
Referenced by PrintValue().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 226 of file QwADC18_Channel.h.
References fValueError.
|
inline |
Definition at line 127 of file VQwHardwareChannel.h.
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 225 of file QwADC18_Channel.h.
References fValueM2.
|
inline |
Definition at line 129 of file VQwHardwareChannel.h.
Referenced by PrintValue().
|
inline |
Definition at line 134 of file VQwHardwareChannel.h.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 128 of file QwADC18_Channel.cc.
References fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, VQwDataElement::fErrorFlag, fNumEvtsWithEventCutsRejected, kErrorFlag_EventCut_L, kErrorFlag_EventCut_U, kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, and kErrorFlag_ZeroHW.
|
overridevirtual |
Initialize the fields in this object.
Implements VQwHardwareChannel.
Definition at line 147 of file QwADC18_Channel.cc.
References VQwHardwareChannel::bEVENTCUTMODE, ClearEventData(), fADC_Same_NumEvt, VQwHardwareChannel::fCalibrationFactor, VQwDataElement::fErrorConfigFlag, fErrorCount_HWSat, fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, VQwHardwareChannel::fLLimit, MQwMockable::fMockAsymmetry, MQwMockable::fMockDriftAmplitude, MQwMockable::fMockDriftFrequency, MQwMockable::fMockDriftPhase, MQwMockable::fMockGaussianMean, MQwMockable::fMockGaussianSigma, fNumberOfSamples, fNumberOfSamples_map, fNumEvtsWithEventCutsRejected, VQwHardwareChannel::fPedestal, fPreviousSequenceNumber, fRunningSum, fSequenceNo_Counter, fSequenceNo_Prev, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwHardwareChannel::fULimit, MQwMockable::fUseExternalRandomVariable, VQwHardwareChannel::kFoundGain, VQwHardwareChannel::kFoundPedestal, VQwHardwareChannel::SetDataToSave(), VQwDataElement::SetElementName(), VQwHardwareChannel::SetNumberOfDataWords(), and VQwHardwareChannel::SetNumberOfSubElements().
Referenced by InitializeChannel(), QwADC18_Channel(), and QwADC18_Channel().
|
overridevirtual |
Initialize the fields in this object.
Implements VQwHardwareChannel.
Definition at line 214 of file QwADC18_Channel.cc.
References InitializeChannel(), VQwDataElement::SetModuleType(), and VQwDataElement::SetSubsystemName().
Bool_t QwADC18_Channel::IsHeaderWord | ( | UInt_t | word | ) | const |
Decode the event data from a CODA buffer.
Definition at line 328 of file QwADC18_Channel.cc.
References mask31x.
Referenced by ProcessEvBuffer().
|
overridevirtual |
Reimplemented from VQwDataElement.
Definition at line 221 of file QwADC18_Channel.cc.
References QwLog::endl(), VQwDataElement::GetElementName(), QwWarning, QwParameterFile::ReturnValue(), and SetDefaultSampleSize().
|
virtual |
Load the mock data parameters from the current line in the param file.
Reimplemented from VQwDataElement.
Definition at line 60 of file MQwMockable.cc.
References MQwMockable::fMockDriftAmplitude, MQwMockable::fMockDriftFrequency, and MQwMockable::fMockDriftPhase.
Bool_t QwADC18_Channel::MatchNumberOfSamples | ( | size_t | numsamp | ) |
Definition at line 1237 of file QwADC18_Channel.cc.
References bDEBUG, fNumberOfSamples, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), and QwError.
Referenced by ApplyHWChecks().
Bool_t QwADC18_Channel::MatchSequenceNumber | ( | size_t | seqnum | ) |
Definition at line 1228 of file QwADC18_Channel.cc.
References fSequenceNumber, and VQwDataElement::IsNameEmpty().
Referenced by ApplyHWChecks().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 801 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
const QwADC18_Channel QwADC18_Channel::operator* | ( | const QwADC18_Channel & | value | ) | const |
Definition at line 861 of file QwADC18_Channel.cc.
References QwADC18_Channel().
QwADC18_Channel & QwADC18_Channel::operator*= | ( | const QwADC18_Channel & | value | ) |
Definition at line 868 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, VQwDataElement::fErrorFlag, fPeak_Raw, fValue, fValueM2, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 911 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
const QwADC18_Channel QwADC18_Channel::operator+ | ( | const QwADC18_Channel & | value | ) | const |
Definition at line 827 of file QwADC18_Channel.cc.
References QwADC18_Channel().
QwADC18_Channel & QwADC18_Channel::operator+= | ( | const QwADC18_Channel & | value | ) |
Definition at line 834 of file QwADC18_Channel.cc.
References VQwDataElement::fErrorFlag, fValue, fValueM2, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 881 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
const QwADC18_Channel QwADC18_Channel::operator- | ( | const QwADC18_Channel & | value | ) | const |
Definition at line 844 of file QwADC18_Channel.cc.
References QwADC18_Channel().
QwADC18_Channel & QwADC18_Channel::operator-= | ( | const QwADC18_Channel & | value | ) |
Definition at line 851 of file QwADC18_Channel.cc.
References VQwDataElement::fErrorFlag, fValue, fValueM2, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 896 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
protected |
Definition at line 971 of file QwADC18_Channel.cc.
References QwLog::endl(), VQwDataElement::fErrorFlag, fValue, fValueM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwADC18_Channel(), QwVerbose, and QwWarning.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 926 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
QwADC18_Channel & QwADC18_Channel::operator= | ( | const QwADC18_Channel & | value | ) |
Definition at line 734 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, fPeak_Raw, fValue, fValue_Raw, fValueError, fValueM2, VQwDataElement::IsNameEmpty(), VQwHardwareChannel::operator=(), and QwADC18_Channel().
|
static |
Definition at line 1307 of file QwADC18_Channel.cc.
References QwLog::endl(), and QwMessage.
|
overridevirtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 1328 of file QwADC18_Channel.cc.
References QwLog::endl(), VQwHardwareChannel::fDataToSave, fErrorCount_HWSat, fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, fNumEvtsWithEventCutsRejected, VQwDataElement::GetElementName(), VQwHardwareChannel::kFoundGain, VQwHardwareChannel::kFoundPedestal, VQwDataElement::kRaw, and QwMessage.
|
static |
Definition at line 1323 of file QwADC18_Channel.cc.
References QwLog::endl(), and QwMessage.
|
overridevirtual |
Print multiple lines of information about this data element.
Reimplemented from VQwDataElement.
Definition at line 495 of file QwADC18_Channel.cc.
References QwLog::endl(), fBase_Raw, VQwHardwareChannel::fCalibrationFactor, fDiff_Raw, fNumberOfSamples, fPeak_Raw, VQwHardwareChannel::fPedestal, fSequenceNumber, fValue, VQwDataElement::GetElementName(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), and QwMessage.
|
overridevirtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 1176 of file QwADC18_Channel.cc.
References QwLog::endl(), VQwDataElement::fGoodEventCount, VQwDataElement::GetElementName(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), GetValue(), GetValueError(), GetValueWidth(), and QwMessage.
Int_t QwADC18_Channel::ProcessDataWord | ( | UInt_t | word | ) |
Definition at line 333 of file QwADC18_Channel.cc.
References QwLog::endl(), fNumberOfSamples, mask150x, mask170x, mask200x, mask2118x, mask21x, mask2422x, mask2625x, mask3029x, and QwError.
Referenced by ProcessEvBuffer().
|
overridevirtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Definition at line 384 of file QwADC18_Channel.cc.
References QwLog::endl(), fBase_Raw, fDiff_Raw, VQwHardwareChannel::fNumberOfDataWords, fPeak_Raw, fValue_Raw, VQwDataElement::GetElementName(), IsHeaderWord(), VQwDataElement::IsNameEmpty(), kDataWordsPerChannel, kHeaderWordsPerModule, ProcessDataWord(), QwError, and QwOut.
|
overridevirtual |
Process the event data according to pedestal and calibration factor.
Implements VQwHardwareChannel.
Definition at line 467 of file QwADC18_Channel.cc.
References QwLog::endl(), VQwHardwareChannel::fCalibrationFactor, fDiff_Raw, VQwDataElement::fErrorFlag, fNumberOfSamples, VQwHardwareChannel::fPedestal, fValue, fValueM2, VQwDataElement::GetElementName(), kErrorFlag_sample, and QwWarning.
void QwADC18_Channel::Product | ( | const QwADC18_Channel & | value1, |
const QwADC18_Channel & | value2 ) |
Definition at line 1022 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fPeak_Raw, fValue, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
|
overridevirtual |
Internally generate random event data.
Implements MQwMockable.
Definition at line 248 of file QwADC18_Channel.cc.
References MQwMockable::fMockAsymmetry, MQwMockable::fMockDriftAmplitude, MQwMockable::fMockDriftFrequency, MQwMockable::fMockDriftPhase, MQwMockable::fMockGaussianMean, MQwMockable::fMockGaussianSigma, fNumberOfSamples, fNumberOfSamples_map, fSequenceNumber, fValue, MQwMockable::GetRandomValue(), and Qw::pi.
void QwADC18_Channel::Ratio | ( | const QwADC18_Channel & | numer, |
const QwADC18_Channel & | denom ) |
Definition at line 954 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fPeak_Raw, VQwDataElement::IsNameEmpty(), and QwADC18_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1047 of file QwADC18_Channel.cc.
References fValue, fValueM2, and VQwDataElement::IsNameEmpty().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1349 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, VQwDataElement::fErrorFlag, fNumberOfSamples, fPeak_Raw, fSequenceNumber, fValue, fValueM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
inline |
Definition at line 205 of file QwADC18_Channel.h.
References fSaturationABSLimit.
Referenced by QwADC18_Channel(), and QwADC18_Channel().
|
inline |
Definition at line 244 of file QwADC18_Channel.h.
References kADC18_VoltsPerBit, and VQwHardwareChannel::SetCalibrationFactor().
|
inline |
Definition at line 100 of file QwADC18_Channel.h.
References fNumberOfSamples_map.
Referenced by LoadChannelParameters().
void QwADC18_Channel::SetEventData | ( | Double_t | value | ) |
Definition at line 277 of file QwADC18_Channel.cc.
References fBase_Raw, fDiff_Raw, fNumberOfSamples, fNumberOfSamples_map, fPeak_Raw, fSequenceNumber, and fValue.
|
overridevirtual |
Implements MQwMockable.
Definition at line 287 of file QwADC18_Channel.cc.
References VQwHardwareChannel::fCalibrationFactor, fDiff_Raw, fNumberOfSamples, fNumberOfSamples_map, fPeak_Raw, VQwHardwareChannel::fPedestal, and fValue.
Referenced by SmearByResolution().
|
overridevirtual |
Implements MQwMockable.
Definition at line 265 of file QwADC18_Channel.cc.
References fNumberOfSamples, fNumberOfSamples_map, fValue, fValueM2, MQwMockable::GetRandomValue(), and SetRawEventData().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 789 of file QwADC18_Channel.cc.
References VQwDataElement::GetElementName(), QwADC18_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
void QwADC18_Channel::Sum | ( | const QwADC18_Channel & | value1, |
const QwADC18_Channel & | value2 ) |
Definition at line 942 of file QwADC18_Channel.cc.
References QwADC18_Channel().
|
friend |
Definition at line 1189 of file QwADC18_Channel.cc.
References GetValue(), and QwADC18_Channel().
|
private |
Definition at line 346 of file QwADC18_Channel.h.
|
private |
Definition at line 347 of file QwADC18_Channel.h.
|
staticprivate |
debugging display purposes
For ADC18 data element trimming uses
Definition at line 341 of file QwADC18_Channel.h.
Referenced by ApplyHWChecks(), and MatchNumberOfSamples().
|
private |
Definition at line 349 of file QwADC18_Channel.h.
|
private |
Definition at line 344 of file QwADC18_Channel.h.
|
private |
Definition at line 345 of file QwADC18_Channel.h.
|
private |
Definition at line 348 of file QwADC18_Channel.h.
|
private |
Definition at line 350 of file QwADC18_Channel.h.
|
private |
Keep track of how many events with same ADC value returned.
Definition at line 331 of file QwADC18_Channel.h.
Referenced by InitializeChannel().
|
private |
Definition at line 268 of file QwADC18_Channel.h.
Referenced by ClearEventData(), FillTreeVector(), operator*=(), operator=(), PrintInfo(), ProcessEvBuffer(), Product(), Ratio(), ScaledAdd(), and SetEventData().
|
private |
Pointer to the DAC channel for this channel.
Definition at line 301 of file QwADC18_Channel.h.
|
private |
Definition at line 267 of file QwADC18_Channel.h.
Referenced by ClearEventData(), FillTreeVector(), operator*=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), Ratio(), ScaledAdd(), SetEventData(), and SetRawEventData().
|
private |
check to see ADC channel is saturated
Definition at line 320 of file QwADC18_Channel.h.
Referenced by InitializeChannel(), and PrintErrorCounters().
|
private |
check to see ADC returning same HW value
Definition at line 324 of file QwADC18_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
for sample size check
Definition at line 321 of file QwADC18_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
sequence number check
Definition at line 323 of file QwADC18_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
HW_sum==SW_sum check.
Definition at line 322 of file QwADC18_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
check to see ADC returning zero
Definition at line 325 of file QwADC18_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
Number of samples read through the module.
Definition at line 316 of file QwADC18_Channel.h.
Referenced by ClearEventData(), ForceMapfileSampleSize(), GetAverageVolts(), GetNumberOfSamples(), InitializeChannel(), MatchNumberOfSamples(), PrintInfo(), ProcessDataWord(), ProcessEvent(), RandomizeEventData(), ScaledAdd(), SetEventData(), SetRawEventData(), and SmearByResolution().
|
private |
Number of samples in the expected to read through the module. This value is set in the QwBeamline map file.
Definition at line 317 of file QwADC18_Channel.h.
Referenced by ApplyHWChecks(), ForceMapfileSampleSize(), InitializeChannel(), QwADC18_Channel(), QwADC18_Channel(), RandomizeEventData(), SetDefaultSampleSize(), SetEventData(), SetRawEventData(), and SmearByResolution().
|
private |
Counts the Event cut rejected events.
Definition at line 327 of file QwADC18_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
Definition at line 269 of file QwADC18_Channel.h.
Referenced by ClearEventData(), EncodeEventData(), FillTreeVector(), operator*=(), operator=(), PrintInfo(), ProcessEvBuffer(), Product(), Ratio(), ScaledAdd(), SetEventData(), and SetRawEventData().
|
private |
Previous Module-based sum of the four sub-blocks.
Definition at line 334 of file QwADC18_Channel.h.
|
private |
Previous event sequence number for this channel.
Definition at line 315 of file QwADC18_Channel.h.
Referenced by InitializeChannel().
|
private |
Pointer to the running sum for this channel.
Definition at line 298 of file QwADC18_Channel.h.
Referenced by InitializeChannel().
|
private |
absolute value of the ADC18 saturation volt
Definition at line 338 of file QwADC18_Channel.h.
Referenced by GetADC18SaturationLimt(), QwADC18_Channel(), QwADC18_Channel(), and SetADC18SaturationLimt().
|
private |
Internal counter to keep track of the sequence number.
Definition at line 333 of file QwADC18_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Keep the sequence number of the last event.
Definition at line 332 of file QwADC18_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Event sequence number for this channel.
Definition at line 314 of file QwADC18_Channel.h.
Referenced by ClearEventData(), GetSequenceNumber(), MatchSequenceNumber(), PrintInfo(), RandomizeEventData(), ScaledAdd(), and SetEventData().
|
private |
Definition at line 272 of file QwADC18_Channel.h.
Referenced by AccumulateRunningSum(), AddChannelOffset(), ArcTan(), AssignScaledValue(), Blind(), Blind(), ClearEventData(), ConstructBranch(), FillTreeVector(), GetAverageVolts(), GetValue(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), RandomizeEventData(), Scale(), ScaledAdd(), SetEventData(), SetRawEventData(), and SmearByResolution().
|
private |
Definition at line 270 of file QwADC18_Channel.h.
Referenced by FillTreeVector(), GetRawValue(), operator=(), and ProcessEvBuffer().
|
private |
Definition at line 274 of file QwADC18_Channel.h.
Referenced by AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), FillTreeVector(), GetValueError(), and operator=().
|
private |
Definition at line 273 of file QwADC18_Channel.h.
Referenced by AccumulateRunningSum(), AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), FillTreeVector(), GetValueM2(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), ProcessEvent(), Scale(), ScaledAdd(), and SmearByResolution().
|
staticprivate |
Conversion factor to translate the average bit count in an ADC channel into average voltage. The base factor is roughly 76 uV per count, and zero counts corresponds to zero voltage. Store as the exact value for 20 V range, 18 bit ADC.
Definition at line 305 of file QwADC18_Channel.h.
Referenced by GetAverageVolts(), and SetCalibrationToVolts().
|
staticprivate |
Definition at line 282 of file QwADC18_Channel.h.
Referenced by EncodeEventData(), GetBufferOffset(), and ProcessEvBuffer().
|
staticprivate |
Definition at line 277 of file QwADC18_Channel.h.
|
staticprivate |
Definition at line 279 of file QwADC18_Channel.h.
|
staticprivate |
Definition at line 281 of file QwADC18_Channel.h.
Referenced by GetBufferOffset().
|
staticprivate |
Definition at line 278 of file QwADC18_Channel.h.
Referenced by GetBufferOffset().
|
staticprivate |
Definition at line 280 of file QwADC18_Channel.h.
Referenced by GetBufferOffset(), and ProcessEvBuffer().
|
staticprivate |
Definition at line 283 of file QwADC18_Channel.h.
Referenced by GetBufferOffset().
|
static |
Definition at line 47 of file QwADC18_Channel.h.
|
staticprivate |
Definition at line 294 of file QwADC18_Channel.h.
Referenced by ProcessDataWord().
|
staticprivate |
Definition at line 293 of file QwADC18_Channel.h.
Referenced by EncodeEventData(), and ProcessDataWord().
|
staticprivate |
Definition at line 291 of file QwADC18_Channel.h.
Referenced by ProcessDataWord().
|
staticprivate |
Definition at line 292 of file QwADC18_Channel.h.
Referenced by ProcessDataWord().
|
staticprivate |
Definition at line 290 of file QwADC18_Channel.h.
Referenced by ProcessDataWord().
|
staticprivate |
Definition at line 289 of file QwADC18_Channel.h.
Referenced by EncodeEventData(), and ProcessDataWord().
|
staticprivate |
Definition at line 288 of file QwADC18_Channel.h.
Referenced by EncodeEventData(), and ProcessDataWord().
|
staticprivate |
Definition at line 287 of file QwADC18_Channel.h.
Referenced by EncodeEventData(), and ProcessDataWord().
|
staticprivate |
Definition at line 286 of file QwADC18_Channel.h.
Referenced by EncodeEventData(), and IsHeaderWord().