JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwMollerADC_Channel Class Reference

Concrete hardware channel for Moller ADC modules (6x32-bit words) More...

#include <QwMollerADC_Channel.h>

+ Inheritance diagram for QwMollerADC_Channel:
+ Collaboration diagram for QwMollerADC_Channel:

Public Member Functions

 QwMollerADC_Channel ()
 
 QwMollerADC_Channel (TString name, TString datatosave="raw")
 
 QwMollerADC_Channel (const QwMollerADC_Channel &value)
 
 QwMollerADC_Channel (const QwMollerADC_Channel &value, VQwDataElement::EDataToSave datatosave)
 
 ~QwMollerADC_Channel () override
 
void CopyFrom (const QwMollerADC_Channel &value)
 
VQwHardwareChannelClone (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 &paramfile) 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.
 
QwMollerADC_Channeloperator= (const QwMollerADC_Channel &value)
 
void AssignScaledValue (const QwMollerADC_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 QwMollerADC_Channel &value)
 
QwMollerADC_Channeloperator+= (const QwMollerADC_Channel &value)
 
QwMollerADC_Channeloperator-= (const QwMollerADC_Channel &value)
 
QwMollerADC_Channeloperator*= (const QwMollerADC_Channel &value)
 
VQwHardwareChanneloperator+= (const VQwHardwareChannel &input) override
 
VQwHardwareChanneloperator-= (const VQwHardwareChannel &input) override
 
VQwHardwareChanneloperator*= (const VQwHardwareChannel &input) override
 
VQwHardwareChanneloperator/= (const VQwHardwareChannel &input) override
 
const QwMollerADC_Channel operator+ (const QwMollerADC_Channel &value) const
 
const QwMollerADC_Channel operator- (const QwMollerADC_Channel &value) const
 
const QwMollerADC_Channel operator* (const QwMollerADC_Channel &value) const
 
void Sum (const QwMollerADC_Channel &value1, const QwMollerADC_Channel &value2)
 
void Difference (const QwMollerADC_Channel &value1, const QwMollerADC_Channel &value2)
 
void Ratio (const QwMollerADC_Channel &numer, const QwMollerADC_Channel &denom)
 
void Product (const QwMollerADC_Channel &value1, const QwMollerADC_Channel &value2)
 
void DivideBy (const QwMollerADC_Channel &denom)
 
void AddChannelOffset (Double_t Offset)
 
void Scale (Double_t Offset) override
 
void AccumulateRunningSum (const QwMollerADC_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 QwMollerADC_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 SetMollerADCSaturationLimt (Double_t sat_volts=8.5)
 
Double_t GetMollerADCSaturationLimt ()
 
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
 
void CopyParameters (const VQwHardwareChannel *valueptr) 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 QwMollerADC_Channel &yield)
 Blind this channel as a difference.
 
void ScaledAdd (Double_t scale, const VQwHardwareChannel *value) override
 
virtual void LoadMockDataParameters (QwParameterFile &paramfile)
 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 VQwHardwareChannelClone () const
 
- Public Member Functions inherited from VQwHardwareChannel
 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
 
VQwHardwareChanneloperator= (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)
 
void UpdateErrorFlag (const UInt_t &error)
 
- Public Member Functions inherited from VQwDataElement
 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
 
VQwDataElementoperator+= (const VQwDataElement &)
 Addition-assignment operator.
 
