JAPAn
Just Another Parity Analyzer
|
Concrete hardware channel for VQWK ADC modules (6x32-bit words) More...
#include <QwVQWK_Channel.h>
Public Member Functions | |
QwVQWK_Channel () | |
QwVQWK_Channel (TString name, TString datatosave="raw") | |
QwVQWK_Channel (const QwVQWK_Channel &value) | |
QwVQWK_Channel (const QwVQWK_Channel &value, VQwDataElement::EDataToSave datatosave) | |
~QwVQWK_Channel () override | |
void | CopyFrom (const QwVQWK_Channel &value) |
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 | SetHardwareSum (Double_t hwsum, UInt_t sequencenumber=0) |
void | SetEventData (Double_t *block, UInt_t sequencenumber=0) |
void | SetRawEventData () override |
void | EncodeEventData (std::vector< UInt_t > &buffer) override |
Encode the event data into a CODA buffer. | |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) override |
Decode the event data from a CODA buffer. | |
void | ProcessEvent () override |
Process the event data according to pedestal and calibration factor. | |
QwVQWK_Channel & | operator= (const QwVQWK_Channel &value) |
void | AssignScaledValue (const QwVQWK_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 QwVQWK_Channel &value) |
QwVQWK_Channel & | operator+= (const QwVQWK_Channel &value) |
QwVQWK_Channel & | operator-= (const QwVQWK_Channel &value) |
QwVQWK_Channel & | operator*= (const QwVQWK_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 QwVQWK_Channel | operator+ (const QwVQWK_Channel &value) const |
const QwVQWK_Channel | operator- (const QwVQWK_Channel &value) const |
const QwVQWK_Channel | operator* (const QwVQWK_Channel &value) const |
void | Sum (const QwVQWK_Channel &value1, const QwVQWK_Channel &value2) |
void | Difference (const QwVQWK_Channel &value1, const QwVQWK_Channel &value2) |
void | Ratio (const QwVQWK_Channel &numer, const QwVQWK_Channel &denom) |
void | Product (const QwVQWK_Channel &value1, const QwVQWK_Channel &value2) |
void | DivideBy (const QwVQWK_Channel &denom) |
void | AddChannelOffset (Double_t Offset) |
void | Scale (Double_t Offset) override |
void | AccumulateRunningSum (const QwVQWK_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 QwVQWK_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 | SetVQWKSaturationLimt (Double_t sat_volts=8.5) |
Double_t | GetVQWKSaturationLimt () |
Int_t | ApplyHWChecks () override |
void | IncrementErrorCounters () 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 |
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 |
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 QwVQWK_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/30.0) * Qw::us |
Protected Member Functions | |
QwVQWK_Channel & | operator/= (const QwVQWK_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 Member Functions | |
Double_t | GetBlockValue (size_t blocknum) const |
Double_t | GetBlockErrorValue (size_t blocknum) const |
Double_t | GetHardwareSum () const |
Double_t | GetHardwareSumM2 () const |
Double_t | GetHardwareSumWidth () const |
Double_t | GetHardwareSumError () const |
Int_t | GetRawBlockValue (size_t blocknum) const |
Int_t | GetRawHardwareSum () const |
Int_t | GetRawSoftwareSum () const |
Private Attributes | |
Channel configuration data members | |
Short_t | fBlocksPerEvent |
Event data members—Raw values | |
Int_t | fBlock_raw [4] |
Array of the sub-block data as read from the module. | |
Int_t | fHardwareBlockSum_raw |
Module-based sum of the four sub-blocks as read from the module. | |
Int_t | fSoftwareBlockSum_raw |
Sum of the data in the four sub-blocks raw. | |
Event data members—Potentially calibrated values | |
Double_t | fBlock [4] |
Array of the sub-block data. | |
Double_t | fHardwareBlockSum |
Module-based sum of the four sub-blocks. | |
Static Private Attributes | |
static const Bool_t | kDEBUG = kFALSE |
static const Int_t | kWordsPerChannel = 6 |
static const Int_t | kMaxChannels = 8 |
ADC Calibration | |
static const Double_t | kVQWK_VoltsPerBit = (20./(1<<18)) |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const QwVQWK_Channel &channel) |
Calculation of the statistical moments | |
static const Bool_t | bDEBUG =kFALSE |
debugging display purposes | |
Double_t | fBlockM2 [4] |
Second moment of the sub-block. | |
Double_t | fBlockError [4] |
Uncertainty on the sub-block. | |
Double_t | fHardwareBlockSumM2 |
Second moment of the hardware sum. | |
Double_t | fHardwareBlockSumError |
Uncertainty on the hardware sum. | |
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 VQWK 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 |
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 VQWK ADC modules (6x32-bit words)
Decodes and processes the data for a single VQWK channel, providing access to sub-blocks and hardware sums, statistical moments, single-event cuts, and running statistics. Implements the dual-operator pattern by offering efficient type-specific operators and delegating polymorphic operators from the VQwHardwareChannel interface using dynamic_cast.
Definition at line 48 of file QwVQWK_Channel.h.
|
inline |
Definition at line 76 of file QwVQWK_Channel.h.
References InitializeChannel(), MQwMockable::MQwMockable(), and SetVQWKSaturationLimt().
Referenced by AccumulateRunningSum(), AccumulateRunningSum(), AddValueFrom(), ArcTan(), AssignScaledValue(), AssignValueFrom(), Blind(), Clone(), CopyFrom(), DeaccumulateRunningSum(), Difference(), DivideBy(), DivideBy(), MultiplyBy(), operator*(), operator*=(), operator*=(), operator+(), operator+=(), operator+=(), operator-(), operator-=(), operator-=(), operator/=(), operator/=(), operator<<, operator=(), Product(), QwVQWK_Channel(), QwVQWK_Channel(), Ratio(), ScaledAdd(), SubtractValueFrom(), and Sum().
|
inline |
Definition at line 80 of file QwVQWK_Channel.h.
References InitializeChannel(), MQwMockable::MQwMockable(), and SetVQWKSaturationLimt().
|
inline |
Definition at line 84 of file QwVQWK_Channel.h.
References fBlocksPerEvent, fNumberOfSamples_map, fSaturationABSLimit, MQwMockable::MQwMockable(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
inline |
Definition at line 92 of file QwVQWK_Channel.h.
References fBlocksPerEvent, fNumberOfSamples_map, fSaturationABSLimit, MQwMockable::MQwMockable(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
inlineoverride |
Definition at line 100 of file QwVQWK_Channel.h.
void QwVQWK_Channel::AccumulateRunningSum | ( | const QwVQWK_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 1569 of file QwVQWK_Channel.cc.
References QwLog::endl(), fBlock, fBlockM2, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSumM2, VQwDataElement::GetElementName(), kPreserveError, QwVQWK_Channel(), and QwWarning.
Referenced by AccumulateRunningSum(), and DeaccumulateRunningSum().
|
inlineoverridevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 194 of file QwVQWK_Channel.h.
References AccumulateRunningSum(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
void QwVQWK_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 1490 of file QwVQWK_Channel.cc.
References fBlock, fBlocksPerEvent, fHardwareBlockSum, and VQwDataElement::IsNameEmpty().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1184 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 64 of file QwVQWK_Channel.cc.
References bDEBUG, VQwHardwareChannel::bEVENTCUTMODE, QwLog::endl(), fADC_Same_NumEvt, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fNumberOfSamples_map, fPrev_HardwareBlockSum, fSequenceNo_Counter, fSequenceNo_Prev, VQwDataElement::GetElementName(), GetNumberOfSamples(), GetRawHardwareSum(), GetRawSoftwareSum(), GetSequenceNumber(), GetVQWKSaturationLimt(), kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, kErrorFlag_VQWK_Sat, kErrorFlag_ZeroHW, kVQWK_VoltsPerBit, MatchNumberOfSamples(), MatchSequenceNumber(), and QwWarning.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1875 of file QwVQWK_Channel.cc.
References VQwHardwareChannel::bEVENTCUTMODE, VQwDataElement::fErrorFlag, VQwHardwareChannel::fLLimit, VQwHardwareChannel::fULimit, GetHardwareSum(), kErrorFlag_EventCut_L, and kErrorFlag_EventCut_U.
Bool_t QwVQWK_Channel::ApplySingleEventCuts | ( | Double_t | LL, |
Double_t | UL ) |
Definition at line 1859 of file QwVQWK_Channel.cc.
References VQwDataElement::fErrorFlag, GetHardwareSum(), and kPreserveError.
void QwVQWK_Channel::ArcTan | ( | const QwVQWK_Channel & | value | ) |
Definition at line 1452 of file QwVQWK_Channel.cc.
References fBlock, fBlocksPerEvent, fHardwareBlockSum, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
void QwVQWK_Channel::AssignScaledValue | ( | const QwVQWK_Channel & | value, |
Double_t | scale ) |
Definition at line 1152 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1172 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwDataElement::VQwDataElement().
void QwVQWK_Channel::Blind | ( | const QwBlinder * | blinder | ) |
Blind this channel as an asymmetry.
Blind this channel as an asymmetry
blinder | Blinder |
Definition at line 1792 of file QwVQWK_Channel.cc.
References QwBlinder::BlindValue(), fBlock, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), QwBlinder::kValue_BlinderFail, and QwBlinder::ModifyThisErrorCode().
void QwVQWK_Channel::Blind | ( | const QwBlinder * | blinder, |
const QwVQWK_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 1814 of file QwVQWK_Channel.cc.
References QwBlinder::BlindValue(), fBlock, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), QwBlinder::kValue_BlinderFail, QwBlinder::ModifyThisErrorCode(), and QwVQWK_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1720 of file QwVQWK_Channel.cc.
References fBlockError, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorConfigFlag, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSumError, fHardwareBlockSumM2, VQwHardwareChannel::fStability, GetValueWidth(), kBeamStabilityError, and kStabilityCut.
|
overridevirtual |
Clear the event data in this element.
Reimplemented from VQwDataElement.
Definition at line 249 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockError, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, and fSoftwareBlockSum_raw.
Referenced by InitializeChannel(), QwLinearDiodeArray::ProcessEvent(), and QwQPD::ProcessEvent().
|
inlinevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 112 of file VQwHardwareChannel.h.
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 112 of file QwVQWK_Channel.h.
References QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 826 of file QwVQWK_Channel.cc.
References fHardwareBlockSum, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), and kDEBUG.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 742 of file QwVQWK_Channel.cc.
References bBlock, bBlock_raw, bDevice_Error_Code, bHw_sum, bHw_sum_raw, bNum_samples, bSequence_number, QwLog::endl(), VQwHardwareChannel::fDataToSave, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwDataElement::GetElementName(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), gQwHists, VQwDataElement::IsNameEmpty(), kDEBUG, VQwDataElement::kMoments, VQwDataElement::kRaw, QwRootTreeBranchVector::LeafList(), QwRootTreeBranchVector::push_back(), QwMessage, VQwHardwareChannel::SetDataToSaveByPrefix(), and QwRootTreeBranchVector::size().
|
overridevirtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Definition at line 636 of file QwVQWK_Channel.cc.
References fBlocksPerEvent, VQwHardwareChannel::fDataToSave, MQwHistograms::fHistograms, VQwDataElement::GetElementName(), gQwHists, VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, VQwDataElement::kRaw, and VQwHardwareChannel::SetDataToSaveByPrefix().
|
inline |
Definition at line 102 of file QwVQWK_Channel.h.
References VQwHardwareChannel::CopyFrom(), fBlocksPerEvent, fNumberOfSamples_map, fSaturationABSLimit, and QwVQWK_Channel().
|
inline |
Definition at line 203 of file QwVQWK_Channel.h.
References AccumulateRunningSum(), and QwVQWK_Channel().
|
inlinevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 255 of file VQwHardwareChannel.h.
void QwVQWK_Channel::Difference | ( | const QwVQWK_Channel & | value1, |
const QwVQWK_Channel & | value2 ) |
Definition at line 1372 of file QwVQWK_Channel.cc.
References QwVQWK_Channel().
Referenced by QwQPD::ProcessEvent().
void QwVQWK_Channel::DivideBy | ( | const QwVQWK_Channel & | denom | ) |
Definition at line 1513 of file QwVQWK_Channel.cc.
References QwVQWK_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1220 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
overridevirtual |
Encode the event data into a CODA buffer.
Implements MQwMockable.
Definition at line 442 of file QwVQWK_Channel.cc.
References fBlock_raw, fHardwareBlockSum_raw, fNumberOfSamples, fSequenceNumber, and VQwDataElement::IsNameEmpty().
|
overridevirtual |
Fill the histograms for this data element.
Implements VQwDataElement.
Definition at line 684 of file QwVQWK_Channel.cc.
References fBlocksPerEvent, VQwHardwareChannel::fDataToSave, VQwDataElement::fErrorFlag, MQwHistograms::fHistograms, GetBlockValue(), GetHardwareSum(), GetRawBlockValue(), GetRawHardwareSum(), GetRawSoftwareSum(), VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, kErrorFlag_VQWK_Sat, kErrorFlag_ZeroHW, and VQwDataElement::kRaw.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 841 of file QwVQWK_Channel.cc.
References bBlock, bBlock_raw, bDEBUG, bDevice_Error_Code, bHw_sum, bHw_sum_raw, bNum_samples, bSequence_number, fBlocksPerEvent, VQwHardwareChannel::fDataToSave, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fSequenceNumber, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, GetBlockValue(), GetHardwareSum(), GetHardwareSumError(), GetHardwareSumM2(), GetRawBlockValue(), GetRawHardwareSum(), VQwDataElement::IsNameEmpty(), VQwDataElement::kMoments, VQwDataElement::kRaw, 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 137 of file QwVQWK_Channel.h.
References fNumberOfSamples, and fNumberOfSamples_map.
Double_t QwVQWK_Channel::GetAverageVolts | ( | ) | const |
Definition at line 597 of file QwVQWK_Channel.cc.
References fHardwareBlockSum, fNumberOfSamples, and kVQWK_VoltsPerBit.
|
inlineprivate |
Definition at line 304 of file QwVQWK_Channel.h.
References GetValueError().
Referenced by PrintValue().
|
inlineprivate |
Definition at line 303 of file QwVQWK_Channel.h.
References GetValue().
Referenced by FillHistograms(), FillTreeVector(), and PrintValue().
|
static |
Class: QwVQWK_Channel Base class containing decoding functions for the VQWK_Channel 6 32-bit datawords. The functions in this class will decode a single channel worth of VQWK_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 zero |
Definition at line 43 of file QwVQWK_Channel.cc.
References QwLog::endl(), kMaxChannels, kWordsPerChannel, and QwError.
Referenced by QwBeamDetectorID::QwBeamDetectorID(), and QwModChannelID::QwModChannelID().
|
inlineprivate |
Definition at line 306 of file QwVQWK_Channel.h.
References GetValue().
Referenced by ApplySingleEventCuts(), ApplySingleEventCuts(), FillHistograms(), FillTreeVector(), operator<<, and PrintValue().
|
inlineprivate |
Definition at line 309 of file QwVQWK_Channel.h.
References GetValueError().
Referenced by FillTreeVector(), and PrintValue().
|
inlineprivate |
Definition at line 307 of file QwVQWK_Channel.h.
References GetValueM2().
Referenced by FillTreeVector().
|
inlineprivate |
Definition at line 308 of file QwVQWK_Channel.h.
References GetValueWidth().
Referenced by PrintValue().
|
inline |
Definition at line 276 of file QwVQWK_Channel.h.
References fNumberOfSamples.
Referenced by ApplyHWChecks().
|
inlineprivate |
Definition at line 312 of file QwVQWK_Channel.h.
References GetRawValue().
Referenced by FillHistograms(), and FillTreeVector().
|
inlineprivate |
Definition at line 313 of file QwVQWK_Channel.h.
References GetRawValue().
Referenced by ApplyHWChecks(), FillHistograms(), and FillTreeVector().
|
inlineprivate |
Definition at line 314 of file QwVQWK_Channel.h.
References fSoftwareBlockSum_raw.
Referenced by ApplyHWChecks(), and FillHistograms().
|
inline |
Definition at line 125 of file VQwHardwareChannel.h.
Referenced by GetRawBlockValue(), and GetRawHardwareSum().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 251 of file QwVQWK_Channel.h.
References fBlock_raw, fHardwareBlockSum_raw, and VQwHardwareChannel::RangeCheck().
|
inline |
Definition at line 275 of file QwVQWK_Channel.h.
References fSequenceNumber.
Referenced by ApplyHWChecks().
|
inline |
Definition at line 126 of file VQwHardwareChannel.h.
Referenced by GetBlockValue(), and GetHardwareSum().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 256 of file QwVQWK_Channel.h.
References fBlock, fHardwareBlockSum, and VQwHardwareChannel::RangeCheck().
Referenced by QwQPD::ProcessEvent(), and QwBlinder::Update().
|
inline |
Definition at line 128 of file VQwHardwareChannel.h.
Referenced by GetBlockErrorValue(), and GetHardwareSumError().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 266 of file QwVQWK_Channel.h.
References fBlockError, fHardwareBlockSumError, and VQwHardwareChannel::RangeCheck().
|
inline |
Definition at line 127 of file VQwHardwareChannel.h.
Referenced by GetHardwareSumM2().
|
inlineoverridevirtual |
Implements VQwHardwareChannel.
Definition at line 261 of file QwVQWK_Channel.h.
References fBlockM2, fHardwareBlockSumM2, and VQwHardwareChannel::RangeCheck().
|
inline |
Definition at line 129 of file VQwHardwareChannel.h.
Referenced by CalculateRunningAverage(), and GetHardwareSumWidth().
|
inline |
Definition at line 134 of file VQwHardwareChannel.h.
|
inline |
Definition at line 227 of file QwVQWK_Channel.h.
References fSaturationABSLimit.
Referenced by ApplyHWChecks().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 140 of file QwVQWK_Channel.cc.
References fErrorCount_HWSat, 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, kErrorFlag_VQWK_Sat, and kErrorFlag_ZeroHW.
|
overridevirtual |
Initialize the fields in this object.
Implements VQwHardwareChannel.
Definition at line 161 of file QwVQWK_Channel.cc.
References VQwHardwareChannel::bEVENTCUTMODE, ClearEventData(), fADC_Same_NumEvt, fBlocksPerEvent, 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, fPrev_HardwareBlockSum, fPreviousSequenceNumber, 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(), QwLinearDiodeArray::ProcessEvent(), QwQPD::ProcessEvent(), QwVQWK_Channel(), and QwVQWK_Channel().
|
overridevirtual |
Initialize the fields in this object.
Implements VQwHardwareChannel.
Definition at line 229 of file QwVQWK_Channel.cc.
References InitializeChannel(), VQwDataElement::SetModuleType(), and VQwDataElement::SetSubsystemName().
|
overridevirtual |
Reimplemented from VQwDataElement.
Definition at line 236 of file QwVQWK_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.
Bool_t QwVQWK_Channel::MatchNumberOfSamples | ( | size_t | numsamp | ) |
Definition at line 1841 of file QwVQWK_Channel.cc.
References bDEBUG, fNumberOfSamples, VQwDataElement::GetElementName(), and VQwDataElement::IsNameEmpty().
Referenced by ApplyHWChecks().
Bool_t QwVQWK_Channel::MatchSequenceNumber | ( | size_t | seqnum | ) |
Definition at line 1831 of file QwVQWK_Channel.cc.
References fSequenceNumber, and VQwDataElement::IsNameEmpty().
Referenced by ApplyHWChecks().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1208 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
const QwVQWK_Channel QwVQWK_Channel::operator* | ( | const QwVQWK_Channel & | value | ) | const |
Definition at line 1284 of file QwVQWK_Channel.cc.
References QwVQWK_Channel().
QwVQWK_Channel & QwVQWK_Channel::operator*= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 1291 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1336 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
const QwVQWK_Channel QwVQWK_Channel::operator+ | ( | const QwVQWK_Channel & | value | ) | const |
Definition at line 1234 of file QwVQWK_Channel.cc.
References QwVQWK_Channel().
QwVQWK_Channel & QwVQWK_Channel::operator+= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 1241 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1308 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
const QwVQWK_Channel QwVQWK_Channel::operator- | ( | const QwVQWK_Channel & | value | ) | const |
Definition at line 1260 of file QwVQWK_Channel.cc.
References QwVQWK_Channel().
QwVQWK_Channel & QwVQWK_Channel::operator-= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 1267 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1322 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
protected |
Definition at line 1392 of file QwVQWK_Channel.cc.
References QwLog::endl(), fBlock, fBlockM2, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwVerbose, QwVQWK_Channel(), and QwWarning.
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1350 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
QwVQWK_Channel & QwVQWK_Channel::operator= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 1125 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwHardwareChannel::fDataToSave, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::IsNameEmpty(), VQwDataElement::kRaw, VQwHardwareChannel::operator=(), and QwVQWK_Channel().
|
static |
Definition at line 1911 of file QwVQWK_Channel.cc.
References QwLog::endl(), and QwMessage.
Referenced by QwBeamLine::PrintErrorCounters(), and QwBeamMod::PrintErrorCounters().
|
overridevirtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 1934 of file QwVQWK_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 1928 of file QwVQWK_Channel.cc.
References QwLog::endl(), and QwMessage.
Referenced by QwBeamLine::PrintErrorCounters(), and QwBeamMod::PrintErrorCounters().
|
overridevirtual |
Print multiple lines of information about this data element.
Reimplemented from VQwDataElement.
Definition at line 606 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, VQwHardwareChannel::fPedestal, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::GetElementName(), VQwDataElement::GetModuleType(), and VQwDataElement::GetSubsystemName().
|
overridevirtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 1754 of file QwVQWK_Channel.cc.
References QwLog::endl(), VQwDataElement::fGoodEventCount, GetBlockErrorValue(), GetBlockValue(), VQwDataElement::GetElementName(), VQwDataElement::GetGoodEventCount(), GetHardwareSum(), GetHardwareSumError(), GetHardwareSumWidth(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), and QwMessage.
|
overridevirtual |
Decode the event data from a CODA buffer.
Process raw event buffer data for a VQWK ADC channel.
buffer | Pointer to raw data buffer from DAQ system. |
num_words_left | Number of words remaining in the buffer. |
index | Channel index within the ADC module (0-7). |
This is a critical data processing function that decodes the 6-word VQWK ADC data format used throughout the Qweak/MOLLER analysis framework:
VQWK Data Format (6 words per channel):
Data Processing Steps:
Channel State Handling:
Error Detection:
Buffer Management:
Implements VQwDataElement.
Definition at line 513 of file QwVQWK_Channel.cc.
References fBlock_raw, fBlocksPerEvent, fHardwareBlockSum_raw, VQwHardwareChannel::fNumberOfDataWords, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::IsNameEmpty(), and kWordsPerChannel.
|
overridevirtual |
Process the event data according to pedestal and calibration factor.
Implements VQwHardwareChannel.
Definition at line 560 of file QwVQWK_Channel.cc.
References QwLog::endl(), fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, VQwHardwareChannel::fPedestal, VQwDataElement::GetElementName(), kErrorFlag_sample, and QwWarning.
void QwVQWK_Channel::Product | ( | const QwVQWK_Channel & | value1, |
const QwVQWK_Channel & | value2 ) |
Definition at line 1467 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
Referenced by QwLinearDiodeArray::ProcessEvent().
|
overridevirtual |
Internally generate random event data.
Implements MQwMockable.
Definition at line 269 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, MQwMockable::fCalcMockDataAsDiff, fHardwareBlockSum, fHardwareBlockSumM2, MQwMockable::fMockAsymmetry, MQwMockable::fMockDriftAmplitude, MQwMockable::fMockDriftFrequency, MQwMockable::fMockDriftPhase, MQwMockable::fMockGaussianMean, MQwMockable::fMockGaussianSigma, fNumberOfSamples, fNumberOfSamples_map, fSequenceNumber, MQwMockable::GetRandomValue(), kTimePerSample, and Qw::pi.
void QwVQWK_Channel::Ratio | ( | const QwVQWK_Channel & | numer, |
const QwVQWK_Channel & | denom ) |
Definition at line 1378 of file QwVQWK_Channel.cc.
References VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwVQWK_Channel().
Referenced by QwLinearDiodeArray::ProcessEvent().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1500 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, and VQwDataElement::IsNameEmpty().
Referenced by QwLinearDiodeArray::ProcessEvent().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1956 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
|
inline |
Definition at line 278 of file QwVQWK_Channel.h.
References kVQWK_VoltsPerBit, and VQwHardwareChannel::SetCalibrationFactor().
|
inline |
Definition at line 125 of file QwVQWK_Channel.h.
References fNumberOfSamples_map.
Referenced by LoadChannelParameters().
void QwVQWK_Channel::SetEventData | ( | Double_t * | block, |
UInt_t | sequencenumber = 0 ) |
Definition at line 373 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fNumberOfSamples_map, fSequenceNumber, and SetRawEventData().
Referenced by SetHardwareSum().
void QwVQWK_Channel::SetHardwareSum | ( | Double_t | hwsum, |
UInt_t | sequencenumber = 0 ) |
TODO: SetHardwareSum should be removed, and SetEventData should be made protected.
Definition at line 357 of file QwVQWK_Channel.cc.
References fBlocksPerEvent, and SetEventData().
|
overridevirtual |
Implements MQwMockable.
Definition at line 394 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, fHardwareBlockSum_raw, fNumberOfSamples, fNumberOfSamples_map, VQwHardwareChannel::fPedestal, and fSoftwareBlockSum_raw.
Referenced by SetEventData().
|
inline |
Definition at line 223 of file QwVQWK_Channel.h.
References fSaturationABSLimit.
Referenced by QwVQWK_Channel(), and QwVQWK_Channel().
|
overridevirtual |
Implements MQwMockable.
Definition at line 337 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fNumberOfSamples_map, and MQwMockable::GetRandomValue().
|
overridevirtual |
Implements VQwHardwareChannel.
Definition at line 1196 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName(), QwVQWK_Channel(), and VQwHardwareChannel::VQwHardwareChannel().
void QwVQWK_Channel::Sum | ( | const QwVQWK_Channel & | value1, |
const QwVQWK_Channel & | value2 ) |
Definition at line 1366 of file QwVQWK_Channel.cc.
References QwVQWK_Channel().
Referenced by QwQPD::ProcessEvent().
|
friend |
Definition at line 1782 of file QwVQWK_Channel.cc.
References GetHardwareSum(), and QwVQWK_Channel().
|
private |
Definition at line 397 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 398 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
staticprivate |
debugging display purposes
For VQWK data element trimming uses
Definition at line 392 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), FillTreeVector(), and MatchNumberOfSamples().
|
private |
Definition at line 400 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 395 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 396 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 399 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 401 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Keep track of how many events with same ADC value returned.
Definition at line 382 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Array of the sub-block data.
Definition at line 345 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AddChannelOffset(), ArcTan(), AssignScaledValue(), Blind(), Blind(), ClearEventData(), GetValue(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), RandomizeEventData(), Scale(), ScaledAdd(), SetEventData(), SetRawEventData(), and SmearByResolution().
|
private |
Array of the sub-block data as read from the module.
Definition at line 339 of file QwVQWK_Channel.h.
Referenced by ClearEventData(), EncodeEventData(), GetRawValue(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), and SetRawEventData().
|
private |
Uncertainty on the sub-block.
Definition at line 354 of file QwVQWK_Channel.h.
Referenced by CalculateRunningAverage(), ClearEventData(), and GetValueError().
|
private |
Second moment of the sub-block.
Definition at line 353 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueM2(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), ProcessEvent(), Product(), RandomizeEventData(), Scale(), ScaledAdd(), SetEventData(), and SmearByResolution().
|
private |
Definition at line 333 of file QwVQWK_Channel.h.
Referenced by AddChannelOffset(), ArcTan(), AssignScaledValue(), Blind(), Blind(), CalculateRunningAverage(), ClearEventData(), ConstructHistograms(), CopyFrom(), FillHistograms(), FillTreeVector(), InitializeChannel(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), QwVQWK_Channel(), QwVQWK_Channel(), RandomizeEventData(), Scale(), ScaledAdd(), SetEventData(), SetHardwareSum(), SetRawEventData(), and SmearByResolution().
|
private |
check to see ADC channel is saturated
Definition at line 368 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
check to see ADC returning same HW value
Definition at line 372 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
for sample size check
Definition at line 369 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
sequence number check
Definition at line 371 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
HW_sum==SW_sum check.
Definition at line 370 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
check to see ADC returning zero
Definition at line 373 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
Module-based sum of the four sub-blocks.
Definition at line 346 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AddChannelOffset(), ArcTan(), AssignScaledValue(), Blind(), Blind(), ClearEventData(), ConstructBranch(), GetAverageVolts(), GetValue(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), RandomizeEventData(), Scale(), ScaledAdd(), SetEventData(), and SmearByResolution().
|
private |
Module-based sum of the four sub-blocks as read from the module.
Definition at line 340 of file QwVQWK_Channel.h.
Referenced by ClearEventData(), EncodeEventData(), GetRawValue(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), and SetRawEventData().
|
private |
Uncertainty on the hardware sum.
Definition at line 357 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueError(), operator=(), and PrintInfo().
|
private |
Second moment of the hardware sum.
Definition at line 356 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueM2(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), RandomizeEventData(), Scale(), ScaledAdd(), SetEventData(), and SmearByResolution().
|
private |
Number of samples read through the module.
Definition at line 363 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), AssignScaledValue(), ClearEventData(), EncodeEventData(), FillTreeVector(), ForceMapfileSampleSize(), GetAverageVolts(), GetNumberOfSamples(), InitializeChannel(), MatchNumberOfSamples(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), RandomizeEventData(), Ratio(), 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 364 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), CopyFrom(), ForceMapfileSampleSize(), InitializeChannel(), QwVQWK_Channel(), QwVQWK_Channel(), RandomizeEventData(), SetDefaultSampleSize(), SetEventData(), SetRawEventData(), and SmearByResolution().
|
private |
Counts the Event cut rejected events.
Definition at line 375 of file QwVQWK_Channel.h.
Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
Previous Module-based sum of the four sub-blocks.
Definition at line 385 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Previous event sequence number for this channel.
Definition at line 362 of file QwVQWK_Channel.h.
Referenced by InitializeChannel().
|
private |
absolute value of the VQWK saturation volt
Definition at line 389 of file QwVQWK_Channel.h.
Referenced by CopyFrom(), GetVQWKSaturationLimt(), QwVQWK_Channel(), QwVQWK_Channel(), and SetVQWKSaturationLimt().
|
private |
Internal counter to keep track of the sequence number.
Definition at line 384 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Keep the sequence number of the last event.
Definition at line 383 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Event sequence number for this channel.
Definition at line 361 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), ClearEventData(), EncodeEventData(), FillTreeVector(), GetSequenceNumber(), MatchSequenceNumber(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), Product(), RandomizeEventData(), Ratio(), ScaledAdd(), and SetEventData().
|
private |
Sum of the data in the four sub-blocks raw.
Definition at line 341 of file QwVQWK_Channel.h.
Referenced by ClearEventData(), GetRawSoftwareSum(), operator=(), PrintInfo(), ProcessEvBuffer(), and SetRawEventData().
|
staticprivate |
Definition at line 317 of file QwVQWK_Channel.h.
Referenced by ConstructBranch(), and ConstructBranchAndVector().
|
staticprivate |
Definition at line 319 of file QwVQWK_Channel.h.
Referenced by GetBufferOffset().
|
static |
Definition at line 62 of file QwVQWK_Channel.h.
Referenced by RandomizeEventData().
|
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 323 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), GetAverageVolts(), and SetCalibrationToVolts().
|
staticprivate |
Definition at line 318 of file QwVQWK_Channel.h.
Referenced by GetBufferOffset(), and ProcessEvBuffer().