VQwDataElementoperator-= (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
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects.
 
- Public Member Functions inherited from MQwMockable
 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

QwMollerADC_Channeloperator/= (const QwMollerADC_Channel &value)
 
- Protected Member Functions inherited from VQwHardwareChannel
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().
 
- Protected Member Functions inherited from VQwDataElement
void SetNumberOfDataWords (const UInt_t &numwords)
 Set the number of data words in this data element.
 
VQwDataElementoperator= (const VQwDataElement &value)
 Arithmetic assignment operator: Should only copy event-based data.
 
void UpdateErrorFlag (const UInt_t &error)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor.
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor.
 
virtual ~MQwHistograms ()
 Virtual destructor.
 
MQwHistogramsoperator= (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.
 
Long64_t fBlockSumSq_raw [5]
 
Int_t fBlock_min [5]
 
Int_t fBlock_max [5]
 
Short_t fBlock_numSamples [5]
 
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 = 30
 
static const Int_t kMaxChannels = 8
 
ADC Calibration
static const Double_t kMollerADC_VoltsPerBit = (20./(1<<18))
 

Friends

std::ostream & operator<< (std::ostream &stream, const QwMollerADC_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 MollerADC 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

- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0 , kDerived , kMoments }
 
- Protected Attributes inherited from VQwHardwareChannel
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
 
- Protected Attributes inherited from VQwDataElement
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
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 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.
 

Detailed Description

Concrete hardware channel for Moller ADC modules (6x32-bit words)

Decodes and processes the data for a single Moller ADC channel and exposes block-level values, sums, and statistical moments. Supports single-event cuts, error propagation, blinding, and running statistics. Follows the dual-operator pattern to provide both type-specific operators and polymorphic operator overrides via VQwHardwareChannel.

Definition at line 44 of file QwMollerADC_Channel.h.

Constructor & Destructor Documentation

◆ QwMollerADC_Channel() [1/4]

QwMollerADC_Channel::QwMollerADC_Channel ( )
inline

Definition at line 72 of file QwMollerADC_Channel.h.

72 : MQwMockable() {
73 InitializeChannel("","");
74 SetMollerADCSaturationLimt(8.5);//set the default saturation limit
75 };
void InitializeChannel(TString name, TString datatosave) override
Initialize the fields in this object.
void SetMollerADCSaturationLimt(Double_t sat_volts=8.5)

References InitializeChannel(), MQwMockable::MQwMockable(), and SetMollerADCSaturationLimt().

Referenced by AccumulateRunningSum(), AccumulateRunningSum(), AddValueFrom(), ArcTan(), AssignScaledValue(), AssignValueFrom(), Blind(), Clone(), CopyFrom(), CopyParameters(), DeaccumulateRunningSum(), Difference(), DivideBy(), DivideBy(), MultiplyBy(), operator*(), operator*=(), operator*=(), operator+(), operator+=(), operator+=(), operator-(), operator-=(), operator-=(), operator/=(), operator/=(), operator<<, operator=(), Product(), QwMollerADC_Channel(), QwMollerADC_Channel(), Ratio(), ScaledAdd(), SetRawEventData(), SubtractValueFrom(), and Sum().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QwMollerADC_Channel() [2/4]

QwMollerADC_Channel::QwMollerADC_Channel ( TString name,
TString datatosave = "raw" )
inline

Definition at line 76 of file QwMollerADC_Channel.h.

76 : MQwMockable() {
77 InitializeChannel(name, datatosave);
78 SetMollerADCSaturationLimt(8.5);//set the default saturation limit
79 };

References InitializeChannel(), MQwMockable::MQwMockable(), and SetMollerADCSaturationLimt().

+ Here is the call graph for this function:

◆ QwMollerADC_Channel() [3/4]

QwMollerADC_Channel::QwMollerADC_Channel ( const QwMollerADC_Channel & value)
inline

Definition at line 80 of file QwMollerADC_Channel.h.

80 :
81 VQwHardwareChannel(value), MQwMockable(value),
85 {
86 *this = value;
87 };
UInt_t fNumberOfSamples_map
Number of samples in the expected to read through the module. This value is set in the QwBeamline map...
Double_t fSaturationABSLimit
absolute value of the MollerADC saturation volt

References fBlocksPerEvent, fNumberOfSamples_map, fSaturationABSLimit, MQwMockable::MQwMockable(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ QwMollerADC_Channel() [4/4]

QwMollerADC_Channel::QwMollerADC_Channel ( const QwMollerADC_Channel & value,
VQwDataElement::EDataToSave datatosave )
inline

Definition at line 88 of file QwMollerADC_Channel.h.

88 :
89 VQwHardwareChannel(value,datatosave), MQwMockable(value),
93 {
94 *this = value;
95 };

References fBlocksPerEvent, fNumberOfSamples_map, fSaturationABSLimit, MQwMockable::MQwMockable(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ ~QwMollerADC_Channel()

QwMollerADC_Channel::~QwMollerADC_Channel ( )
inlineoverride

Definition at line 96 of file QwMollerADC_Channel.h.

96{ };

Member Function Documentation

◆ AccumulateRunningSum() [1/2]

void QwMollerADC_Channel::AccumulateRunningSum ( const QwMollerADC_Channel & value,
Int_t count = 0,
Int_t ErrorMask = 0xFFFFFFF )

Accumulate event values into the running sum with optional scaling.

Parameters
valueSource channel to accumulate from.
countEvent count scaling (0 means use value.fGoodEventCount).
ErrorMaskBit 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 1523 of file QwMollerADC_Channel.cc.

1524{
1525 /*
1526 note:
1527 The AccumulateRunningSum is called on a dedicated subsystem array object and
1528 for the standard running avg computations we only need value.fErrorFlag==0
1529 events to be included in the running avg. So the "berror" conditions is only
1530 used for the stability check purposes.
1531
1532 The need for this check below came due to fact that when routine
1533 DeaccumulateRunningSum is called the errorflag is updated with
1534 the kBeamStabilityError flag (+ configuration flags for global errors) and
1535 need to make sure we remove this flag and any configuration flags before
1536 checking the (fErrorFlag != 0) condition
1537
1538 See how the stability check is implemented in the QwEventRing class
1539
1540 Rakitha
1541 */
1542
1543 if(count==0){
1544 count = value.fGoodEventCount;
1545 }
1546
1547 Int_t n1 = fGoodEventCount;
1548 Int_t n2 = count;
1549
1550 // If there are no good events, check the error flag
1551 if (n2 == 0 && (value.fErrorFlag == 0)) {
1552 n2 = 1;
1553 }
1554
1555 // If a single event is removed from the sum, check all but stability fail flags
1556 if (n2 == -1) {
1557 if ((value.fErrorFlag & ErrorMask) == 0) {
1558 n2 = -1;
1559 } else {
1560 n2 = 0;
1561 }
1562 }
1563
1564 if (ErrorMask == kPreserveError){
1565 //n = 1;
1566 if (n2 == 0) {
1567 n2 = 1;
1568 }
1569 if (count == -1) {
1570 n2 = -1;
1571 }
1572 }
1573
1574 // New total number of good events
1575 Int_t n = n1 + n2;
1576
1577 // Set up variables
1578 Double_t M11 = fHardwareBlockSum;
1579 Double_t M12 = value.fHardwareBlockSum;
1580 Double_t M22 = value.fHardwareBlockSumM2;
1581
1582 //if(this->GetElementName() == "bcm_an_ds3" && ErrorMask == kPreserveError){QwError << "count=" << fGoodEventCount << " n=" << n << QwLog::endl; }
1583 if (n2 == 0) {
1584 // no good events for addition
1585 return;
1586 } else if (n2 == -1) {
1587 // simple version for removal of single event from the sum
1589 if (n > 1) {
1590 fHardwareBlockSum -= (M12 - M11) / n;
1591 fHardwareBlockSumM2 -= (M12 - M11)
1592 * (M12 - fHardwareBlockSum); // note: using updated mean
1593 // and for individual blocks
1594 for (Int_t i = 0; i < 4; i++) {
1595 M11 = fBlock[i];
1596 M12 = value.fBlock[i];
1597 M22 = value.fBlockM2[i];
1598 fBlock[i] -= (M12 - M11) / n;
1599 fBlockM2[i] -= (M12 - M11) * (M12 - fBlock[i]); // note: using updated mean
1600 }
1601 } else if (n == 1) {
1602 fHardwareBlockSum -= (M12 - M11) / n;
1603 fHardwareBlockSumM2 -= (M12 - M11)
1604 * (M12 - fHardwareBlockSum); // note: using updated mean
1605 if (fabs(fHardwareBlockSumM2) < 10.*std::numeric_limits<double>::epsilon())
1606 fHardwareBlockSumM2 = 0; // rounding
1607 // and for individual blocks
1608 for (Int_t i = 0; i < 4; i++) {
1609 M11 = fBlock[i];
1610 M12 = value.fBlock[i];
1611 M22 = value.fBlockM2[i];
1612 fBlock[i] -= (M12 - M11) / n;
1613 fBlockM2[i] -= (M12 - M11) * (M12 - fBlock[i]); // note: using updated mean
1614 if (fabs(fBlockM2[i]) < 10.*std::numeric_limits<double>::epsilon())
1615 fBlockM2[i] = 0; // rounding
1616 }
1617 } else if (n == 0) {
1618 fHardwareBlockSum -= M12;
1619 fHardwareBlockSumM2 -= M22;
1620 if (fabs(fHardwareBlockSum) < 10.*std::numeric_limits<double>::epsilon())
1621 fHardwareBlockSum = 0; // rounding
1622 if (fabs(fHardwareBlockSumM2) < 10.*std::numeric_limits<double>::epsilon())
1623 fHardwareBlockSumM2 = 0; // rounding
1624 // and for individual blocks
1625 for (Int_t i = 0; i < 4; i++) {
1626 M11 = fBlock[i];
1627 M12 = value.fBlock[i];
1628 M22 = value.fBlockM2[i];
1629 fBlock[i] -= M12;
1630 fBlockM2[i] -= M22;
1631 if (fabs(fBlock[i]) < 10.*std::numeric_limits<double>::epsilon())
1632 fBlock[i] = 0; // rounding
1633 if (fabs(fBlockM2[i]) < 10.*std::numeric_limits<double>::epsilon())
1634 fBlockM2[i] = 0; // rounding
1635 }
1636 } else {
1637 QwWarning << "Running sum has deaccumulated to negative good events." << QwLog::endl;
1638 }
1639 } else if (n2 == 1) {
1640 // simple version for addition of single event
1642 fHardwareBlockSum += (M12 - M11) / n;
1643 fHardwareBlockSumM2 += (M12 - M11)
1644 * (M12 - fHardwareBlockSum); // note: using updated mean
1645 // and for individual blocks
1646 for (Int_t i = 0; i < 4; i++) {
1647 M11 = fBlock[i];
1648 M12 = value.fBlock[i];
1649 M22 = value.fBlockM2[i];
1650 fBlock[i] += (M12 - M11) / n;
1651 fBlockM2[i] += (M12 - M11) * (M12 - fBlock[i]); // note: using updated mean
1652 }
1653 } else if (n2 > 1) {
1654 // general version for addition of multi-event sets
1655 fGoodEventCount += n2;
1656 fHardwareBlockSum += n2 * (M12 - M11) / n;
1657 fHardwareBlockSumM2 += M22 + n1 * n2 * (M12 - M11) * (M12 - M11) / n;
1658 // and for individual blocks
1659 for (Int_t i = 0; i < 4; i++) {
1660 M11 = fBlock[i];
1661 M12 = value.fBlock[i];
1662 M22 = value.fBlockM2[i];
1663 fBlock[i] += n2 * (M12 - M11) / n;
1664 fBlockM2[i] += M22 + n1 * n2 * (M12 - M11) * (M12 - M11) / n;
1665 }
1666 }
1667
1668 // Nanny
1670 QwWarning << "Angry Nanny: NaN detected in " << GetElementName() << QwLog::endl;
1671}
#define QwWarning
Predefined log drain for warnings.
Definition QwLog.h:44
static const UInt_t kPreserveError
Definition QwTypes.h:186
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297
Double_t fHardwareBlockSum
Module-based sum of the four sub-blocks.
Double_t fBlockM2[4]
Second moment of the sub-block.
Double_t fBlock[4]
Array of the sub-block data.
Double_t fHardwareBlockSumM2
Second moment of the hardware sum.
UInt_t fGoodEventCount
Number of good events accumulated in this element.
virtual const TString & GetElementName() const
Get the name of this element.
UInt_t fErrorFlag
This the standard error code generated for the channel that contains the global/local/stability flags...

References QwLog::endl(), fBlock, fBlockM2, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSumM2, VQwDataElement::GetElementName(), kPreserveError, QwMollerADC_Channel(), and QwWarning.

Referenced by AccumulateRunningSum(), and DeaccumulateRunningSum().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AccumulateRunningSum() [2/2]

void QwMollerADC_Channel::AccumulateRunningSum ( const VQwHardwareChannel * value,
Int_t count = 0,
Int_t ErrorMask = 0xFFFFFFF )
inlineoverridevirtual

Reimplemented from VQwHardwareChannel.

Definition at line 191 of file QwMollerADC_Channel.h.

191 {
192 const QwMollerADC_Channel *tmp_ptr = dynamic_cast<const QwMollerADC_Channel*>(value);
193 if (tmp_ptr != NULL) {
194 AccumulateRunningSum(*tmp_ptr, count, ErrorMask);
195 } else {
196 throw std::invalid_argument("Standard exception from QwMollerADC_Channel::AccumulateRunningSum: incompatible hardware channel type");
197 }
198 };
void AccumulateRunningSum(const QwMollerADC_Channel &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)

References AccumulateRunningSum(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ AddChannelOffset()

void QwMollerADC_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 1444 of file QwMollerADC_Channel.cc.

1445{
1446 if (!IsNameEmpty()){
1447 fHardwareBlockSum += offset;
1448 for (Int_t i=0; i<fBlocksPerEvent; i++)
1449 fBlock[i] += offset;
1450 }
1451 return;
1452}
Bool_t IsNameEmpty() const
Is the name of this element empty?

References fBlock, fBlocksPerEvent, fHardwareBlockSum, and VQwDataElement::IsNameEmpty().

+ Here is the call graph for this function:

◆ AddValueFrom()

void QwMollerADC_Channel::AddValueFrom ( const VQwHardwareChannel * valueptr)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1140 of file QwMollerADC_Channel.cc.

1141{
1142 const QwMollerADC_Channel* tmpptr;
1143 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(valueptr);
1144 if (tmpptr!=NULL){
1145 *this += *tmpptr;
1146 } else {
1147 TString loc="Standard exception from QwMollerADC_Channel::AddValueFrom = "
1148 +valueptr->GetElementName()+" is an incompatible type.";
1149 throw std::invalid_argument(loc.Data());
1150 }
1151}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ ApplyHWChecks()

Int_t QwMollerADC_Channel::ApplyHWChecks ( )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 63 of file QwMollerADC_Channel.cc.

64{
65 Bool_t fEventIsGood=kTRUE;
66 Bool_t bStatus;
67 if (bEVENTCUTMODE>0){//Global switch to ON/OFF event cuts set at the event cut file
68
69 if (bDEBUG)
70 QwWarning<<" QwQWVK_Channel "<<GetElementName()<<" "<<GetNumberOfSamples()<<QwLog::endl;
71
72 // Sample size check
73 bStatus = MatchNumberOfSamples(fNumberOfSamples_map);//compare the default sample size with no.of samples read by the module
74 if (!bStatus) {
76 }
77
78 // Check SW and HW return the same sum
79 bStatus = (GetRawHardwareSum() == GetRawSoftwareSum());
80 //fEventIsGood = bStatus;
81 if (!bStatus) {
83 }
84
85
86
87 //check sequence number
89 if (fSequenceNo_Counter==0 || GetSequenceNumber()==0){//starting the data run
91 }
92
93 if (!MatchSequenceNumber(fSequenceNo_Prev)){//we have a sequence number error
94 fEventIsGood=kFALSE;
96 if (bDEBUG) QwWarning<<" QwQWVK_Channel "<<GetElementName()<<" Sequence number previous value = "<<fSequenceNo_Prev<<" Current value= "<< GetSequenceNumber()<<QwLog::endl;
97 }
98
100
101 //Checking for HW_sum is returning same value.
103 //std::cout<<" BCM hardware sum is different "<<std::endl;
106 }else
107 fADC_Same_NumEvt++;//hw_sum is same increment the counter
108
109 //check for the hw_sum is giving the same value
110 if (fADC_Same_NumEvt>0){//we have ADC stuck with same value
111 if (bDEBUG) QwWarning<<" BCM hardware sum is same for more than "<<fADC_Same_NumEvt<<" time consecutively "<<QwLog::endl;
113 }
114
115 //check for the hw_sum is zero
116 if (GetRawHardwareSum()==0){
118 }
119 if (!fEventIsGood)
120 fSequenceNo_Counter=0;//resetting the counter after ApplyHWChecks() a failure
121
123 if (bDEBUG)
124 QwWarning << this->GetElementName()<<" "<<GetRawHardwareSum() << "Saturating MollerADC invoked! " <<TMath::Abs(GetRawHardwareSum())*kMollerADC_VoltsPerBit/fNumberOfSamples<<" Limit "<<GetMollerADCSaturationLimt() << QwLog::endl;
126 }
127
128 }
129 else {
130 fGoodEventCount = 1;
131 fErrorFlag = 0;
132 }
133
134 return fErrorFlag;
135}
static const UInt_t kErrorFlag_ZeroHW
Definition QwTypes.h:164
static const UInt_t kErrorFlag_SW_HW
Definition QwTypes.h:161
static const UInt_t kErrorFlag_sample
Definition QwTypes.h:160
static const UInt_t kErrorFlag_VQWK_Sat
Definition QwTypes.h:159
static const UInt_t kErrorFlag_SameHW
Definition QwTypes.h:163
static const UInt_t kErrorFlag_Sequence
Definition QwTypes.h:162
Int_t GetRawSoftwareSum() const
Double_t fPrev_HardwareBlockSum
Previous Module-based sum of the four sub-blocks.
Int_t fSequenceNo_Counter
Internal counter to keep track of the sequence number.
Bool_t MatchSequenceNumber(size_t seqnum)
Double_t GetMollerADCSaturationLimt()
Int_t GetRawHardwareSum() const
Int_t fADC_Same_NumEvt
Keep track of how many events with same ADC value returned.
size_t GetNumberOfSamples() const
static const Bool_t bDEBUG
debugging display purposes
Int_t fSequenceNo_Prev
Keep the sequence number of the last event.
static const Double_t kMollerADC_VoltsPerBit
size_t GetSequenceNumber() const
UInt_t fNumberOfSamples
Number of samples read through the module.
Bool_t MatchNumberOfSamples(size_t numsamp)

References bDEBUG, VQwHardwareChannel::bEVENTCUTMODE, QwLog::endl(), fADC_Same_NumEvt, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fNumberOfSamples_map, fPrev_HardwareBlockSum, fSequenceNo_Counter, fSequenceNo_Prev, VQwDataElement::GetElementName(), GetMollerADCSaturationLimt(), GetNumberOfSamples(), GetRawHardwareSum(), GetRawSoftwareSum(), GetSequenceNumber(), kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, kErrorFlag_VQWK_Sat, kErrorFlag_ZeroHW, kMollerADC_VoltsPerBit, MatchNumberOfSamples(), MatchSequenceNumber(), and QwWarning.

+ Here is the call graph for this function:

◆ ApplySingleEventCuts() [1/2]

Bool_t QwMollerADC_Channel::ApplySingleEventCuts ( )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1829 of file QwMollerADC_Channel.cc.

1830{
1831 Bool_t status;
1832
1833 if (bEVENTCUTMODE>=2){//Global switch to ON/OFF event cuts set at the event cut file
1834
1835 if (fULimit < fLLimit){
1836 status=kTRUE;
1837 } else if (GetHardwareSum()<=fULimit && GetHardwareSum()>=fLLimit){
1838 if ((fErrorFlag)==0)
1839 status=kTRUE;
1840 else
1841 status=kFALSE;//If the device HW is failed
1842 }
1843 else{
1844 if (GetHardwareSum()> fULimit)
1846 else
1848 status=kFALSE;
1849 }
1850
1851 if (bEVENTCUTMODE==3){
1852 status=kTRUE; //Update the event cut fail flag but pass the event.
1853 }
1854
1855
1856 }
1857 else{
1858 status=kTRUE;
1859 //fErrorFlag=0;//we need to keep the device error codes
1860 }
1861
1862 return status;
1863}
static const UInt_t kErrorFlag_EventCut_L
Definition QwTypes.h:165
static const UInt_t kErrorFlag_EventCut_U
Definition QwTypes.h:166
Double_t GetHardwareSum() const

References VQwHardwareChannel::bEVENTCUTMODE, VQwDataElement::fErrorFlag, VQwHardwareChannel::fLLimit, VQwHardwareChannel::fULimit, GetHardwareSum(), kErrorFlag_EventCut_L, and kErrorFlag_EventCut_U.

+ Here is the call graph for this function:

◆ ApplySingleEventCuts() [2/2]

Bool_t QwMollerADC_Channel::ApplySingleEventCuts ( Double_t LL,
Double_t UL )

Definition at line 1813 of file QwMollerADC_Channel.cc.

1814{
1815 Bool_t status = kFALSE;
1816
1817 if (UL < LL){
1818 status=kTRUE;
1819 } else if (GetHardwareSum()<=UL && GetHardwareSum()>=LL){
1820 if ((fErrorFlag & kPreserveError)!=0)
1821 status=kTRUE;
1822 else
1823 status=kFALSE;//If the device HW is failed
1824 }
1825 std::cout<<(this->fErrorFlag & kPreserveError)<<std::endl;
1826 return status;
1827}

References VQwDataElement::fErrorFlag, GetHardwareSum(), and kPreserveError.

+ Here is the call graph for this function:

◆ ArcTan()

void QwMollerADC_Channel::ArcTan ( const QwMollerADC_Channel & value)

Definition at line 1407 of file QwMollerADC_Channel.cc.

1408{
1409 if (!IsNameEmpty()) {
1410 this->fHardwareBlockSum = 0.0;
1411 for (Int_t i=0; i<fBlocksPerEvent; i++) {
1412 this->fBlock[i] = atan(value.fBlock[i]);
1413 this->fHardwareBlockSum += this->fBlock[i];
1414 }
1416 }
1417
1418 return;
1419}

References fBlock, fBlocksPerEvent, fHardwareBlockSum, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

Referenced by QwEnergyCalculator::GetProjectedPosition(), and QwEnergyCalculator::ProcessEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AssignScaledValue()

void QwMollerADC_Channel::AssignScaledValue ( const QwMollerADC_Channel & value,
Double_t scale )

Definition at line 1107 of file QwMollerADC_Channel.cc.

1109{
1110 if(this == &value) return;
1111
1112 if (!IsNameEmpty()) {
1113 for (Int_t i=0; i<fBlocksPerEvent; i++){
1114 this->fBlock[i] = value.fBlock[i] * scale;
1115 this->fBlockM2[i] = value.fBlockM2[i] * scale * scale;
1116
1117 }
1118 this->fHardwareBlockSum = value.fHardwareBlockSum * scale;
1119 this->fHardwareBlockSumM2 = value.fHardwareBlockSumM2 * scale * scale;
1120 this->fHardwareBlockSumError = value.fHardwareBlockSumError; // Keep this?
1121 this->fGoodEventCount = value.fGoodEventCount;
1122 this->fNumberOfSamples = value.fNumberOfSamples;
1123 this->fSequenceNumber = value.fSequenceNumber;
1124 this->fErrorFlag = value.fErrorFlag;
1125 }
1126}
UInt_t fSequenceNumber
Event sequence number for this channel.
Double_t fHardwareBlockSumError
Uncertainty on the hardware sum.

References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

Referenced by QwIntegrationPMT::RandomizeMollerEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AssignValueFrom()

void QwMollerADC_Channel::AssignValueFrom ( const VQwDataElement * valueptr)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1128 of file QwMollerADC_Channel.cc.

1129{
1130 const QwMollerADC_Channel* tmpptr;
1131 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(valueptr);
1132 if (tmpptr!=NULL){
1133 *this = *tmpptr;
1134 } else {
1135 TString loc="Standard exception from QwMollerADC_Channel::AssignValueFrom = "
1136 +valueptr->GetElementName()+" is an incompatible type.";
1137 throw std::invalid_argument(loc.Data());
1138 }
1139}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwDataElement::VQwDataElement().

Referenced by QwEnergyCalculator::GetProjectedPosition(), and QwEnergyCalculator::ProcessEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Blind() [1/2]

void QwMollerADC_Channel::Blind ( const QwBlinder * blinder)

Blind this channel as an asymmetry.

Blind this channel as an asymmetry

Parameters
blinderBlinder

Definition at line 1746 of file QwMollerADC_Channel.cc.

1747{
1748 if (!IsNameEmpty()) {
1749 if (blinder->IsBlinderOkay() && ((fErrorFlag)==0) ){
1750 for (Int_t i = 0; i < fBlocksPerEvent; i++)
1751 blinder->BlindValue(fBlock[i]);
1752 blinder->BlindValue(fHardwareBlockSum);
1753 } else {
1755 for (Int_t i = 0; i < fBlocksPerEvent; i++)
1758 }
1759 }
1760 return;
1761}
const Bool_t & IsBlinderOkay() const
Definition QwBlinder.h:206
void ModifyThisErrorCode(UInt_t &errorcode) const
Definition QwBlinder.h:119
void BlindValue(Double_t &value) const
Asymmetry blinding.
Definition QwBlinder.h:124
static constexpr const Double_t kValue_BlinderFail
Definition QwBlinder.h:79

References QwBlinder::BlindValue(), fBlock, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), QwBlinder::kValue_BlinderFail, and QwBlinder::ModifyThisErrorCode().

+ Here is the call graph for this function:

◆ Blind() [2/2]

void QwMollerADC_Channel::Blind ( const QwBlinder * blinder,
const QwMollerADC_Channel & yield )

Blind this channel as a difference.

Blind this channel as a difference with specified yield

Parameters
blinderBlinder
yieldCorresponding yield

Definition at line 1768 of file QwMollerADC_Channel.cc.

1769{
1770 if (!IsNameEmpty()) {
1771 if (blinder->IsBlinderOkay() && ((fErrorFlag) ==0) ){
1772 for (Int_t i = 0; i < fBlocksPerEvent; i++)
1773 blinder->BlindValue(fBlock[i], yield.fBlock[i]);
1775 } else {
1776 blinder->ModifyThisErrorCode(fErrorFlag);//update the HW error code
1777 for (Int_t i = 0; i < fBlocksPerEvent; i++)
1780 }
1781 }
1782 return;
1783}

References QwBlinder::BlindValue(), fBlock, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), QwBlinder::kValue_BlinderFail, QwBlinder::ModifyThisErrorCode(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ CalculateRunningAverage()

void QwMollerADC_Channel::CalculateRunningAverage ( )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1674 of file QwMollerADC_Channel.cc.

1675{
1676 if (fGoodEventCount <= 0)
1677 {
1678 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
1679 fBlockError[i] = 0.0;
1680 }
1682 }
1683 else
1684 {
1685 // We use a biased estimator by dividing by n. Use (n - 1) to get the
1686 // unbiased estimator for the standard deviation.
1687 //
1688 // Note we want to calculate the error here, not sigma:
1689 // sigma = sqrt(M2 / n);
1690 // error = sigma / sqrt (n) = sqrt(M2) / n;
1691 for (Int_t i = 0; i < fBlocksPerEvent; i++)
1692 fBlockError[i] = sqrt(fBlockM2[i]) / fGoodEventCount;
1694
1695 // Stability check 83951872
1697 // check to see the channel has stability cut activated in the event cut file
1698 if (GetValueWidth() > fStability){
1699 // if the width is greater than the stability required flag the event
1701 } else
1702 fErrorFlag = 0;
1703 }
1704 }
1705}
static const UInt_t kBeamStabilityError
Definition QwTypes.h:180
static const UInt_t kStabilityCut
Definition QwTypes.h:184
Double_t fBlockError[4]
Uncertainty on the sub-block.
Double_t GetValueWidth() const
UInt_t fErrorConfigFlag
contains the global/local/stability flags

References fBlockError, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorConfigFlag, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSumError, fHardwareBlockSumM2, VQwHardwareChannel::fStability, GetValueWidth(), kBeamStabilityError, and kStabilityCut.

+ Here is the call graph for this function:

◆ ClearEventData()

void QwMollerADC_Channel::ClearEventData ( )
overridevirtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

Definition at line 247 of file QwMollerADC_Channel.cc.

248{
249 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
250 fBlock_raw[i] = 0;
251 fBlockSumSq_raw[i] = 0;
252 fBlock_min[i] = 0;
253 fBlock_max[i] = 0;
254 fBlock[i] = 0.0;
255 fBlockM2[i] = 0.0;
256 fBlockError[i] = 0.0;
257 }
260 fHardwareBlockSum = 0.0;
263 fSequenceNumber = 0;
265 fGoodEventCount = 0;
266 fErrorFlag=0;
267 return;
268}
Int_t fSoftwareBlockSum_raw
Sum of the data in the four sub-blocks raw.
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.

References fBlock, fBlock_max, fBlock_min, fBlock_raw, fBlockError, fBlockM2, fBlocksPerEvent, fBlockSumSq_raw, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, and fSoftwareBlockSum_raw.

Referenced by QwEnergyCalculator::GetProjectedPosition(), InitializeChannel(), and QwEnergyCalculator::ProcessEvent().

+ Here is the caller graph for this function:

◆ Clone() [1/2]

virtual VQwHardwareChannel * VQwHardwareChannel::Clone ( ) const
inlinevirtual

Reimplemented from VQwHardwareChannel.

Definition at line 112 of file VQwHardwareChannel.h.

112 {
113 return Clone(this->fDataToSave);
114 };
virtual VQwHardwareChannel * Clone() const

◆ Clone() [2/2]

VQwHardwareChannel * QwMollerADC_Channel::Clone ( VQwDataElement::EDataToSave datatosave) const
inlineoverridevirtual

Implements VQwHardwareChannel.

Definition at line 109 of file QwMollerADC_Channel.h.

109 {
110 return new QwMollerADC_Channel(*this,datatosave);
111 };

References QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ ConstructBranch()

void QwMollerADC_Channel::ConstructBranch ( TTree * tree,
TString & prefix )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 776 of file QwMollerADC_Channel.cc.

777{
778 // This channel is not used, so skip setting up the tree.
779 if (IsNameEmpty()) return;
780
781 TString basename = prefix + GetElementName();
782 tree->Branch(basename,&fHardwareBlockSum,basename+"/D");
783 if (kDEBUG){
784 std::cerr << "QwMollerADC_Channel::ConstructBranchAndVector: fTreeArrayIndex==" << fTreeArrayIndex
785 << "; fTreeArrayNumEntries==" << fTreeArrayNumEntries
786 << std::endl;
787 }
788}
static const Bool_t kDEBUG

References fHardwareBlockSum, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), and kDEBUG.

+ Here is the call graph for this function:

◆ ConstructBranchAndVector()

void QwMollerADC_Channel::ConstructBranchAndVector ( TTree * tree,
TString & prefix,
QwRootTreeBranchVector & values )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 681 of file QwMollerADC_Channel.cc.

682{
683 // This channel is not used, so skip setting up the tree.
684 if (IsNameEmpty()) return;
685
686 // Decide what to store based on prefix
687 SetDataToSaveByPrefix(prefix);
688
689 TString basename = prefix(0, (prefix.First("|") >= 0)? prefix.First("|"): prefix.Length()) + GetElementName();
690 fTreeArrayIndex = values.size();
691
692 TString list = "";
693
699 bDevice_Error_Code = gQwHists.MatchVQWKElementFromList(GetSubsystemName().Data(), GetModuleType().Data(), "Device_Error_Code");
701
702 if (bHw_sum) {
703 values.push_back("hw_sum", 'D');
704 if (fDataToSave == kMoments) {
705 values.push_back("hw_sum_m2", 'D');
706 values.push_back("hw_sum_err", 'D');
707 }
708 }
709
710 if (bBlock) {
711 values.push_back("block0", 'D');
712 values.push_back("block1", 'D');
713 values.push_back("block2", 'D');
714 values.push_back("block3", 'D');
715 }
716
717 if (bNum_samples) {
718 values.push_back("num_samples", 'i');
719 }
720
721 if (bDevice_Error_Code) {
722 values.push_back("Device_Error_Code", 'i');
723 }
724
725 if (fDataToSave == kRaw) {
726 if (bHw_sum_raw) {
727 values.push_back("hw_sum_raw", 'I');
728 }
729 if (bBlock_raw) {
730 values.push_back("block0_raw", 'I');
731 values.push_back("block1_raw", 'I');
732 values.push_back("block2_raw", 'I');
733 values.push_back("block3_raw", 'I');
734 }
735
736 for (int i = 0; i < 4; i++) {
737 if (bBlock_raw) {
738 values.push_back(Form("SumSq_%d", i), 'L');
739 values.push_back(Form("RawMin_%d", i), 'I');
740 values.push_back(Form("RawMax_%d", i), 'I');
741 }
742 }
743
744 if (bSequence_number) {
745 values.push_back("sequence_number", 'i');
746 }
747 }
748
749 std::string leaf_list = values.LeafList(fTreeArrayIndex);
750
752
753 if (gQwHists.MatchDeviceParamsFromList(basename.Data())
756
757 // This is for the RT mode
758 if (leaf_list == "hw_sum/D")
759 leaf_list = basename+"/D";
760
761 if (kDEBUG)
762 QwMessage << "base name " << basename << " List " << leaf_list << QwLog::endl;
763
764 tree->Branch(basename, &(values[fTreeArrayIndex]), leaf_list.c_str());
765 }
766
767 if (kDEBUG) {
768 std::cerr << "QwMollerADC_Channel::ConstructBranchAndVector: fTreeArrayIndex==" << fTreeArrayIndex
769 << "; fTreeArrayNumEntries==" << fTreeArrayNumEntries
770 << "; values.size()==" << values.size()
771 << "; list==" << leaf_list
772 << std::endl;
773 }
774}
QwHistogramHelper gQwHists
Globally defined instance of the QwHistogramHelper class.
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49
Bool_t MatchVQWKElementFromList(const std::string &subsystemname, const std::string &moduletype, const std::string &devicename)
Bool_t MatchDeviceParamsFromList(const std::string &devicename)
size_type size() const noexcept
Definition QwRootFile.h:81
std::string LeafList(size_type start_index=0) const
Definition QwRootFile.h:228
void push_back(const std::string &name, const char type='D')
Definition QwRootFile.h:195
TString GetSubsystemName() const
Return the name of the inheriting subsystem name.
TString GetModuleType() const
Return the type of the beam instrument.
void SetDataToSaveByPrefix(const TString &prefix)
Set the flag indicating if raw or derived values are in this data element based on prefix.

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().

+ Here is the call graph for this function:

◆ ConstructHistograms()

void QwMollerADC_Channel::ConstructHistograms ( TDirectory * folder,
TString & prefix )
overridevirtual

Construct the histograms for this data element.

Implements VQwDataElement.

Definition at line 575 of file QwMollerADC_Channel.cc.

576{
577 // If we have defined a subdirectory in the ROOT file, then change into it.
578 if (folder != NULL) folder->cd();
579
580 if (IsNameEmpty()){
581 // This channel is not used, so skip filling the histograms.
582 } else {
583 // Now create the histograms.
584 SetDataToSaveByPrefix(prefix);
585
586 TString basename = prefix + GetElementName();
587
588 if(fDataToSave==kRaw)
589 {
590 fHistograms.resize(8+2+1, NULL);
591 size_t index=0;
592 for (Int_t i=0; i<fBlocksPerEvent; i++){
593 fHistograms[index] = gQwHists.Construct1DHist(basename+Form("_block%d_raw",i));
594 fHistograms[index+1] = gQwHists.Construct1DHist(basename+Form("_block%d",i));
595 index += 2;
596 }
597 fHistograms[index] = gQwHists.Construct1DHist(basename+Form("_hw_raw"));
598 fHistograms[index+1] = gQwHists.Construct1DHist(basename+Form("_hw"));
599 index += 2;
600 fHistograms[index] = gQwHists.Construct1DHist(basename+Form("_sw-hw_raw"));
601 }
602 else if(fDataToSave==kDerived)
603 {
604 fHistograms.resize(4+1+1, NULL);
605 Int_t index=0;
606 for (Int_t i=0; i<fBlocksPerEvent; i++){
607 fHistograms[index] = gQwHists.Construct1DHist(basename+Form("_block%d",i));
608 index += 1;
609 }
610 fHistograms[index] = gQwHists.Construct1DHist(basename+Form("_hw"));
611 index += 1;
612 fHistograms[index] = gQwHists.Construct1DHist(basename+Form("_dev_err"));
613 index += 1;
614 }
615 else
616 {
617 // this is not recognized
618 }
619
620 }
621}
std::vector< TH1_ptr > fHistograms
Histograms associated with this data element.
TH1F * Construct1DHist(const TString &inputfile, const TString &name_title)

References fBlocksPerEvent, VQwHardwareChannel::fDataToSave, MQwHistograms::fHistograms, VQwDataElement::GetElementName(), gQwHists, VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, VQwDataElement::kRaw, and VQwHardwareChannel::SetDataToSaveByPrefix().

+ Here is the call graph for this function:

◆ CopyFrom()

void QwMollerADC_Channel::CopyFrom ( const QwMollerADC_Channel & value)
inline

Definition at line 98 of file QwMollerADC_Channel.h.

98 {
103 *this = value;
104 };
void CopyFrom(const VQwHardwareChannel &value)

References VQwHardwareChannel::CopyFrom(), fBlocksPerEvent, fNumberOfSamples_map, fSaturationABSLimit, and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ CopyParameters()

void QwMollerADC_Channel::CopyParameters ( const VQwHardwareChannel * valueptr)
overridevirtual

Reimplemented from VQwHardwareChannel.

Definition at line 1939 of file QwMollerADC_Channel.cc.

1939 {
1940 const QwMollerADC_Channel* tmpptr;
1941 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(valueptr);
1942 if (tmpptr!=NULL){
1946 } else {
1947 TString loc="Standard exception from QwMollerADC_Channel::CopyParameters"
1948 +valueptr->GetElementName()+" "
1949 +this->GetElementName()+" are not of the same type";
1950 throw(std::invalid_argument(loc.Data()));
1951 }
1952};
Double_t fMockGaussianSigma
Sigma of normal distribution.

References MQwMockable::fMockGaussianSigma, fNumberOfSamples, fNumberOfSamples_map, VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ DeaccumulateRunningSum() [1/2]

void QwMollerADC_Channel::DeaccumulateRunningSum ( const QwMollerADC_Channel & value,
Int_t ErrorMask = 0xFFFFFFF )
inline

Definition at line 200 of file QwMollerADC_Channel.h.

200 {
201 AccumulateRunningSum(value, -1, ErrorMask);
202 };

References AccumulateRunningSum(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ DeaccumulateRunningSum() [2/2]

virtual void VQwHardwareChannel::DeaccumulateRunningSum ( const VQwHardwareChannel * value,
Int_t ErrorMask = 0xFFFFFFF )
inlinevirtual

Reimplemented from VQwHardwareChannel.

Definition at line 255 of file VQwHardwareChannel.h.

255 {
256 AccumulateRunningSum(value, -1, ErrorMask);
257 };

◆ Difference()

void QwMollerADC_Channel::Difference ( const QwMollerADC_Channel & value1,
const QwMollerADC_Channel & value2 )

Definition at line 1328 of file QwMollerADC_Channel.cc.

1329{
1330 *this = value1;
1331 *this -= value2;
1332}

References QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ DivideBy() [1/2]

void QwMollerADC_Channel::DivideBy ( const QwMollerADC_Channel & denom)

Definition at line 1467 of file QwMollerADC_Channel.cc.

1468{
1469 *this /= denom;
1470}

References QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ DivideBy() [2/2]

void QwMollerADC_Channel::DivideBy ( const VQwHardwareChannel * valueptr)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1176 of file QwMollerADC_Channel.cc.

1177{
1178 const QwMollerADC_Channel* tmpptr;
1179 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(valueptr);
1180 if (tmpptr!=NULL){
1181 *this /= *tmpptr;
1182 } else {
1183 TString loc="Standard exception from QwMollerADC_Channel::DivideBy = "
1184 +valueptr->GetElementName()+" is an incompatible type.";
1185 throw std::invalid_argument(loc.Data());
1186 }
1187}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ EncodeEventData()

void QwMollerADC_Channel::EncodeEventData ( std::vector< UInt_t > & buffer)
overridevirtual

Encode the event data into a CODA buffer.

Implements MQwMockable.

Definition at line 412 of file QwMollerADC_Channel.cc.

413{
414 Long_t localbuf[kWordsPerChannel] = {0};
415
416 if (IsNameEmpty()) {
417 // This channel is not used, but is present in the data stream.
418 // Skip over this data.
419 } else {
420 // localbuf[4] = 0;
421 for (Int_t i = 0; i < 4; i++) {
422 localbuf[i*5] = fBlock_raw[i];
423 localbuf[i*5+1] = fBlockSumSq_raw[i] & 0xffffffff;
424 localbuf[i*5+2] = fBlockSumSq_raw[i] >> 32;
425 localbuf[i*5+3] = fBlock_min[i];
426 localbuf[i*5+4] = fBlock_max[i];
427
428 // localbuf[4] += localbuf[i]; // fHardwareBlockSum_raw
429 }
430 // The following causes many rounding errors and skips due to the check
431 // that fHardwareBlockSum_raw == fSoftwareBlockSum_raw in IsGoodEvent().
432 localbuf[20] = fHardwareBlockSum_raw;
433 localbuf[21] = fBlockSumSq_raw[4] & 0xffffffff;
434 localbuf[22] = fBlockSumSq_raw[4] >> 32;
435 localbuf[23] = fBlock_min[4];
436 localbuf[24] = fBlock_max[4];
437 localbuf[25] = (fNumberOfSamples << 16 & 0xFFFF0000)
438 | (fSequenceNumber << 8 & 0x0000FF00);
439
440 for (Int_t i = 0; i < kWordsPerChannel; i++){
441 buffer.push_back(localbuf[i]);
442 }
443 }
444}
static const Int_t kWordsPerChannel

References fBlock_max, fBlock_min, fBlock_raw, fBlockSumSq_raw, fHardwareBlockSum_raw, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and kWordsPerChannel.

+ Here is the call graph for this function:

◆ FillHistograms()

void QwMollerADC_Channel::FillHistograms ( )
overridevirtual

Fill the histograms for this data element.

Implements VQwDataElement.

Definition at line 623 of file QwMollerADC_Channel.cc.

624{
625 Int_t index=0;
626
627 if (IsNameEmpty())
628 {
629 // This channel is not used, so skip creating the histograms.
630 } else
631 {
632 if(fDataToSave==kRaw)
633 {
634 for (Int_t i=0; i<fBlocksPerEvent; i++)
635 {
636 if (fHistograms[index] != NULL && (fErrorFlag)==0)
637 fHistograms[index]->Fill(this->GetRawBlockValue(i));
638 if (fHistograms[index+1] != NULL && (fErrorFlag)==0)
639 fHistograms[index+1]->Fill(this->GetBlockValue(i));
640 index+=2;
641 }
642 if (fHistograms[index] != NULL && (fErrorFlag)==0)
643 fHistograms[index]->Fill(this->GetRawHardwareSum());
644 if (fHistograms[index+1] != NULL && (fErrorFlag)==0)
645 fHistograms[index+1]->Fill(this->GetHardwareSum());
646 index+=2;
647 if (fHistograms[index] != NULL && (fErrorFlag)==0)
648 fHistograms[index]->Fill(this->GetRawSoftwareSum()-this->GetRawHardwareSum());
649 }
650 else if(fDataToSave==kDerived)
651 {
652 for (Int_t i=0; i<fBlocksPerEvent; i++)
653 {
654 if (fHistograms[index] != NULL && (fErrorFlag)==0)
655 fHistograms[index]->Fill(this->GetBlockValue(i));
656 index+=1;
657 }
658 if (fHistograms[index] != NULL && (fErrorFlag)==0)
659 fHistograms[index]->Fill(this->GetHardwareSum());
660 index+=1;
661 if (fHistograms[index] != NULL){
663 fHistograms[index]->Fill(kErrorFlag_sample);
665 fHistograms[index]->Fill(kErrorFlag_SW_HW);
667 fHistograms[index]->Fill(kErrorFlag_Sequence);
669 fHistograms[index]->Fill(kErrorFlag_ZeroHW);
671 fHistograms[index]->Fill(kErrorFlag_VQWK_Sat);
673 fHistograms[index]->Fill(kErrorFlag_SameHW);
674 }
675
676 }
677
678 }
679}
Int_t GetRawBlockValue(size_t blocknum) const
Double_t GetBlockValue(size_t blocknum) const

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.

+ Here is the call graph for this function:

◆ FillTreeVector()

void QwMollerADC_Channel::FillTreeVector ( QwRootTreeBranchVector & values) const
overridevirtual

Implements VQwHardwareChannel.

Definition at line 791 of file QwMollerADC_Channel.cc.

792{
793 if (IsNameEmpty()) {
794 // This channel is not used, so skip filling the tree vector.
795 } else if (fTreeArrayNumEntries <= 0) {
796 if (bDEBUG) std::cerr << "QwMollerADC_Channel::FillTreeVector: fTreeArrayNumEntries=="
797 << fTreeArrayNumEntries << std::endl;
798 } else if (values.size() < fTreeArrayIndex+fTreeArrayNumEntries){
799 if (bDEBUG) std::cerr << "QwMollerADC_Channel::FillTreeVector: values.size()=="
800 << values.size()
801 << "; fTreeArrayIndex+fTreeArrayNumEntries=="
803 << std::endl;
804 } else {
805
806 UInt_t index = fTreeArrayIndex;
807
808 // hw_sum
809 if (bHw_sum) {
810 values.SetValue(index++, this->GetHardwareSum());
811 if (fDataToSave == kMoments) {
812 values.SetValue(index++, this->GetHardwareSumM2());
813 values.SetValue(index++, this->GetHardwareSumError());
814 }
815 }
816
817 if (bBlock) {
818 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
819 // blocki
820 values.SetValue(index++, this->GetBlockValue(i));
821 }
822 }
823
824 // num_samples
825 if (bNum_samples)
826 values.SetValue(index++, (fDataToSave == kMoments)? this->fGoodEventCount: this->fNumberOfSamples);
827 // Device_Error_Code
829 values.SetValue(index++, this->fErrorFlag);
830
831 if (fDataToSave == kRaw)
832 {
833 // hw_sum_raw
834 if (bHw_sum_raw)
835 values.SetValue(index++, this->GetRawHardwareSum());
836
837 if (bBlock_raw) {
838 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
839 // blocki_raw
840 values.SetValue(index++, this->GetRawBlockValue(i));
841 }
842 }
843
844 if (bBlock_raw) {
845 for (int i = 0; i < 4; i++) {
846 values.SetValue(index++, fBlockSumSq_raw[i]);
847 values.SetValue(index++, fBlock_min[i]);
848 values.SetValue(index++, fBlock_max[i]);
849 }
850 }
851 // sequence_number
853 values.SetValue(index++, this->fSequenceNumber);
854 }
855 }
856}
Double_t GetHardwareSumM2() const
Double_t GetHardwareSumError() const
void SetValue(size_type index, Double_t val)
Definition QwRootFile.h:108

References bBlock, bBlock_raw, bDEBUG, bDevice_Error_Code, bHw_sum, bHw_sum_raw, bNum_samples, bSequence_number, fBlock_max, fBlock_min, fBlocksPerEvent, fBlockSumSq_raw, 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().

+ Here is the call graph for this function:

◆ ForceMapfileSampleSize()

void QwMollerADC_Channel::ForceMapfileSampleSize ( )
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 134 of file QwMollerADC_Channel.h.

References fNumberOfSamples, and fNumberOfSamples_map.

◆ GetAverageVolts()

Double_t QwMollerADC_Channel::GetAverageVolts ( ) const

Definition at line 536 of file QwMollerADC_Channel.cc.

537{
538 //Double_t avgVolts = (fBlock[0]+fBlock[1]+fBlock[2]+fBlock[3])*kMollerADC_VoltsPerBit/fNumberOfSamples;
540 //std::cout<<"QwMollerADC_Channel::GetAverageVolts() = "<<avgVolts<<std::endl;
541 return avgVolts;
542
543}

References fHardwareBlockSum, fNumberOfSamples, and kMollerADC_VoltsPerBit.

◆ GetBlockErrorValue()

Double_t QwMollerADC_Channel::GetBlockErrorValue ( size_t blocknum) const
inlineprivate

Definition at line 305 of file QwMollerADC_Channel.h.

305{ return GetValueError(blocknum+1);};
Double_t GetValueError() const

References GetValueError().

Referenced by PrintValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBlockValue()

Double_t QwMollerADC_Channel::GetBlockValue ( size_t blocknum) const
inlineprivate

Definition at line 304 of file QwMollerADC_Channel.h.

304{ return GetValue(blocknum+1);};
Double_t GetValue() const

References GetValue().

Referenced by FillHistograms(), FillTreeVector(), and PrintValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBufferOffset()

Int_t QwMollerADC_Channel::GetBufferOffset ( Int_t moduleindex,
Int_t channelindex )
static

Class: QwMollerADC_Channel Base class containing decoding functions for the MollerADC_Channel 6 32-bit datawords. The functions in this class will decode a single channel worth of MollerADC_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.

Parameters
moduleindexModule index within this buffer; counts from zero
channelindexChannel index within this module; counts from zero
Returns
The number of words offset to the beginning of this channel's data from the beginning of the MollerADC buffer.

Definition at line 42 of file QwMollerADC_Channel.cc.

42 {
43 Int_t offset = -1;
44 if (moduleindex<0 ){
45 QwError << "QwMollerADC_Channel::GetBufferOffset: Invalid module index,"
46 << moduleindex
47 << ". Must be zero or greater."
48 << QwLog::endl;
49 } else if (channelindex<0 || channelindex>kMaxChannels){
50 QwError << "QwMollerADC_Channel::GetBufferOffset: Invalid channel index,"
51 << channelindex
52 << ". Must be in range [0," << kMaxChannels << "]."
53 << QwLog::endl;
54 } else {
55 offset = ( (moduleindex * kMaxChannels) + channelindex )
57 }
58 return offset;
59 }
#define QwError
Predefined log drain for errors.
Definition QwLog.h:39
static const Int_t kMaxChannels

References QwLog::endl(), kMaxChannels, kWordsPerChannel, and QwError.

Referenced by VQwDetectorArray::LoadChannelMap(), and QwBeamDetectorID::QwBeamDetectorID().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHardwareSum()

Double_t QwMollerADC_Channel::GetHardwareSum ( ) const
inlineprivate

Definition at line 307 of file QwMollerADC_Channel.h.

307{ return GetValue(0);};

References GetValue().

Referenced by ApplySingleEventCuts(), ApplySingleEventCuts(), FillHistograms(), FillTreeVector(), operator<<, and PrintValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHardwareSumError()

Double_t QwMollerADC_Channel::GetHardwareSumError ( ) const
inlineprivate

Definition at line 310 of file QwMollerADC_Channel.h.

310{ return GetValueError(0); };

References GetValueError().

Referenced by FillTreeVector(), and PrintValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHardwareSumM2()

Double_t QwMollerADC_Channel::GetHardwareSumM2 ( ) const
inlineprivate

Definition at line 308 of file QwMollerADC_Channel.h.

308{ return GetValueM2(0); };
Double_t GetValueM2() const

References GetValueM2().

Referenced by FillTreeVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHardwareSumWidth()

Double_t QwMollerADC_Channel::GetHardwareSumWidth ( ) const
inlineprivate

Definition at line 309 of file QwMollerADC_Channel.h.

309{ return GetValueWidth(0); };

References GetValueWidth().

Referenced by PrintValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMollerADCSaturationLimt()

Double_t QwMollerADC_Channel::GetMollerADCSaturationLimt ( )
inline

Definition at line 228 of file QwMollerADC_Channel.h.

228 {//Get the absolute staturation limit in volts.
229 return fSaturationABSLimit;
230 }

References fSaturationABSLimit.

Referenced by ApplyHWChecks().

+ Here is the caller graph for this function:

◆ GetNumberOfSamples()

size_t QwMollerADC_Channel::GetNumberOfSamples ( ) const
inline

Definition at line 277 of file QwMollerADC_Channel.h.

277{return (fNumberOfSamples);};

References fNumberOfSamples.

Referenced by ApplyHWChecks().

+ Here is the caller graph for this function:

◆ GetRawBlockValue()

Int_t QwMollerADC_Channel::GetRawBlockValue ( size_t blocknum) const
inlineprivate

Definition at line 313 of file QwMollerADC_Channel.h.

313{return GetRawValue(blocknum+1);};

References GetRawValue().

Referenced by FillHistograms(), and FillTreeVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRawHardwareSum()

Int_t QwMollerADC_Channel::GetRawHardwareSum ( ) const
inlineprivate

Definition at line 314 of file QwMollerADC_Channel.h.

314{ return GetRawValue(0);};

References GetRawValue().

Referenced by ApplyHWChecks(), FillHistograms(), and FillTreeVector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRawSoftwareSum()

Int_t QwMollerADC_Channel::GetRawSoftwareSum ( ) const
inlineprivate

Definition at line 315 of file QwMollerADC_Channel.h.

315{return fSoftwareBlockSum_raw;};

References fSoftwareBlockSum_raw.

Referenced by ApplyHWChecks(), and FillHistograms().

+ Here is the caller graph for this function:

◆ GetRawValue() [1/2]

Int_t VQwHardwareChannel::GetRawValue ( ) const
inline

Definition at line 125 of file VQwHardwareChannel.h.

125{return this->GetRawValue(0);};

Referenced by GetRawBlockValue(), and GetRawHardwareSum().

+ Here is the caller graph for this function:

◆ GetRawValue() [2/2]

Int_t QwMollerADC_Channel::GetRawValue ( size_t element) const
inlineoverridevirtual

Implements VQwHardwareChannel.

Definition at line 252 of file QwMollerADC_Channel.h.

252 {
253 RangeCheck(element);
254 if (element==0) return fHardwareBlockSum_raw;
255 return fBlock_raw[element-1];
256 }
void RangeCheck(size_t element) const
Checks that the requested element is in range, to be used in accesses to subelements similar to std::...

References fBlock_raw, fHardwareBlockSum_raw, and VQwHardwareChannel::RangeCheck().

+ Here is the call graph for this function:

◆ GetSequenceNumber()

size_t QwMollerADC_Channel::GetSequenceNumber ( ) const
inline

Definition at line 276 of file QwMollerADC_Channel.h.

276{return (fSequenceNumber);};

References fSequenceNumber.

Referenced by ApplyHWChecks().

+ Here is the caller graph for this function:

◆ GetValue() [1/2]

Double_t VQwHardwareChannel::GetValue ( ) const
inline

Definition at line 126 of file VQwHardwareChannel.h.

126{return this->GetValue(0);};

Referenced by GetBlockValue(), and GetHardwareSum().

+ Here is the caller graph for this function:

◆ GetValue() [2/2]

Double_t QwMollerADC_Channel::GetValue ( size_t element) const
inlineoverridevirtual

Implements VQwHardwareChannel.

Definition at line 257 of file QwMollerADC_Channel.h.

257 {
258 RangeCheck(element);
259 if (element==0) return fHardwareBlockSum;
260 return fBlock[element-1];
261 }

References fBlock, fHardwareBlockSum, and VQwHardwareChannel::RangeCheck().

+ Here is the call graph for this function:

◆ GetValueError() [1/2]

Double_t VQwHardwareChannel::GetValueError ( ) const
inline

Definition at line 128 of file VQwHardwareChannel.h.

128{return this->GetValueError(0);};

Referenced by GetBlockErrorValue(), and GetHardwareSumError().

+ Here is the caller graph for this function:

◆ GetValueError() [2/2]

Double_t QwMollerADC_Channel::GetValueError ( size_t element) const
inlineoverridevirtual

Implements VQwHardwareChannel.

Definition at line 267 of file QwMollerADC_Channel.h.

267 {
268 RangeCheck(element);
269 if (element==0) return fHardwareBlockSumError;
270 return fBlockError[element-1];
271 }

References fBlockError, fHardwareBlockSumError, and VQwHardwareChannel::RangeCheck().

+ Here is the call graph for this function:

◆ GetValueM2() [1/2]

Double_t VQwHardwareChannel::GetValueM2 ( ) const
inline

Definition at line 127 of file VQwHardwareChannel.h.

127{return this->GetValueM2(0);};

Referenced by GetHardwareSumM2().

+ Here is the caller graph for this function:

◆ GetValueM2() [2/2]

Double_t QwMollerADC_Channel::GetValueM2 ( size_t element) const
inlineoverridevirtual

Implements VQwHardwareChannel.

Definition at line 262 of file QwMollerADC_Channel.h.

262 {
263 RangeCheck(element);
264 if (element==0) return fHardwareBlockSumM2;
265 return fBlockM2[element-1];
266 }

References fBlockM2, fHardwareBlockSumM2, and VQwHardwareChannel::RangeCheck().

+ Here is the call graph for this function:

◆ GetValueWidth() [1/2]

Double_t VQwHardwareChannel::GetValueWidth ( ) const
inline

Definition at line 129 of file VQwHardwareChannel.h.

129{return this->GetValueWidth(0);};

Referenced by CalculateRunningAverage(), and GetHardwareSumWidth().

+ Here is the caller graph for this function:

◆ GetValueWidth() [2/2]

Double_t VQwHardwareChannel::GetValueWidth ( size_t element) const
inline

Definition at line 134 of file VQwHardwareChannel.h.

134 {
135 RangeCheck(element);
136 Double_t width;
137 if (fGoodEventCount>0){
138 width = (GetValueError(element)*std::sqrt(Double_t(fGoodEventCount)));
139 } else {
140 width = 0.0;
141 }
142 return width;
143 };

◆ IncrementErrorCounters()

void QwMollerADC_Channel::IncrementErrorCounters ( )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 139 of file QwMollerADC_Channel.cc.

139 {
141 fErrorCount_sample++; //increment the hw error counter
143 fErrorCount_SW_HW++; //increment the hw error counter
145 fErrorCount_Sequence++; //increment the hw error counter
147 fErrorCount_SameHW++; //increment the hw error counter
149 fErrorCount_ZeroHW++; //increment the hw error counter
151 fErrorCount_HWSat++; //increment the hw saturation error counter
154 fNumEvtsWithEventCutsRejected++; //increment the event cut error counter
155 }
156}
Int_t fErrorCount_SW_HW
HW_sum==SW_sum check.
Int_t fErrorCount_sample
for sample size check
Int_t fErrorCount_ZeroHW
check to see ADC returning zero
Int_t fNumEvtsWithEventCutsRejected
Counts the Event cut rejected events.
Int_t fErrorCount_HWSat
check to see ADC channel is saturated
Int_t fErrorCount_SameHW
check to see ADC returning same HW value
Int_t fErrorCount_Sequence
sequence number check

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.

◆ InitializeChannel() [1/2]

void QwMollerADC_Channel::InitializeChannel ( TString name,
TString datatosave )
overridevirtual

Initialize the fields in this object.

Implements VQwHardwareChannel.

Definition at line 160 of file QwMollerADC_Channel.cc.

161{
162 SetElementName(name);
163 SetDataToSave(datatosave);
166
167 kFoundPedestal = 0;
168 kFoundGain = 0;
169
170 fPedestal = 0.0;
171 fCalibrationFactor = 1.0;
172
173 fBlocksPerEvent = 4;
174
175 fTreeArrayIndex = 0;
177
179
183
184 // Use internal random variable by default
186
187 // Mock drifts
188 fMockDriftAmplitude.clear();
189 fMockDriftFrequency.clear();
190 fMockDriftPhase.clear();
191
192 // Mock asymmetries
193 fMockAsymmetry = 0.0;
194 fMockGaussianMean = 0.0;
195 fMockGaussianSigma = 0.0;
196
197 // Event cuts
198 fULimit=-1;
199 fLLimit=1;
201
202 fErrorFlag=0; //Initialize the error flag
203 fErrorConfigFlag=0; //Initialize the error config. flag
204
205 //init error counters//
212
217
218 fGoodEventCount = 0;
219
220 bEVENTCUTMODE = 0;
221
222 return;
223}
std::vector< Double_t > fMockDriftAmplitude
Harmonic drift amplitude.
std::vector< Double_t > fMockDriftFrequency
Harmonic drift frequency.
Double_t fMockAsymmetry
Helicity asymmetry.
bool fUseExternalRandomVariable
Flag to use an externally provided normal random variable.
Double_t fMockGaussianMean
Mean of normal distribution.
std::vector< Double_t > fMockDriftPhase
Harmonic drift phase.
UInt_t fPreviousSequenceNumber
Previous event sequence number for this channel.
void ClearEventData() override
Clear the event data in this element.
void SetElementName(const TString &name)
Set the name of this element.
void SetDataToSave(TString datatosave)
Set the flag indicating if raw or derived values are in this data element.
void SetNumberOfSubElements(const size_t elements)
Set the number of data words in this data element.
void SetNumberOfDataWords(const UInt_t &numwords)
Set the number of data words in this data element.

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 QwEnergyCalculator::GetProjectedPosition(), InitializeChannel(), QwEnergyCalculator::ProcessEvent(), QwMollerADC_Channel(), and QwMollerADC_Channel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeChannel() [2/2]

void QwMollerADC_Channel::InitializeChannel ( TString subsystem,
TString instrumenttype,
TString name,
TString datatosave )
overridevirtual

Initialize the fields in this object.

Implements VQwHardwareChannel.

Definition at line 227 of file QwMollerADC_Channel.cc.

227 {
228 InitializeChannel(name,datatosave);
229 SetSubsystemName(subsystem);
230 SetModuleType(instrumenttype);
231 //PrintInfo();
232}
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.
void SetModuleType(TString ModuleType)
set the type of the beam instrument

References InitializeChannel(), VQwDataElement::SetModuleType(), and VQwDataElement::SetSubsystemName().

+ Here is the call graph for this function:

◆ LoadChannelParameters()

void QwMollerADC_Channel::LoadChannelParameters ( QwParameterFile & paramfile)
overridevirtual

Reimplemented from VQwDataElement.

Definition at line 234 of file QwMollerADC_Channel.cc.

234 {
235 UInt_t value = 0;
236 if (paramfile.ReturnValue("sample_size",value)){
238 } else {
239 QwWarning << "MollerADC Channel "
240 << GetElementName()
241 << " cannot set the default sample size."
242 << QwLog::endl;
243 }
244};
void SetDefaultSampleSize(size_t num_samples_map)
Bool_t ReturnValue(const std::string keyname, T &retvalue)

References QwLog::endl(), VQwDataElement::GetElementName(), QwWarning, QwParameterFile::ReturnValue(), and SetDefaultSampleSize().

+ Here is the call graph for this function:

◆ LoadMockDataParameters()

void MQwMockable::LoadMockDataParameters ( QwParameterFile & paramfile)
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.

24 {
25 Bool_t ldebug=kFALSE;
26 Double_t asym=0.0, mean=0.0, sigma=0.0;
27 Double_t amplitude=0.0, phase=0.0, frequency=0.0;
28
29 //Check to see if this line contains "drift"
30 if (paramfile.GetLine().find("drift")!=std::string::npos){
31 // "drift" appears somewhere in the line. Assume it is the next token and move on...
32 paramfile.GetNextToken(); //Throw away this token. Now the next three should be the drift parameters.
33 //read 3 parameters
34 amplitude = paramfile.GetTypedNextToken<Double_t>();
35 phase = paramfile.GetTypedNextToken<Double_t>();
36 frequency = paramfile.GetTypedNextToken<Double_t>(); // The frequency we read in should be in Hz.
37 this->AddRandomEventDriftParameters(amplitude, phase, frequency*Qw::Hz);
38 // std::cout << "In MQwMockable::LoadMockDataParameters: amp = " << amplitude << "\t phase = " << phase << "\t freq = " << frequency << std::endl;
39 }
40 else {
41 asym = paramfile.GetTypedNextToken<Double_t>();
42 mean = paramfile.GetTypedNextToken<Double_t>();
43 sigma = paramfile.GetTypedNextToken<Double_t>();
44 if (ldebug==1) {
45 std::cout << "#################### \n";
46 std::cout << "asym, mean, sigma \n" << std::endl;
47 std::cout << asym << " / "
48 << mean << " / "
49 << sigma << " / "
50 << std::endl;
51 }
52 this->SetRandomEventParameters(mean, sigma);
53 this->SetRandomEventAsymmetry(asym);
54 }
55}
static const double Hz
Frequency units: base unit is kHz.
Definition QwUnits.h:88
void AddRandomEventDriftParameters(Double_t amplitude, Double_t phase, Double_t frequency)
Add drift parameters to the internal set.
void SetRandomEventAsymmetry(Double_t asymmetry)
Set the helicity asymmetry.
void SetRandomEventParameters(Double_t mean, Double_t sigma)
Set the normal random event parameters.
T GetTypedNextToken()
Get next token into specific type.
std::string GetLine()
std::string GetNextToken(const std::string &separatorchars)
Get next token as a string.

◆ MatchNumberOfSamples()

Bool_t QwMollerADC_Channel::MatchNumberOfSamples ( size_t numsamp)

Definition at line 1795 of file QwMollerADC_Channel.cc.

1796{
1797 Bool_t status = kTRUE;
1798 if (!IsNameEmpty()){
1799 status = (fNumberOfSamples==numsamp);
1800 if (! status){
1801 if (bDEBUG)
1802 std::cerr << "QwMollerADC_Channel::MatchNumberOfSamples: Channel "
1803 << GetElementName()
1804 << " had fNumberOfSamples==" << fNumberOfSamples
1805 << " and was supposed to have " << numsamp
1806 << std::endl;
1807 // PrintChannel();
1808 }
1809 }
1810 return status;
1811}

References bDEBUG, fNumberOfSamples, VQwDataElement::GetElementName(), and VQwDataElement::IsNameEmpty().

Referenced by ApplyHWChecks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MatchSequenceNumber()

Bool_t QwMollerADC_Channel::MatchSequenceNumber ( size_t seqnum)

Definition at line 1785 of file QwMollerADC_Channel.cc.

1786{
1787
1788 Bool_t status = kTRUE;
1789 if (!IsNameEmpty()){
1790 status = (fSequenceNumber==seqnum);
1791 }
1792 return status;
1793}

References fSequenceNumber, and VQwDataElement::IsNameEmpty().

Referenced by ApplyHWChecks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MultiplyBy()

void QwMollerADC_Channel::MultiplyBy ( const VQwHardwareChannel * valueptr)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1164 of file QwMollerADC_Channel.cc.

1165{
1166 const QwMollerADC_Channel* tmpptr;
1167 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(valueptr);
1168 if (tmpptr!=NULL){
1169 *this *= *tmpptr;
1170 } else {
1171 TString loc="Standard exception from QwMollerADC_Channel::MultiplyBy = "
1172 +valueptr->GetElementName()+" is an incompatible type.";
1173 throw std::invalid_argument(loc.Data());
1174 }
1175}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ operator*()

const QwMollerADC_Channel QwMollerADC_Channel::operator* ( const QwMollerADC_Channel & value) const

Definition at line 1240 of file QwMollerADC_Channel.cc.

1241{
1242 QwMollerADC_Channel result = *this;
1243 result *= value;
1244 return result;
1245}

References QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ operator*=() [1/2]

QwMollerADC_Channel & QwMollerADC_Channel::operator*= ( const QwMollerADC_Channel & value)

Definition at line 1247 of file QwMollerADC_Channel.cc.

1248{
1249 if (!IsNameEmpty()){
1250 for (Int_t i=0; i<fBlocksPerEvent; i++){
1251 this->fBlock[i] *= value.fBlock[i];
1252 this->fBlockM2[i] = 0.0;
1253 }
1254 this->fHardwareBlockSum *= value.fHardwareBlockSum;
1255 this->fHardwareBlockSumM2 = 0.0;
1256 this->fNumberOfSamples *= value.fNumberOfSamples;
1257 this->fSequenceNumber = 0;
1258 this->fErrorFlag |= (value.fErrorFlag);
1259 }
1260
1261 return *this;
1262}

References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ operator*=() [2/2]

VQwHardwareChannel & QwMollerADC_Channel::operator*= ( const VQwHardwareChannel & input)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1292 of file QwMollerADC_Channel.cc.

1293{
1294 const QwMollerADC_Channel* tmpptr;
1295 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(&source);
1296 if (tmpptr!=NULL){
1297 *this *= *tmpptr;
1298 } else {
1299 TString loc="Standard exception from QwMollerADC_Channel::operator*= "
1300 +source.GetElementName()+" "
1301 +this->GetElementName()+" are not of the same type";
1302 throw(std::invalid_argument(loc.Data()));
1303 }
1304 return *this;
1305}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ operator+()

const QwMollerADC_Channel QwMollerADC_Channel::operator+ ( const QwMollerADC_Channel & value) const

Definition at line 1190 of file QwMollerADC_Channel.cc.

1191{
1192 QwMollerADC_Channel result = *this;
1193 result += value;
1194 return result;
1195}

References QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ operator+=() [1/2]

QwMollerADC_Channel & QwMollerADC_Channel::operator+= ( const QwMollerADC_Channel & value)

Definition at line 1197 of file QwMollerADC_Channel.cc.

1198{
1199
1200 if (!IsNameEmpty()) {
1201 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
1202 this->fBlock[i] += value.fBlock[i];
1203 this->fBlockM2[i] = 0.0;
1204 }
1205 this->fHardwareBlockSum += value.fHardwareBlockSum;
1206 this->fHardwareBlockSumM2 = 0.0;
1207 this->fNumberOfSamples += value.fNumberOfSamples;
1208 this->fSequenceNumber = 0;
1209 this->fErrorFlag |= (value.fErrorFlag);
1210
1211 }
1212
1213 return *this;
1214}

References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ operator+=() [2/2]

VQwHardwareChannel & QwMollerADC_Channel::operator+= ( const VQwHardwareChannel & input)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1264 of file QwMollerADC_Channel.cc.

1265{
1266 const QwMollerADC_Channel* tmpptr;
1267 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(&source);
1268 if (tmpptr!=NULL){
1269 *this += *tmpptr;
1270 } else {
1271 TString loc="Standard exception from QwMollerADC_Channel::operator+= "
1272 +source.GetElementName()+" "
1273 +this->GetElementName()+" are not of the same type";
1274 throw(std::invalid_argument(loc.Data()));
1275 }
1276 return *this;
1277}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ operator-()

const QwMollerADC_Channel QwMollerADC_Channel::operator- ( const QwMollerADC_Channel & value) const

Definition at line 1216 of file QwMollerADC_Channel.cc.

1217{
1218 QwMollerADC_Channel result = *this;
1219 result -= value;
1220 return result;
1221}

References QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ operator-=() [1/2]

QwMollerADC_Channel & QwMollerADC_Channel::operator-= ( const QwMollerADC_Channel & value)

Definition at line 1223 of file QwMollerADC_Channel.cc.

1224{
1225 if (!IsNameEmpty()){
1226 for (Int_t i=0; i<fBlocksPerEvent; i++){
1227 this->fBlock[i] -= value.fBlock[i];
1228 this->fBlockM2[i] = 0.0;
1229 }
1230 this->fHardwareBlockSum -= value.fHardwareBlockSum;
1231 this->fHardwareBlockSumM2 = 0.0;
1232 this->fNumberOfSamples += value.fNumberOfSamples;
1233 this->fSequenceNumber = 0;
1234 this->fErrorFlag |= (value.fErrorFlag);
1235 }
1236
1237 return *this;
1238}

References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ operator-=() [2/2]

VQwHardwareChannel & QwMollerADC_Channel::operator-= ( const VQwHardwareChannel & input)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1278 of file QwMollerADC_Channel.cc.

1279{
1280 const QwMollerADC_Channel* tmpptr;
1281 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(&source);
1282 if (tmpptr!=NULL){
1283 *this -= *tmpptr;
1284 } else {
1285 TString loc="Standard exception from QwMollerADC_Channel::operator-= "
1286 +source.GetElementName()+" "
1287 +this->GetElementName()+" are not of the same type";
1288 throw(std::invalid_argument(loc.Data()));
1289 }
1290 return *this;
1291}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ operator/=() [1/2]

QwMollerADC_Channel & QwMollerADC_Channel::operator/= ( const QwMollerADC_Channel & value)
protected

Definition at line 1347 of file QwMollerADC_Channel.cc.

1348{
1349 // In this function, leave the "raw" variables untouched.
1350 //
1351 Double_t ratio;
1352 Double_t variance;
1353 if (!IsNameEmpty()) {
1354 // The variances are calculated using the following formula:
1355 // Var[ratio] = ratio^2 (Var[numer] / numer^2 + Var[denom] / denom^2)
1356 //
1357 // This requires that both the numerator and denominator are non-zero!
1358 //
1359 for (Int_t i = 0; i < 4; i++) {
1360 if (this->fBlock[i] != 0.0 && denom.fBlock[i] != 0.0){
1361 ratio = (this->fBlock[i]) / (denom.fBlock[i]);
1362 variance = ratio * ratio *
1363 (this->fBlockM2[i] / this->fBlock[i] / this->fBlock[i]
1364 + denom.fBlockM2[i] / denom.fBlock[i] / denom.fBlock[i]);
1365 fBlock[i] = ratio;
1366 fBlockM2[i] = variance;
1367 } else if (this->fBlock[i] == 0.0) {
1368 this->fBlock[i] = 0.0;
1369 this->fBlockM2[i] = 0.0;
1370 } else {
1371 QwVerbose << "Attempting to divide by zero block in "
1373 fBlock[i] = 0.0;
1374 fBlockM2[i] = 0.0;
1375 }
1376 }
1377 if (this->fHardwareBlockSum != 0.0 && denom.fHardwareBlockSum != 0.0){
1378 ratio = (this->fHardwareBlockSum) / (denom.fHardwareBlockSum);
1379 variance = ratio * ratio *
1381 + denom.fHardwareBlockSumM2 / denom.fHardwareBlockSum / denom.fHardwareBlockSum);
1382 fHardwareBlockSum = ratio;
1383 fHardwareBlockSumM2 = variance;
1384 } else if (this->fHardwareBlockSum == 0.0) {
1385 fHardwareBlockSum = 0.0;
1386 fHardwareBlockSumM2 = 0.0;
1387 } else {
1388 QwVerbose << "Attempting to divide by zero sum in "
1390 fHardwareBlockSumM2 = 0.0;
1391 }
1392 // Remaining variables
1393 // Don't change fNumberOfSamples, fSequenceNumber, fGoodEventCount,
1394 // 'OR' the HW error codes in the fErrorFlag values together.
1395 fErrorFlag |= (denom.fErrorFlag);//mix only the hardware error codes
1396 }
1397
1398 // Nanny
1400 QwWarning << "Angry Nanny: NaN detected in " << GetElementName() << QwLog::endl;
1401
1402 return *this;
1403}
#define QwVerbose
Predefined log drain for verbose messages.
Definition QwLog.h:54

References QwLog::endl(), fBlock, fBlockM2, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwMollerADC_Channel(), QwVerbose, and QwWarning.

+ Here is the call graph for this function:

◆ operator/=() [2/2]

VQwHardwareChannel & QwMollerADC_Channel::operator/= ( const VQwHardwareChannel & input)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1306 of file QwMollerADC_Channel.cc.

1307{
1308 const QwMollerADC_Channel* tmpptr;
1309 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(&source);
1310 if (tmpptr!=NULL){
1311 *this /= *tmpptr;
1312 } else {
1313 TString loc="Standard exception from QwMollerADC_Channel::operator/= "
1314 +source.GetElementName()+" "
1315 +this->GetElementName()+" are not of the same type";
1316 throw(std::invalid_argument(loc.Data()));
1317 }
1318 return *this;
1319}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ operator=()

QwMollerADC_Channel & QwMollerADC_Channel::operator= ( const QwMollerADC_Channel & value)

Definition at line 1077 of file QwMollerADC_Channel.cc.

1078{
1079 if(this ==&value) return *this;
1080
1081 if (!IsNameEmpty()) {
1083 for (Int_t i=0; i<fBlocksPerEvent; i++){
1084 this->fBlock[i] = value.fBlock[i];
1085 this->fBlockM2[i] = value.fBlockM2[i];
1086 }
1090 this->fNumberOfSamples = value.fNumberOfSamples;
1091 this->fSequenceNumber = value.fSequenceNumber;
1092
1093 if (this->fDataToSave == kRaw){
1094 for (Int_t i=0; i<fBlocksPerEvent; i++){
1095 this->fBlock_raw[i] = value.fBlock_raw[i];
1096 this->fBlockSumSq_raw[i] = value.fBlockSumSq_raw[i];
1097 this->fBlock_min[i] = value.fBlock_min[i];
1098 this->fBlock_max[i] = value.fBlock_max[i];
1099 }
1102 }
1103 }
1104 return *this;
1105}
VQwHardwareChannel & operator=(const VQwHardwareChannel &value)
Arithmetic assignment operator: Should only copy event-based data.

References fBlock, fBlock_max, fBlock_min, fBlock_raw, fBlockM2, fBlocksPerEvent, fBlockSumSq_raw, VQwHardwareChannel::fDataToSave, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::IsNameEmpty(), VQwDataElement::kRaw, VQwHardwareChannel::operator=(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ PrintErrorCounterHead()

void QwMollerADC_Channel::PrintErrorCounterHead ( )
static

Definition at line 1865 of file QwMollerADC_Channel.cc.

1866{
1867 TString message;
1868 message = Form("%30s","Device name");
1869 message += Form("%9s", "HW Sat");
1870 message += Form("%9s", "Sample");
1871 message += Form("%9s", "SW_HW");
1872 message += Form("%9s", "Sequence");
1873 message += Form("%9s", "SameHW");
1874 message += Form("%9s", "ZeroHW");
1875 message += Form("%9s", "EventCut");
1876 QwMessage << "---------------------------------------------------------------------------------------------" << QwLog::endl;
1877 QwMessage << message << QwLog::endl;
1878 QwMessage << "---------------------------------------------------------------------------------------------" << QwLog::endl;
1879 return;
1880}

References QwLog::endl(), and QwMessage.

Referenced by VQwDetectorArray::PrintErrorCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintErrorCounters()

void QwMollerADC_Channel::PrintErrorCounters ( ) const
overridevirtual

report number of events failed due to HW and event cut failure

Reimplemented from VQwDataElement.

Definition at line 1888 of file QwMollerADC_Channel.cc.

1889{
1890 TString message;
1892 message = Form("%30s", GetElementName().Data());
1893 message += Form("%9d", fErrorCount_HWSat);
1894 message += Form("%9d", fErrorCount_sample);
1895 message += Form("%9d", fErrorCount_SW_HW);
1896 message += Form("%9d", fErrorCount_Sequence);
1897 message += Form("%9d", fErrorCount_SameHW);
1898 message += Form("%9d", fErrorCount_ZeroHW);
1899 message += Form("%9d", fNumEvtsWithEventCutsRejected);
1900
1901 if((fDataToSave == kRaw) && (!kFoundPedestal||!kFoundGain)){
1902 message += " >>>>> No Pedestal or Gain in map file";
1903 }
1904
1905 QwMessage << message << QwLog::endl;
1906 }
1907 return;
1908}

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.

+ Here is the call graph for this function:

◆ PrintErrorCounterTail()

void QwMollerADC_Channel::PrintErrorCounterTail ( )
static

Definition at line 1882 of file QwMollerADC_Channel.cc.

1883{
1884 QwMessage << "---------------------------------------------------------------------------------------------" << QwLog::endl;
1885 return;
1886}

References QwLog::endl(), and QwMessage.

Referenced by VQwDetectorArray::PrintErrorCounters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintInfo()

void QwMollerADC_Channel::PrintInfo ( ) const
overridevirtual

Print multiple lines of information about this data element.

Reimplemented from VQwDataElement.

Definition at line 545 of file QwMollerADC_Channel.cc.

546{
547 std::cout<<"***************************************"<<"\n";
548 std::cout<<"Subsystem "<<GetSubsystemName()<<"\n"<<"\n";
549 std::cout<<"Beam Instrument Type: "<<GetModuleType()<<"\n"<<"\n";
550 std::cout<<"QwMollerADC channel: "<<GetElementName()<<"\n"<<"\n";
551 std::cout<<"fPedestal= "<< fPedestal<<"\n";
552 std::cout<<"fCalibrationFactor= "<<fCalibrationFactor<<"\n";
553 std::cout<<"fBlocksPerEvent= "<<fBlocksPerEvent<<"\n"<<"\n";
554 std::cout<<"fSequenceNumber= "<<fSequenceNumber<<"\n";
555 std::cout<<"fNumberOfSamples= "<<fNumberOfSamples<<"\n";
556 std::cout<<"fBlock_raw ";
557
558 for (Int_t i = 0; i < fBlocksPerEvent; i++)
559 std::cout << " : " << fBlock_raw[i];
560 std::cout<<"\n";
561 std::cout<<"fHardwareBlockSum_raw= "<<fHardwareBlockSum_raw<<"\n";
562 std::cout<<"fSoftwareBlockSum_raw= "<<fSoftwareBlockSum_raw<<"\n";
563 std::cout<<"fBlock ";
564 for (Int_t i = 0; i < fBlocksPerEvent; i++)
565 std::cout << " : " <<std::setprecision(8) << fBlock[i];
566 std::cout << std::endl;
567
568 std::cout << "fHardwareBlockSum = "<<std::setprecision(8) <<fHardwareBlockSum << std::endl;
569 std::cout << "fHardwareBlockSumM2 = "<<fHardwareBlockSumM2 << std::endl;
570 std::cout << "fHardwareBlockSumError = "<<fHardwareBlockSumError << std::endl;
571
572 return;
573}

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().

+ Here is the call graph for this function:

◆ PrintValue()

void QwMollerADC_Channel::PrintValue ( ) const
overridevirtual

Print single line of value and error of this data element.

Reimplemented from VQwDataElement.

Definition at line 1708 of file QwMollerADC_Channel.cc.

1709{
1710 QwMessage << std::setprecision(8)
1711 << std::setw(18) << std::left << GetSubsystemName() << " "
1712 << std::setw(18) << std::left << GetModuleType() << " "
1713 << std::setw(18) << std::left << GetElementName() << " "
1714 << std::setw(12) << std::left << GetHardwareSum() << " +/- "
1715 << std::setw(12) << std::left << GetHardwareSumError() << " sig "
1716 << std::setw(12) << std::left << GetHardwareSumWidth() << " "
1717 << std::setw(10) << std::left << GetGoodEventCount() << " "
1718 << std::setw(12) << std::left << GetBlockValue(0) << " +/- "
1719 << std::setw(12) << std::left << GetBlockErrorValue(0) << " "
1720 << std::setw(12) << std::left << GetBlockValue(1) << " +/- "
1721 << std::setw(12) << std::left << GetBlockErrorValue(1) << " "
1722 << std::setw(12) << std::left << GetBlockValue(2) << " +/- "
1723 << std::setw(12) << std::left << GetBlockErrorValue(2) << " "
1724 << std::setw(12) << std::left << GetBlockValue(3) << " +/- "
1725 << std::setw(12) << std::left << GetBlockErrorValue(3) << " "
1726 << std::setw(12) << std::left << fGoodEventCount << " "
1727 << QwLog::endl;
1728 /*
1729 //for Debudding
1730 << std::setw(12) << std::left << fErrorFlag << " err "
1731 << std::setw(12) << std::left << fErrorConfigFlag << " c-err "
1732
1733 */
1734}
Double_t GetBlockErrorValue(size_t blocknum) const
Double_t GetHardwareSumWidth() const
UInt_t GetGoodEventCount() const

References QwLog::endl(), VQwDataElement::fGoodEventCount, GetBlockErrorValue(), GetBlockValue(), VQwDataElement::GetElementName(), VQwDataElement::GetGoodEventCount(), GetHardwareSum(), GetHardwareSumError(), GetHardwareSumWidth(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), and QwMessage.

+ Here is the call graph for this function:

◆ ProcessEvBuffer()

Int_t QwMollerADC_Channel::ProcessEvBuffer ( UInt_t * buffer,
UInt_t num_words_left,
UInt_t index = 0 )
overridevirtual

Decode the event data from a CODA buffer.

Implements VQwDataElement.

Definition at line 448 of file QwMollerADC_Channel.cc.

449{
450 UInt_t words_read = 0;
451 UInt_t localbuf[kWordsPerChannel] = {0};
452 // The conversion from UInt_t to Double_t discards the sign, so we need an intermediate
453 // static_cast from UInt_t to Int_t.
454 Int_t localbuf_signed[kWordsPerChannel] = {0};
455
456 if (IsNameEmpty()){
457 // This channel is not used, but is present in the data stream.
458 // Skip over this data.
459 words_read = fNumberOfDataWords;
460 } else if (num_words_left >= fNumberOfDataWords)
461 {
462 for (Int_t i=0; i<kWordsPerChannel; i++){
463 localbuf[i] = buffer[i];
464 localbuf_signed[i] = static_cast<Int_t>(localbuf[i]);
465 }
466
468 for (Int_t i=0; i<fBlocksPerEvent; i++){
469 fBlock_raw[i] = localbuf_signed[i*5];
470 fBlockSumSq_raw[i] = localbuf_signed[i*5+1];
471 fBlockSumSq_raw[i] += Long64_t (localbuf_signed[i*5+2]) << 32;
472 fBlock_min[i] = localbuf_signed[i*5+3];
473 fBlock_max[i] = localbuf_signed[i*5+4];
475 }
476 fHardwareBlockSum_raw = localbuf_signed[20];
477
478 /* Permanent change in the structure of the 6th word of the ADC readout.
479 * The upper 16 bits are the number of samples, and the upper 8 of the
480 * lower 16 are the sequence number. This matches the structure of
481 * the ADC readout in block read mode, and now also in register read mode.
482 * P.King, 2007sep04.
483 */
484 fSequenceNumber = (localbuf[25]>>8) & 0xFF;
485 fNumberOfSamples = (localbuf[25]>>16) & 0xFFFF;
486
487 words_read = fNumberOfDataWords;
488
489 } else
490 {
491 std::cerr << "QwMollerADC_Channel::ProcessEvBuffer: Not enough words!"
492 << std::endl;
493 }
494 return words_read;
495}
UInt_t fNumberOfDataWords
Number of raw data words in this data element.

References fBlock_max, fBlock_min, fBlock_raw, fBlocksPerEvent, fBlockSumSq_raw, fHardwareBlockSum_raw, VQwHardwareChannel::fNumberOfDataWords, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::IsNameEmpty(), and kWordsPerChannel.

+ Here is the call graph for this function:

◆ ProcessEvent()

void QwMollerADC_Channel::ProcessEvent ( )
overridevirtual

Process the event data according to pedestal and calibration factor.

Implements VQwHardwareChannel.

Definition at line 499 of file QwMollerADC_Channel.cc.

500{
501 if (fNumberOfSamples == 0 && fHardwareBlockSum_raw == 0) {
502 // There isn't valid data for this channel. Just flag it and
503 // move on.
504 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
505 fBlock[i] = 0.0;
506 fBlockM2[i] = 0.0;
507 }
508 fHardwareBlockSum = 0.0;
511 } else if (fNumberOfSamples == 0) {
512 // This is probably a more serious problem.
513 QwWarning << "QwMollerADC_Channel::ProcessEvent: Channel "
514 << this->GetElementName().Data()
515 << " has fNumberOfSamples==0 but has valid data in the hardware sum. "
516 << "Flag this as an error."
517 << QwLog::endl;
518 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
519 fBlock[i] = 0.0;
520 fBlockM2[i] = 0.0;
521 }
522 fHardwareBlockSum = 0.0;
525 } else {
526 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
528 fBlockM2[i] = 0.0; // second moment is zero for single events
529 }
531 fHardwareBlockSumM2 = 0.0; // second moment is zero for single events
532 }
533 return;
534}

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.

+ Here is the call graph for this function:

◆ Product()

void QwMollerADC_Channel::Product ( const QwMollerADC_Channel & value1,
const QwMollerADC_Channel & value2 )

Definition at line 1422 of file QwMollerADC_Channel.cc.

1423{
1424 if (!IsNameEmpty()){
1425 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
1426 this->fBlock[i] = (value1.fBlock[i]) * (value2.fBlock[i]);
1427 // For a single event the second moment is still zero
1428 this->fBlockM2[i] = 0.0;
1429 }
1430
1431 // For a single event the second moment is still zero
1432 this->fHardwareBlockSumM2 = 0.0;
1434 this->fNumberOfSamples = value1.fNumberOfSamples;
1435 this->fSequenceNumber = 0;
1436 this->fErrorFlag = (value1.fErrorFlag|value2.fErrorFlag);
1437 }
1438 return;
1439}

References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ RandomizeEventData()

void QwMollerADC_Channel::RandomizeEventData ( int helicity = 0.0,
double time = 0.0 )
overridevirtual

Internally generate random event data.

Implements MQwMockable.

Definition at line 270 of file QwMollerADC_Channel.cc.

271{
272 // updated to calculate the drift for each block individually
273 Double_t drift = 0.0;
274 for (Int_t i = 0; i < fBlocksPerEvent; i++){
275 drift = 0.0;
276 if (i >= 1){
278 }
279 for (UInt_t i = 0; i < fMockDriftFrequency.size(); i++) {
280 drift += fMockDriftAmplitude[i] * sin(2.0 * Qw::pi * fMockDriftFrequency[i] * time + fMockDriftPhase[i]);
281 //std::cout << "Drift: " << drift << std::endl;
282 }
283 }
284
285 // Calculate signal
286 fHardwareBlockSum = 0.0;
287 fHardwareBlockSumM2 = 0.0; // second moment is zero for single events
288 fBlock_max[4] = kMinInt;
289 fBlock_min[4] = kMaxInt;
290
291 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
292 double tmpvar = GetRandomValue();
293
294 fBlock[i] = fMockGaussianMean + drift;
295
297 fBlock[i] += helicity*fMockAsymmetry;
298 } else {
299 fBlock[i] *= 1.0 + helicity*fMockAsymmetry;
300 }
301 fBlock[i] += fMockGaussianSigma*tmpvar*sqrt(fBlocksPerEvent);
302 fBlockM2[i] = 0.0; // second moment is zero for single events
304
305 }
307 fSequenceNumber = 0;
309 // SetEventData(block);
310 // delete block;
311 return;
312}
static const double pi
Angles: base unit is radian.
Definition QwUnits.h:107
Double_t GetRandomValue()
bool fCalcMockDataAsDiff
static const Double_t kTimePerSample

References fBlock, fBlock_max, fBlock_min, 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.

+ Here is the call graph for this function:

◆ Ratio()

void QwMollerADC_Channel::Ratio ( const QwMollerADC_Channel & numer,
const QwMollerADC_Channel & denom )

Definition at line 1334 of file QwMollerADC_Channel.cc.

1335{
1336 if (!IsNameEmpty()) {
1337 *this = numer;
1338 *this /= denom;
1339
1341 fSequenceNumber = 0;
1343 fErrorFlag = (numer.fErrorFlag|denom.fErrorFlag);
1344 }
1345}

References VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fSequenceNumber, VQwDataElement::IsNameEmpty(), and QwMollerADC_Channel().

+ Here is the call graph for this function:

◆ Scale()

void QwMollerADC_Channel::Scale ( Double_t Offset)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1454 of file QwMollerADC_Channel.cc.

1455{
1456 if (!IsNameEmpty()){
1457 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
1458 fBlock[i] *= scale;
1459 fBlockM2[i] *= scale * scale;
1460 }
1461 fHardwareBlockSum *= scale;
1462 fHardwareBlockSumM2 *= scale * scale;
1463 }
1464}

References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, and VQwDataElement::IsNameEmpty().

Referenced by QwEnergyCalculator::GetProjectedPosition(), and QwEnergyCalculator::ProcessEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ScaledAdd()

void QwMollerADC_Channel::ScaledAdd ( Double_t scale,
const VQwHardwareChannel * value )
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1910 of file QwMollerADC_Channel.cc.

1911{
1912 const QwMollerADC_Channel* input = dynamic_cast<const QwMollerADC_Channel*>(value);
1913
1914 // follows same steps as += but w/ scaling factor
1915 if(input!=NULL && !IsNameEmpty()){
1916 // QwWarning << "Adding " << input->GetElementName()
1917 // << " to " << GetElementName()
1918 // << " with scale factor " << scale
1919 // << QwLog::endl;
1920 // PrintValue();
1921 // input->PrintValue();
1922 for(Int_t i = 0; i < fBlocksPerEvent; i++){
1923 this -> fBlock[i] += scale * input->fBlock[i];
1924 this -> fBlockM2[i] = 0.0;
1925 }
1926 this -> fHardwareBlockSum += scale * input->fHardwareBlockSum;
1927 this -> fHardwareBlockSumM2 = 0.0;
1928 this -> fNumberOfSamples += input->fNumberOfSamples;
1929 this -> fSequenceNumber = 0;
1930 this -> fErrorFlag |= (input->fErrorFlag);
1931 } else if (input == NULL && value != NULL) {
1932 TString loc="Standard exception from QwMollerADC_Channel::ScaledAdd "
1933 +value->GetElementName()+" "
1934 +this->GetElementName()+" are not of the same type";
1935 throw(std::invalid_argument(loc.Data()));
1936 }
1937}

References fBlock, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ SetCalibrationToVolts()

void QwMollerADC_Channel::SetCalibrationToVolts ( )
inline

Definition at line 279 of file QwMollerADC_Channel.h.

References kMollerADC_VoltsPerBit, and VQwHardwareChannel::SetCalibrationFactor().

+ Here is the call graph for this function:

◆ SetDefaultSampleSize()

void QwMollerADC_Channel::SetDefaultSampleSize ( size_t num_samples_map)
inline

Definition at line 122 of file QwMollerADC_Channel.h.

122 {
123 // This will be checked against the no.of samples read by the module
124 fNumberOfSamples_map = num_samples_map;
125 };

References fNumberOfSamples_map.

Referenced by LoadChannelParameters().

+ Here is the caller graph for this function:

◆ SetEventData()

void QwMollerADC_Channel::SetEventData ( Double_t * block,
UInt_t sequencenumber = 0 )

Definition at line 349 of file QwMollerADC_Channel.cc.

350{
351 fHardwareBlockSum = 0.0;
352 fHardwareBlockSumM2 = 0.0; // second moment is zero for single events
353 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
354 fBlock[i] = block[i];
355 fBlockM2[i] = 0.0; // second moment is zero for single events
356 fHardwareBlockSum += block[i];
357 }
359
360 fSequenceNumber = sequencenumber;
362
363// Double_t thispedestal = 0.0;
364// thispedestal = fPedestal * fNumberOfSamples;
365
367 return;
368}
void SetRawEventData() override

References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fNumberOfSamples_map, fSequenceNumber, and SetRawEventData().

Referenced by SetHardwareSum().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetHardwareSum()

void QwMollerADC_Channel::SetHardwareSum ( Double_t hwsum,
UInt_t sequencenumber = 0 )

TODO: SetHardwareSum should be removed, and SetEventData should be made protected.

Definition at line 333 of file QwMollerADC_Channel.cc.

334{
335 Double_t* block = new Double_t[fBlocksPerEvent];
336 for (Int_t i = 0; i < fBlocksPerEvent; i++){
337 block[i] = hwsum / fBlocksPerEvent;
338 }
339 SetEventData(block);
340 delete[] block;
341 return;
342}
void SetEventData(Double_t *block, UInt_t sequencenumber=0)

References fBlocksPerEvent, and SetEventData().

+ Here is the call graph for this function:

◆ SetMollerADCSaturationLimt()

void QwMollerADC_Channel::SetMollerADCSaturationLimt ( Double_t sat_volts = 8.5)
inline

Definition at line 224 of file QwMollerADC_Channel.h.

224 {//Set the absolute staturation limit in volts.
225 fSaturationABSLimit=sat_volts;
226 }

References fSaturationABSLimit.

Referenced by QwMollerADC_Channel(), and QwMollerADC_Channel().

+ Here is the caller graph for this function:

◆ SetRawEventData()

void QwMollerADC_Channel::SetRawEventData ( )
overridevirtual

Implements MQwMockable.

References QwMollerADC_Channel(), VQwDataElement::VQwDataElement(), and VQwHardwareChannel::VQwHardwareChannel().

Referenced by SetEventData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SmearByResolution()

void QwMollerADC_Channel::SmearByResolution ( double resolution)
overridevirtual

Implements MQwMockable.

Definition at line 314 of file QwMollerADC_Channel.cc.

314 {
315
316 fHardwareBlockSum = 0.0;
317 fHardwareBlockSumM2 = 0.0; // second moment is zero for single events
318 for (Int_t i = 0; i < fBlocksPerEvent; i++) {
319
320 fBlock[i] += resolution*sqrt(fBlocksPerEvent) * GetRandomValue();
321
322 fBlockM2[i] = 0.0; // second moment is zero for single events
324 }
325 // std::cout << std::endl;
327
329 // SetRawEventData();
330 return;
331}

References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, fNumberOfSamples, fNumberOfSamples_map, and MQwMockable::GetRandomValue().

+ Here is the call graph for this function:

◆ SubtractValueFrom()

void QwMollerADC_Channel::SubtractValueFrom ( const VQwHardwareChannel * valueptr)
overridevirtual

Implements VQwHardwareChannel.

Definition at line 1152 of file QwMollerADC_Channel.cc.

1153{
1154 const QwMollerADC_Channel* tmpptr;
1155 tmpptr = dynamic_cast<const QwMollerADC_Channel*>(valueptr);
1156 if (tmpptr!=NULL){
1157 *this -= *tmpptr;
1158 } else {
1159 TString loc="Standard exception from QwMollerADC_Channel::SubtractValueFrom = "
1160 +valueptr->GetElementName()+" is an incompatible type.";
1161 throw std::invalid_argument(loc.Data());
1162 }
1163}

References VQwDataElement::GetElementName(), QwMollerADC_Channel(), and VQwHardwareChannel::VQwHardwareChannel().

+ Here is the call graph for this function:

◆ Sum()

void QwMollerADC_Channel::Sum ( const QwMollerADC_Channel & value1,
const QwMollerADC_Channel & value2 )

Definition at line 1322 of file QwMollerADC_Channel.cc.

1323{
1324 *this = value1;
1325 *this += value2;
1326}

References QwMollerADC_Channel().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const QwMollerADC_Channel & channel )
friend

Definition at line 1736 of file QwMollerADC_Channel.cc.

1737{
1738 stream << channel.GetHardwareSum();
1739 return stream;
1740}

References GetHardwareSum(), and QwMollerADC_Channel().

Field Documentation

◆ bBlock

Bool_t QwMollerADC_Channel::bBlock
private

Definition at line 404 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ bBlock_raw

Bool_t QwMollerADC_Channel::bBlock_raw
private

Definition at line 405 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ bDEBUG

const Bool_t QwMollerADC_Channel::bDEBUG =kFALSE
staticprivate

debugging display purposes

For MollerADC data element trimming uses

Definition at line 399 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), FillTreeVector(), and MatchNumberOfSamples().

◆ bDevice_Error_Code

Bool_t QwMollerADC_Channel::bDevice_Error_Code
private

Definition at line 407 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ bHw_sum

Bool_t QwMollerADC_Channel::bHw_sum
private

Definition at line 402 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ bHw_sum_raw

Bool_t QwMollerADC_Channel::bHw_sum_raw
private

Definition at line 403 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ bNum_samples

Bool_t QwMollerADC_Channel::bNum_samples
private

Definition at line 406 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ bSequence_number

Bool_t QwMollerADC_Channel::bSequence_number
private

Definition at line 408 of file QwMollerADC_Channel.h.

Referenced by ConstructBranchAndVector(), and FillTreeVector().

◆ fADC_Same_NumEvt

Int_t QwMollerADC_Channel::fADC_Same_NumEvt
private

Keep track of how many events with same ADC value returned.

Definition at line 389 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), and InitializeChannel().

◆ fBlock

◆ fBlock_max

Int_t QwMollerADC_Channel::fBlock_max[5]
private

◆ fBlock_min

Int_t QwMollerADC_Channel::fBlock_min[5]
private

◆ fBlock_numSamples

Short_t QwMollerADC_Channel::fBlock_numSamples[5]
private

Definition at line 346 of file QwMollerADC_Channel.h.

◆ fBlock_raw

Int_t QwMollerADC_Channel::fBlock_raw[4]
private

Array of the sub-block data as read from the module.

Definition at line 340 of file QwMollerADC_Channel.h.

Referenced by ClearEventData(), EncodeEventData(), GetRawValue(), operator=(), PrintInfo(), ProcessEvBuffer(), and ProcessEvent().

◆ fBlockError

Double_t QwMollerADC_Channel::fBlockError[4]
private

Uncertainty on the sub-block.

Definition at line 361 of file QwMollerADC_Channel.h.

Referenced by CalculateRunningAverage(), ClearEventData(), and GetValueError().

◆ fBlockM2

◆ fBlocksPerEvent

◆ fBlockSumSq_raw

Long64_t QwMollerADC_Channel::fBlockSumSq_raw[5]
private

◆ fErrorCount_HWSat

Int_t QwMollerADC_Channel::fErrorCount_HWSat
private

check to see ADC channel is saturated

Definition at line 375 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fErrorCount_SameHW

Int_t QwMollerADC_Channel::fErrorCount_SameHW
private

check to see ADC returning same HW value

Definition at line 379 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fErrorCount_sample

Int_t QwMollerADC_Channel::fErrorCount_sample
private

for sample size check

Definition at line 376 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fErrorCount_Sequence

Int_t QwMollerADC_Channel::fErrorCount_Sequence
private

sequence number check

Definition at line 378 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fErrorCount_SW_HW

Int_t QwMollerADC_Channel::fErrorCount_SW_HW
private

HW_sum==SW_sum check.

Definition at line 377 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fErrorCount_ZeroHW

Int_t QwMollerADC_Channel::fErrorCount_ZeroHW
private

check to see ADC returning zero

Definition at line 380 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fHardwareBlockSum

◆ fHardwareBlockSum_raw

Int_t QwMollerADC_Channel::fHardwareBlockSum_raw
private

Module-based sum of the four sub-blocks as read from the module.

Definition at line 341 of file QwMollerADC_Channel.h.

Referenced by ClearEventData(), EncodeEventData(), GetRawValue(), operator=(), PrintInfo(), ProcessEvBuffer(), and ProcessEvent().

◆ fHardwareBlockSumError

Double_t QwMollerADC_Channel::fHardwareBlockSumError
private

Uncertainty on the hardware sum.

Definition at line 364 of file QwMollerADC_Channel.h.

Referenced by AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueError(), operator=(), and PrintInfo().

◆ fHardwareBlockSumM2

◆ fNumberOfSamples

◆ fNumberOfSamples_map

UInt_t QwMollerADC_Channel::fNumberOfSamples_map
private

Number of samples in the expected to read through the module. This value is set in the QwBeamline map file.

Definition at line 371 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), CopyFrom(), CopyParameters(), ForceMapfileSampleSize(), InitializeChannel(), QwMollerADC_Channel(), QwMollerADC_Channel(), RandomizeEventData(), SetDefaultSampleSize(), SetEventData(), and SmearByResolution().

◆ fNumEvtsWithEventCutsRejected

Int_t QwMollerADC_Channel::fNumEvtsWithEventCutsRejected
private

Counts the Event cut rejected events.

Definition at line 382 of file QwMollerADC_Channel.h.

Referenced by IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().

◆ fPrev_HardwareBlockSum

Double_t QwMollerADC_Channel::fPrev_HardwareBlockSum
private

Previous Module-based sum of the four sub-blocks.

Definition at line 392 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), and InitializeChannel().

◆ fPreviousSequenceNumber

UInt_t QwMollerADC_Channel::fPreviousSequenceNumber
private

Previous event sequence number for this channel.

Definition at line 369 of file QwMollerADC_Channel.h.

Referenced by InitializeChannel().

◆ fSaturationABSLimit

Double_t QwMollerADC_Channel::fSaturationABSLimit
private

absolute value of the MollerADC saturation volt

Definition at line 396 of file QwMollerADC_Channel.h.

Referenced by CopyFrom(), GetMollerADCSaturationLimt(), QwMollerADC_Channel(), QwMollerADC_Channel(), and SetMollerADCSaturationLimt().

◆ fSequenceNo_Counter

Int_t QwMollerADC_Channel::fSequenceNo_Counter
private

Internal counter to keep track of the sequence number.

Definition at line 391 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), and InitializeChannel().

◆ fSequenceNo_Prev

Int_t QwMollerADC_Channel::fSequenceNo_Prev
private

Keep the sequence number of the last event.

Definition at line 390 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), and InitializeChannel().

◆ fSequenceNumber

◆ fSoftwareBlockSum_raw

Int_t QwMollerADC_Channel::fSoftwareBlockSum_raw
private

Sum of the data in the four sub-blocks raw.

Definition at line 342 of file QwMollerADC_Channel.h.

Referenced by ClearEventData(), GetRawSoftwareSum(), operator=(), PrintInfo(), and ProcessEvBuffer().

◆ kDEBUG

const Bool_t QwMollerADC_Channel::kDEBUG = kFALSE
staticprivate

Definition at line 318 of file QwMollerADC_Channel.h.

Referenced by ConstructBranch(), and ConstructBranchAndVector().

◆ kMaxChannels

const Int_t QwMollerADC_Channel::kMaxChannels = 8
staticprivate

Definition at line 320 of file QwMollerADC_Channel.h.

Referenced by GetBufferOffset().

◆ kMollerADC_VoltsPerBit

const Double_t QwMollerADC_Channel::kMollerADC_VoltsPerBit = (20./(1<<18))
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 324 of file QwMollerADC_Channel.h.

Referenced by ApplyHWChecks(), GetAverageVolts(), and SetCalibrationToVolts().

◆ kTimePerSample

const Double_t QwMollerADC_Channel::kTimePerSample = (2.0/30.0) * Qw::us
static

◆ kWordsPerChannel

const Int_t QwMollerADC_Channel::kWordsPerChannel = 30
staticprivate

Definition at line 319 of file QwMollerADC_Channel.h.

Referenced by EncodeEventData(), GetBufferOffset(), and ProcessEvBuffer().


The documentation for this class was generated from the following files: