QwAnalysis
|
#include <QwVQWK_Channel.h>
Public Member Functions | |
QwVQWK_Channel () | |
QwVQWK_Channel (TString name, TString datatosave="raw") | |
QwVQWK_Channel (const QwVQWK_Channel &value) | |
QwVQWK_Channel (const QwVQWK_Channel &value, VQwDataElement::EDataToSave datatosave) | |
virtual | ~QwVQWK_Channel () |
void | InitializeChannel (TString name, TString datatosave) |
Initialize the fields in this object. More... | |
void | InitializeChannel (TString subsystem, TString instrumenttype, TString name, TString datatosave) |
Initialize the fields in this object. More... | |
void | LoadChannelParameters (QwParameterFile ¶mfile) |
void | SetDefaultSampleSize (size_t num_samples_map) |
void | ClearEventData () |
Clear the event data in this element. More... | |
void | RandomizeEventData (int helicity=0.0, double time=0.0) |
Internally generate random event data. More... | |
void | SetHardwareSum (Double_t hwsum, UInt_t sequencenumber=0) |
void | SetEventData (Double_t *block, UInt_t sequencenumber=0) |
void | EncodeEventData (std::vector< UInt_t > &buffer) |
Encode the event data into a CODA buffer. More... | |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) |
Decode the event data from a CODA buffer. More... | |
void | ProcessEvent () |
Process the event data according to pedestal and calibration factor. More... | |
QwVQWK_Channel & | operator= (const QwVQWK_Channel &value) |
void | AssignScaledValue (const QwVQWK_Channel &value, Double_t scale) |
void | AssignValueFrom (const VQwDataElement *valueptr) |
void | AddValueFrom (const VQwHardwareChannel *valueptr) |
void | SubtractValueFrom (const VQwHardwareChannel *valueptr) |
void | MultiplyBy (const VQwHardwareChannel *valueptr) |
void | DivideBy (const VQwHardwareChannel *valueptr) |
QwVQWK_Channel & | operator+= (const QwVQWK_Channel &value) |
QwVQWK_Channel & | operator-= (const QwVQWK_Channel &value) |
QwVQWK_Channel & | operator*= (const QwVQWK_Channel &value) |
VQwHardwareChannel & | operator+= (const VQwHardwareChannel *input) |
VQwHardwareChannel & | operator-= (const VQwHardwareChannel *input) |
VQwHardwareChannel & | operator*= (const VQwHardwareChannel *input) |
VQwHardwareChannel & | operator/= (const VQwHardwareChannel *input) |
const QwVQWK_Channel | operator+ (const QwVQWK_Channel &value) const |
const QwVQWK_Channel | operator- (const QwVQWK_Channel &value) const |
const QwVQWK_Channel | operator* (const QwVQWK_Channel &value) const |
void | Sum (const QwVQWK_Channel &value1, const QwVQWK_Channel &value2) |
void | Difference (const QwVQWK_Channel &value1, const QwVQWK_Channel &value2) |
void | Ratio (const QwVQWK_Channel &numer, const QwVQWK_Channel &denom) |
void | Product (const QwVQWK_Channel &value1, const QwVQWK_Channel &value2) |
void | DivideBy (const QwVQWK_Channel &denom) |
void | AddChannelOffset (Double_t Offset) |
void | Scale (Double_t Offset) |
void | AccumulateRunningSum (const QwVQWK_Channel &value) |
void | AccumulateRunningSum (const QwVQWK_Channel &value, Int_t count) |
void | AccumulateRunningSum (const VQwHardwareChannel *value, Int_t count) |
void | DeaccumulateRunningSum (const QwVQWK_Channel &value) |
void | CalculateRunningAverage () |
Bool_t | MatchSequenceNumber (size_t seqnum) |
Bool_t | MatchNumberOfSamples (size_t numsamp) |
Bool_t | ApplySingleEventCuts (Double_t LL, Double_t UL) |
Bool_t | ApplySingleEventCuts () |
void | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure More... | |
void | SetVQWKSaturationLimt (Double_t sat_volts=8.5) |
Double_t | GetVQWKSaturationLimt () |
Int_t | ApplyHWChecks () |
void | IncrementErrorCounters () |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms for this data element. More... | |
void | FillHistograms () |
Fill the histograms for this data element. More... | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
void | ConstructBranch (TTree *tree, TString &prefix) |
void | FillTreeVector (std::vector< Double_t > &values) const |
Int_t | GetRawValue (size_t element) const |
Double_t | GetValue (size_t element) const |
Double_t | GetValueM2 (size_t element) const |
Double_t | GetValueError (size_t element) const |
Double_t | GetAverageVolts () const |
size_t | GetSequenceNumber () const |
size_t | GetNumberOfSamples () const |
void | SetCalibrationToVolts () |
void | PrintValue () const |
Print single line of value and error of this data element. More... | |
void | PrintInfo () const |
Print multiple lines of information about this data element. More... | |
void | Blind (const QwBlinder *blinder) |
Blind this channel as an asymmetry. More... | |
void | Blind (const QwBlinder *blinder, const QwVQWK_Channel &yield) |
Blind this channel as a difference. More... | |
void | ScaledAdd (Double_t scale, const VQwHardwareChannel *value) |
void | AddErrEntriesToList (std::vector< QwErrDBInterface > &row_list) |
![]() | |
VQwHardwareChannel () | |
VQwHardwareChannel (const VQwHardwareChannel &value) | |
VQwHardwareChannel (const VQwHardwareChannel &value, VQwDataElement::EDataToSave datatosave) | |
virtual | ~VQwHardwareChannel () |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. More... | |
size_t | GetNumberOfSubelements () |
Get the number of subelements in this data element. More... | |
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 | InitializeChannel (TString name) |
Initialize the fields in this object. More... | |
void | SetEventCutMode (Int_t bcuts) |
void | SetSingleEventCuts (Double_t min, Double_t max) |
Set the upper and lower limits (fULimit and fLLimit) for this channel. More... | |
void | SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability) |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. More... | |
Double_t | GetEventCutUpperLimit () const |
Double_t | GetEventCutLowerLimit () const |
Double_t | GetStabilityLimit () const |
UInt_t | UpdateErrorFlag () |
Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag". More... | |
void | UpdateErrorFlag (const VQwHardwareChannel &elem) |
virtual UInt_t | GetErrorCode () const |
virtual VQwHardwareChannel & | operator= (const VQwHardwareChannel &value) |
Arithmetic assignment operator: Should only copy event-based data. More... | |
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 | AccumulateRunningSum (const VQwHardwareChannel *value) |
virtual void | DeaccumulateRunningSum (const VQwHardwareChannel *value) |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) |
![]() | |
VQwDataElement () | |
Default constructor. More... | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. More... | |
virtual | ~VQwDataElement () |
Virtual destructor. More... | |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? More... | |
void | SetElementName (const TString &name) |
Set the name of this element. More... | |
virtual const TString & | GetElementName () const |
Get the name of this element. More... | |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. More... | |
UInt_t | GetGoodEventCount () const |
virtual VQwDataElement & | operator+= (const VQwDataElement &value) |
Addition-assignment operator. More... | |
virtual VQwDataElement & | operator-= (const VQwDataElement &value) |
Subtraction-assignment operator. More... | |
virtual void | Sum (const VQwDataElement &value1, const VQwDataElement &value2) |
Sum operator. More... | |
virtual void | Difference (const VQwDataElement &value1, const VQwDataElement &value2) |
Difference operator. More... | |
virtual void | Ratio (const VQwDataElement &numer, const VQwDataElement &denom) |
Ratio operator. More... | |
virtual UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device More... | |
virtual void | SetNeedsExternalClock (Bool_t needed) |
virtual Bool_t | NeedsExternalClock () |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *clock) |
virtual void | SetExternalClockName (const std::string name) |
virtual Double_t | GetNormClockValue () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. More... | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. More... | |
TString | GetModuleType () const |
Return the type of the beam instrument. More... | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument More... | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
![]() | |
MQwMockable () | |
virtual | ~MQwMockable () |
void | SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Set a single set of harmonic drift parameters. More... | |
void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Add drift parameters to the internal set. More... | |
void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
Set the normal random event parameters. More... | |
void | SetRandomEventAsymmetry (Double_t asymmetry) |
Set the helicity asymmetry. More... | |
Double_t | GetRandomValue () |
void | UseExternalRandomVariable () |
Set the flag to use an externally provided random variable. More... | |
void | SetExternalRandomVariable (Double_t random_variable) |
Set the externally provided random variable. More... | |
Static Public Member Functions | |
static Int_t | GetBufferOffset (Int_t moduleindex, Int_t channelindex) |
static void | PrintErrorCounterHead () |
static void | PrintErrorCounterTail () |
Protected Member Functions | |
QwVQWK_Channel & | operator/= (const QwVQWK_Channel &value) |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. More... | |
void | SetNumberOfSubElements (const size_t elements) |
Set the number of data words in this data element. More... | |
void | SetDataToSave (TString datatosave) |
Set the flag indicating if raw or derived values are in this data element. More... | |
void | SetDataToSave (VQwDataElement::EDataToSave datatosave) |
Set the flag indicating if raw or derived values are in this data element. More... | |
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(). More... | |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. More... | |
virtual VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. More... | |
virtual void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
MQwHistograms () | |
Default constructor. More... | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. More... | |
virtual | ~MQwHistograms () |
Virtual destructor. More... | |
virtual MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. More... | |
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 | |
QwVQWK_Channel * | fRunningSum |
Pointer to the running sum for this channel. More... | |
size_t | fSequenceNumber |
Event sequence number for this channel. More... | |
size_t | fPreviousSequenceNumber |
Previous event sequence number for this channel. More... | |
size_t | fNumberOfSamples |
Number of samples read through the module. More... | |
size_t | fNumberOfSamples_map |
Number of samples in the expected to read through the module. This value is set in the QwBeamline map file. More... | |
Int_t | fErrorCount_HWSat |
check to see ADC channel is saturated More... | |
Int_t | fErrorCount_sample |
for sample size check More... | |
Int_t | fErrorCount_SW_HW |
HW_sum==SW_sum check. More... | |
Int_t | fErrorCount_Sequence |
sequence number check More... | |
Int_t | fErrorCount_SameHW |
check to see ADC returning same HW value More... | |
Int_t | fErrorCount_ZeroHW |
check to see ADC returning zero More... | |
Int_t | fNumEvtsWithEventCutsRejected |
Counts the Event cut rejected events. More... | |
Int_t | fADC_Same_NumEvt |
Keep track of how many events with same ADC value returned. More... | |
Int_t | fSequenceNo_Prev |
Keep the sequence number of the last event. More... | |
Int_t | fSequenceNo_Counter |
Internal counter to keep track of the sequence number. More... | |
Double_t | fPrev_HardwareBlockSum |
Previous Module-based sum of the four sub-blocks. More... | |
Double_t | fSaturationABSLimit |
absolute value of the VQWK saturation volt More... | |
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 |
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. More... | |
Int_t | fHardwareBlockSum_raw |
Module-based sum of the four sub-blocks as read from the module. More... | |
Int_t | fSoftwareBlockSum_raw |
Sum of the data in the four sub-blocks raw. More... | |
Event data members---Potentially calibrated values | |
Double_t | fBlock [4] |
Array of the sub-block data. More... | |
Double_t | fHardwareBlockSum |
Module-based sum of the four sub-blocks. More... | |
Calculation of the statistical moments | |
Double_t | fBlockM2 [4] |
Second moment of the sub-block. More... | |
Double_t | fBlockError [4] |
Uncertainty on the sub-block. More... | |
Double_t | fHardwareBlockSumM2 |
Second moment of the hardware sum. More... | |
Double_t | fHardwareBlockSumError |
Uncertainty on the hardware sum. More... | |
Static Private Attributes | |
static const Bool_t | kDEBUG = kFALSE |
static const Int_t | kWordsPerChannel = 6 |
static const Int_t | kMaxChannels = 8 |
static const Bool_t | bDEBUG =kFALSE |
debugging display purposes More... | |
ADC Calibration | |
static const Double_t | kVQWK_VoltsPerBit = (20./(1<<18)) |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const QwVQWK_Channel &channel) |
Additional Inherited Members | |
![]() | |
enum | EDataToSave { kRaw = 0, kDerived } |
![]() | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. More... | |
UInt_t | fNumberOfSubElements |
Number of subelements in this data element. More... | |
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 |
![]() | |
TString | fElementName |
Name of this data element. More... | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. More... | |
Int_t | fGoodEventCount |
Number of good events accumulated in this element. More... | |
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) More... | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags More... | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
![]() | |
bool | fUseExternalRandomVariable |
Flag to use an externally provided normal random variable. More... | |
double | fExternalRandomVariable |
Externally provided normal random variable. More... | |
Double_t | fMockAsymmetry |
Helicity asymmetry. More... | |
Double_t | fMockGaussianMean |
Mean of normal distribution. More... | |
Double_t | fMockGaussianSigma |
Sigma of normal distribution. More... | |
std::vector< Double_t > | fMockDriftAmplitude |
Harmonic drift amplitude. More... | |
std::vector< Double_t > | fMockDriftFrequency |
Harmonic drift frequency. More... | |
std::vector< Double_t > | fMockDriftPhase |
Harmonic drift phase. More... | |
![]() | |
static boost::mt19937 | fRandomnessGenerator |
Internal randomness generator. More... | |
static boost::normal_distribution < double > | fNormalDistribution |
Internal normal probability distribution. More... | |
static boost::variate_generator < boost::mt19937, boost::normal_distribution < double > > | fNormalRandomVariable |
Internal normal random variable. More... | |
Definition at line 30 of file QwVQWK_Channel.h.
|
inline |
Definition at line 54 of file QwVQWK_Channel.h.
References InitializeChannel(), and SetVQWKSaturationLimt().
|
inline |
Definition at line 58 of file QwVQWK_Channel.h.
References InitializeChannel(), and SetVQWKSaturationLimt().
|
inline |
Definition at line 62 of file QwVQWK_Channel.h.
|
inline |
Definition at line 70 of file QwVQWK_Channel.h.
|
inlinevirtual |
Definition at line 78 of file QwVQWK_Channel.h.
|
inline |
Definition at line 143 of file QwVQWK_Channel.h.
References VQwDataElement::fGoodEventCount.
Referenced by QwEnergyCalculator::AccumulateRunningSum(), QwQPD::AccumulateRunningSum(), QwBPMCavity::AccumulateRunningSum(), QwLinearDiodeArray::AccumulateRunningSum(), QwIntegrationPMT::AccumulateRunningSum(), AccumulateRunningSum(), and DeaccumulateRunningSum().
void QwVQWK_Channel::AccumulateRunningSum | ( | const QwVQWK_Channel & | value, |
Int_t | count | ||
) |
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 and
are defined
Recurrence relations for the addition of a single event:
For the addition of an already accumulated sum:
In these recursive formulas we start from and
.
To calculate the mean and standard deviation we use
The standard deviation is a biased estimator, but this is what ROOT uses. Better would be to divide by .
We use the formulas provided there for the calculation of the first and second moments (i.e. average and variance). Accumulate the running moments M1 and M2
value | Object (single event or accumulated) to add to running moments |
count | Number of good events in value |
Definition at line 1232 of file QwVQWK_Channel.cc.
References QwLog::endl(), fBlock, fBlockM2, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSumM2, fRunningSum, VQwDataElement::GetElementName(), PrintValue(), and QwWarning.
|
inlinevirtual |
Implements VQwHardwareChannel.
Definition at line 147 of file QwVQWK_Channel.h.
References AccumulateRunningSum().
void QwVQWK_Channel::AddChannelOffset | ( | Double_t | offset | ) |
This function will add a offset to the hw_sum and add the same offset for blocks.
Definition at line 1150 of file QwVQWK_Channel.cc.
References fBlock, fBlocksPerEvent, fHardwareBlockSum, and VQwDataElement::IsNameEmpty().
Referenced by QwBPMCavity::GetAbsolutePosition(), QwLinearDiodeArray::GetAbsolutePosition(), QwEnergyCalculator::ProcessEvent(), and QwBPMCavity::ProcessEvent().
|
virtual |
Reimplemented from VQwHardwareChannel.
Definition at line 1618 of file QwVQWK_Channel.cc.
References fErrorCount_HWSat, fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, fNumEvtsWithEventCutsRejected, VQwDataElement::GetElementName(), QwErrDBInterface::Reset(), QwErrDBInterface::SetDeviceName(), QwErrDBInterface::SetErrorCodeId(), and QwErrDBInterface::SetN().
Referenced by QwEnergyCalculator::GetErrDBEntry(), QwQPD::GetErrDBEntry(), QwBPMCavity::GetErrDBEntry(), QwLinearDiodeArray::GetErrDBEntry(), and QwIntegrationPMT::GetErrDBEntry().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 846 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 54 of file QwVQWK_Channel.cc.
References bDEBUG, VQwHardwareChannel::bEVENTCUTMODE, QwLog::endl(), fADC_Same_NumEvt, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fNumberOfSamples, fNumberOfSamples_map, fPrev_HardwareBlockSum, fSequenceNo_Counter, fSequenceNo_Prev, VQwDataElement::GetElementName(), GetNumberOfSamples(), GetRawHardwareSum(), GetRawSoftwareSum(), GetSequenceNumber(), GetVQWKSaturationLimt(), kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, kErrorFlag_VQWK_Sat, kErrorFlag_ZeroHW, kVQWK_VoltsPerBit, MatchNumberOfSamples(), MatchSequenceNumber(), and QwWarning.
Referenced by QwQPD::ApplyHWChecks(), QwBPMCavity::ApplyHWChecks(), QwLinearDiodeArray::ApplyHWChecks(), and QwIntegrationPMT::ApplyHWChecks().
Bool_t QwVQWK_Channel::ApplySingleEventCuts | ( | Double_t | LL, |
Double_t | UL | ||
) |
Definition at line 1492 of file QwVQWK_Channel.cc.
References VQwDataElement::fErrorFlag, GetHardwareSum(), and kPreserveError.
Referenced by QwEnergyCalculator::ApplySingleEventCuts(), QwQPD::ApplySingleEventCuts(), QwBPMCavity::ApplySingleEventCuts(), QwLinearDiodeArray::ApplySingleEventCuts(), and QwIntegrationPMT::ApplySingleEventCuts().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 1508 of file QwVQWK_Channel.cc.
References VQwHardwareChannel::bEVENTCUTMODE, VQwDataElement::fErrorFlag, VQwHardwareChannel::fLLimit, VQwHardwareChannel::fULimit, GetHardwareSum(), kErrorFlag_EventCut_L, and kErrorFlag_EventCut_U.
void QwVQWK_Channel::AssignScaledValue | ( | const QwVQWK_Channel & | value, |
Double_t | scale | ||
) |
Definition at line 811 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 834 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
Referenced by QwEnergyCalculator::ProcessEvent().
void QwVQWK_Channel::Blind | ( | const QwBlinder * | blinder | ) |
Blind this channel as an asymmetry.
Blind this channel as an asymmetry
blinder | Blinder |
Definition at line 1427 of file QwVQWK_Channel.cc.
References QwBlinder::BlindValue(), fBlock, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), and QwBlinder::ModifyThisErrorCode().
Referenced by QwIntegrationPMT::Blind().
void QwVQWK_Channel::Blind | ( | const QwBlinder * | blinder, |
const QwVQWK_Channel & | yield | ||
) |
Blind this channel as a difference.
Blind this channel as a difference with specified yield
blinder | Blinder |
yield | Corresponding yield |
Definition at line 1448 of file QwVQWK_Channel.cc.
References QwBlinder::BlindValue(), fBlock, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, QwBlinder::IsBlinderOkay(), VQwDataElement::IsNameEmpty(), and QwBlinder::ModifyThisErrorCode().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 1347 of file QwVQWK_Channel.cc.
References fBlockError, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorConfigFlag, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSumError, fHardwareBlockSumM2, VQwHardwareChannel::fStability, VQwHardwareChannel::GetValueWidth(), kBeamStabilityError, and kStabilityCut.
Referenced by QwEnergyCalculator::CalculateRunningAverage(), QwQPD::CalculateRunningAverage(), QwBPMCavity::CalculateRunningAverage(), QwLinearDiodeArray::CalculateRunningAverage(), and QwIntegrationPMT::CalculateRunningAverage().
|
virtual |
Clear the event data in this element.
Reimplemented from VQwHardwareChannel.
Definition at line 241 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockError, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, and fSoftwareBlockSum_raw.
Referenced by QwEnergyCalculator::ClearEventData(), QwBPMCavity::ClearEventData(), QwLinearDiodeArray::ClearEventData(), QwQPD::ClearEventData(), QwIntegrationPMT::ClearEventData(), InitializeChannel(), QwEnergyCalculator::ProcessEvent(), QwQPD::ProcessEvent(), and QwLinearDiodeArray::ProcessEvent().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 687 of file QwVQWK_Channel.cc.
References fHardwareBlockSum, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), and kDEBUG.
Referenced by QwEnergyCalculator::ConstructBranch(), QwQPD::ConstructBranch(), QwBPMCavity::ConstructBranch(), QwLinearDiodeArray::ConstructBranch(), and QwIntegrationPMT::ConstructBranch().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 591 of file QwVQWK_Channel.cc.
References bBlock, bBlock_raw, bDevice_Error_Code, bHw_sum, bHw_sum_raw, bNum_samples, bSequence_number, QwLog::endl(), VQwHardwareChannel::fDataToSave, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwDataElement::GetElementName(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), gQwHists, VQwDataElement::IsNameEmpty(), kDEBUG, VQwDataElement::kRaw, QwHistogramHelper::MatchDeviceParamsFromList(), QwHistogramHelper::MatchVQWKElementFromList(), and QwMessage.
Referenced by QwEnergyCalculator::ConstructBranchAndVector(), QwQPD::ConstructBranchAndVector(), QwBPMCavity::ConstructBranchAndVector(), QwLinearDiodeArray::ConstructBranchAndVector(), and QwIntegrationPMT::ConstructBranchAndVector().
|
virtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Definition at line 481 of file QwVQWK_Channel.cc.
References QwHistogramHelper::Construct1DHist(), fBlocksPerEvent, VQwHardwareChannel::fDataToSave, MQwHistograms::fHistograms, VQwDataElement::GetElementName(), gQwHists, VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, and VQwDataElement::kRaw.
Referenced by QwEnergyCalculator::ConstructHistograms(), QwQPD::ConstructHistograms(), QwBPMCavity::ConstructHistograms(), QwLinearDiodeArray::ConstructHistograms(), and QwIntegrationPMT::ConstructHistograms().
|
inline |
Definition at line 152 of file QwVQWK_Channel.h.
References AccumulateRunningSum().
Referenced by QwEnergyCalculator::DeaccumulateRunningSum(), QwQPD::DeaccumulateRunningSum(), QwBPMCavity::DeaccumulateRunningSum(), QwLinearDiodeArray::DeaccumulateRunningSum(), and QwIntegrationPMT::DeaccumulateRunningSum().
void QwVQWK_Channel::Difference | ( | const QwVQWK_Channel & | value1, |
const QwVQWK_Channel & | value2 | ||
) |
Definition at line 1042 of file QwVQWK_Channel.cc.
Referenced by QwLinearDiodeArray::ProcessEvent(), and QwQPD::ProcessEvent().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 882 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
Referenced by QwIntegrationPMT::Normalize().
void QwVQWK_Channel::DivideBy | ( | const QwVQWK_Channel & | denom | ) |
Definition at line 1173 of file QwVQWK_Channel.cc.
|
virtual |
Encode the event data into a CODA buffer.
Implements MQwMockable.
Definition at line 331 of file QwVQWK_Channel.cc.
References fBlock_raw, fHardwareBlockSum_raw, fNumberOfSamples, fSequenceNumber, and VQwDataElement::IsNameEmpty().
Referenced by QwIntegrationPMT::EncodeEventData().
|
virtual |
Fill the histograms for this data element.
Implements VQwDataElement.
Definition at line 533 of file QwVQWK_Channel.cc.
References fBlocksPerEvent, VQwHardwareChannel::fDataToSave, VQwDataElement::fErrorFlag, MQwHistograms::fHistograms, GetBlockValue(), GetHardwareSum(), GetRawBlockValue(), GetRawHardwareSum(), GetRawSoftwareSum(), VQwDataElement::IsNameEmpty(), VQwDataElement::kDerived, kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, kErrorFlag_VQWK_Sat, kErrorFlag_ZeroHW, and VQwDataElement::kRaw.
Referenced by QwEnergyCalculator::FillHistograms(), QwQPD::FillHistograms(), QwBPMCavity::FillHistograms(), QwLinearDiodeArray::FillHistograms(), and QwIntegrationPMT::FillHistograms().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 704 of file QwVQWK_Channel.cc.
References bBlock, bBlock_raw, bDEBUG, bDevice_Error_Code, bHw_sum, bHw_sum_raw, bNum_samples, bSequence_number, fBlocksPerEvent, VQwHardwareChannel::fDataToSave, VQwDataElement::fErrorFlag, fNumberOfSamples, fSequenceNumber, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, GetBlockValue(), GetHardwareSum(), GetRawBlockValue(), GetRawHardwareSum(), VQwDataElement::IsNameEmpty(), and VQwDataElement::kRaw.
Referenced by QwEnergyCalculator::FillTreeVector(), QwBPMCavity::FillTreeVector(), QwQPD::FillTreeVector(), QwLinearDiodeArray::FillTreeVector(), and QwIntegrationPMT::FillTreeVector().
Double_t QwVQWK_Channel::GetAverageVolts | ( | ) | const |
Definition at line 442 of file QwVQWK_Channel.cc.
References fHardwareBlockSum, fNumberOfSamples, and kVQWK_VoltsPerBit.
|
inlineprivate |
Definition at line 245 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetValueError().
Referenced by PrintValue().
|
inlineprivate |
Definition at line 244 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetValue().
Referenced by FillHistograms(), FillTreeVector(), and PrintValue().
|
static |
Class: QwVQWK_Channel Base class containing decoding functions for the VQWK_Channel 6 32-bit datawords. The functions in this class will decode a single channel worth of VQWK_Channel data and provide the components through member functions.
Static member function to return the word offset within a data buffer given the module number index and the channel number index.
moduleindex | Module index within this buffer; counts from zero |
channelindex | Channel index within this module; counts from zero |
Definition at line 33 of file QwVQWK_Channel.cc.
References QwLog::endl(), kMaxChannels, kWordsPerChannel, and QwError.
Referenced by QwMainCerenkovDetector::LoadChannelMap(), QwIntegratedRaster::LoadChannelMap(), QwLumi::LoadChannelMap(), QwScanner::LoadChannelMap(), and QwBeamDetectorID::QwBeamDetectorID().
|
inlineprivate |
Definition at line 247 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetValue().
Referenced by ApplySingleEventCuts(), FillHistograms(), FillTreeVector(), operator<<(), and PrintValue().
|
inlineprivate |
Definition at line 250 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetValueError().
Referenced by PrintValue().
|
inlineprivate |
Definition at line 248 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetValueM2().
|
inlineprivate |
Definition at line 249 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetValueWidth().
Referenced by PrintValue().
|
inline |
Definition at line 219 of file QwVQWK_Channel.h.
References fNumberOfSamples.
Referenced by QwQPD::ApplyHWChecks(), QwBPMCavity::ApplyHWChecks(), QwLinearDiodeArray::ApplyHWChecks(), and ApplyHWChecks().
|
inlineprivate |
Definition at line 253 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetRawValue().
Referenced by FillHistograms(), and FillTreeVector().
|
inlineprivate |
Definition at line 254 of file QwVQWK_Channel.h.
References VQwHardwareChannel::GetRawValue().
Referenced by ApplyHWChecks(), FillHistograms(), and FillTreeVector().
|
inlineprivate |
Definition at line 255 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and FillHistograms().
|
inlinevirtual |
Implements VQwHardwareChannel.
Definition at line 194 of file QwVQWK_Channel.h.
References fBlock_raw, fHardwareBlockSum_raw, and VQwHardwareChannel::RangeCheck().
|
inline |
Definition at line 218 of file QwVQWK_Channel.h.
References fSequenceNumber.
Referenced by QwQPD::ApplyHWChecks(), QwBPMCavity::ApplyHWChecks(), QwLinearDiodeArray::ApplyHWChecks(), ApplyHWChecks(), QwLinearDiodeArray::ProcessEvent(), and QwQPD::ProcessEvent().
|
inlinevirtual |
Implements VQwHardwareChannel.
Definition at line 199 of file QwVQWK_Channel.h.
References fBlock, fHardwareBlockSum, and VQwHardwareChannel::RangeCheck().
Referenced by QwIntegrationPMT::GetValue(), QwEnergyCalculator::ProcessEvent(), QwLinearDiodeArray::ProcessEvent(), QwQPD::ProcessEvent(), and QwBlinder::Update().
|
inlinevirtual |
Implements VQwHardwareChannel.
Definition at line 209 of file QwVQWK_Channel.h.
References fBlockError, fHardwareBlockSumError, and VQwHardwareChannel::RangeCheck().
|
inlinevirtual |
Implements VQwHardwareChannel.
Definition at line 204 of file QwVQWK_Channel.h.
References fBlockM2, fHardwareBlockSumM2, and VQwHardwareChannel::RangeCheck().
|
inline |
Definition at line 176 of file QwVQWK_Channel.h.
References fSaturationABSLimit.
Referenced by ApplyHWChecks().
void QwVQWK_Channel::IncrementErrorCounters | ( | ) |
Definition at line 130 of file QwVQWK_Channel.cc.
References fErrorCount_HWSat, fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, VQwDataElement::fErrorFlag, fNumEvtsWithEventCutsRejected, kErrorFlag_EventCut_L, kErrorFlag_EventCut_U, kErrorFlag_SameHW, kErrorFlag_sample, kErrorFlag_Sequence, kErrorFlag_SW_HW, kErrorFlag_VQWK_Sat, and kErrorFlag_ZeroHW.
Referenced by QwEnergyCalculator::IncrementErrorCounters(), QwQPD::IncrementErrorCounters(), QwBPMCavity::IncrementErrorCounters(), QwIntegrationPMT::IncrementErrorCounters(), and QwLinearDiodeArray::IncrementErrorCounters().
|
virtual |
Initialize the fields in this object.
Implements VQwHardwareChannel.
Definition at line 151 of file QwVQWK_Channel.cc.
References VQwHardwareChannel::bEVENTCUTMODE, ClearEventData(), fADC_Same_NumEvt, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, VQwDataElement::fErrorConfigFlag, fErrorCount_HWSat, fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, VQwHardwareChannel::fLLimit, MQwMockable::fMockAsymmetry, MQwMockable::fMockDriftAmplitude, MQwMockable::fMockDriftFrequency, MQwMockable::fMockDriftPhase, MQwMockable::fMockGaussianMean, MQwMockable::fMockGaussianSigma, fNumberOfSamples, fNumberOfSamples_map, fNumEvtsWithEventCutsRejected, VQwHardwareChannel::fPedestal, fPrev_HardwareBlockSum, fPreviousSequenceNumber, fRunningSum, fSequenceNo_Counter, fSequenceNo_Prev, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwHardwareChannel::fULimit, MQwMockable::fUseExternalRandomVariable, VQwHardwareChannel::kFoundGain, VQwHardwareChannel::kFoundPedestal, VQwHardwareChannel::SetDataToSave(), VQwDataElement::SetElementName(), VQwHardwareChannel::SetNumberOfDataWords(), and VQwHardwareChannel::SetNumberOfSubElements().
Referenced by QwEnergyCalculator::InitializeChannel(), QwQPD::InitializeChannel(), QwIntegrationPMT::InitializeChannel(), QwBPMCavity::InitializeChannel(), QwLinearDiodeArray::InitializeChannel(), InitializeChannel(), QwBeamMod::LoadChannelMap(), QwEnergyCalculator::ProcessEvent(), QwLinearDiodeArray::ProcessEvent(), QwQPD::ProcessEvent(), and QwVQWK_Channel().
|
virtual |
Initialize the fields in this object.
Implements VQwHardwareChannel.
Definition at line 221 of file QwVQWK_Channel.cc.
References InitializeChannel(), VQwDataElement::SetModuleType(), and VQwDataElement::SetSubsystemName().
|
virtual |
Reimplemented from VQwDataElement.
Definition at line 228 of file QwVQWK_Channel.cc.
References QwLog::endl(), VQwDataElement::GetElementName(), QwWarning, QwParameterFile::ReturnValue(), and SetDefaultSampleSize().
Bool_t QwVQWK_Channel::MatchNumberOfSamples | ( | size_t | numsamp | ) |
Definition at line 1474 of file QwVQWK_Channel.cc.
References bDEBUG, fNumberOfSamples, VQwDataElement::GetElementName(), and VQwDataElement::IsNameEmpty().
Referenced by ApplyHWChecks().
Bool_t QwVQWK_Channel::MatchSequenceNumber | ( | size_t | seqnum | ) |
Definition at line 1464 of file QwVQWK_Channel.cc.
References fSequenceNumber, and VQwDataElement::IsNameEmpty().
Referenced by ApplyHWChecks().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 870 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
const QwVQWK_Channel QwVQWK_Channel::operator* | ( | const QwVQWK_Channel & | value | ) | const |
Definition at line 951 of file QwVQWK_Channel.cc.
QwVQWK_Channel & QwVQWK_Channel::operator*= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 958 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 1006 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
const QwVQWK_Channel QwVQWK_Channel::operator+ | ( | const QwVQWK_Channel & | value | ) | const |
Definition at line 896 of file QwVQWK_Channel.cc.
QwVQWK_Channel & QwVQWK_Channel::operator+= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 903 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 978 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
const QwVQWK_Channel QwVQWK_Channel::operator- | ( | const QwVQWK_Channel & | value | ) | const |
Definition at line 924 of file QwVQWK_Channel.cc.
QwVQWK_Channel & QwVQWK_Channel::operator-= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 931 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 992 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 1020 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
|
protected |
Definition at line 1066 of file QwVQWK_Channel.cc.
References QwLog::endl(), fBlock, fBlockM2, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSumM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), QwVerbose, and QwWarning.
QwVQWK_Channel & QwVQWK_Channel::operator= | ( | const QwVQWK_Channel & | value | ) |
Definition at line 787 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::IsNameEmpty(), and VQwHardwareChannel::operator=().
|
static |
Definition at line 1544 of file QwVQWK_Channel.cc.
References QwLog::endl(), and QwMessage.
Referenced by QwBeamLine::PrintErrorCounters(), QwMainCerenkovDetector::PrintErrorCounters(), QwIntegratedRaster::PrintErrorCounters(), QwBeamMod::PrintErrorCounters(), and QwLumi::PrintErrorCounters().
|
virtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 1567 of file QwVQWK_Channel.cc.
References QwLog::endl(), VQwHardwareChannel::fDataToSave, fErrorCount_HWSat, fErrorCount_SameHW, fErrorCount_sample, fErrorCount_Sequence, fErrorCount_SW_HW, fErrorCount_ZeroHW, fNumEvtsWithEventCutsRejected, VQwDataElement::GetElementName(), VQwHardwareChannel::kFoundGain, VQwHardwareChannel::kFoundPedestal, VQwDataElement::kRaw, and QwMessage.
Referenced by QwIntegrationPMT::PrintErrorCounters(), QwEnergyCalculator::PrintErrorCounters(), QwQPD::PrintErrorCounters(), QwBPMCavity::PrintErrorCounters(), and QwLinearDiodeArray::PrintErrorCounters().
|
static |
Definition at line 1561 of file QwVQWK_Channel.cc.
References QwLog::endl(), and QwMessage.
Referenced by QwBeamLine::PrintErrorCounters(), QwMainCerenkovDetector::PrintErrorCounters(), QwIntegratedRaster::PrintErrorCounters(), QwBeamMod::PrintErrorCounters(), and QwLumi::PrintErrorCounters().
|
virtual |
Print multiple lines of information about this data element.
Reimplemented from VQwDataElement.
Definition at line 451 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumError, fHardwareBlockSumM2, fNumberOfSamples, VQwHardwareChannel::fPedestal, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::GetElementName(), VQwDataElement::GetModuleType(), and VQwDataElement::GetSubsystemName().
Referenced by QwEnergyCalculator::PrintInfo(), QwBPMCavity::PrintInfo(), QwLinearDiodeArray::PrintInfo(), QwIntegrationPMT::PrintInfo(), QwBPMCavity::ProcessEvent(), and QwQPD::ProcessEvent().
|
virtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 1389 of file QwVQWK_Channel.cc.
References QwLog::endl(), VQwDataElement::fGoodEventCount, GetBlockErrorValue(), GetBlockValue(), VQwDataElement::GetElementName(), VQwDataElement::GetGoodEventCount(), GetHardwareSum(), GetHardwareSumError(), GetHardwareSumWidth(), VQwDataElement::GetModuleType(), VQwDataElement::GetSubsystemName(), and QwMessage.
Referenced by AccumulateRunningSum(), QwEnergyCalculator::PrintValue(), QwBPMCavity::PrintValue(), QwLinearDiodeArray::PrintValue(), and QwIntegrationPMT::PrintValue().
|
virtual |
Decode the event data from a CODA buffer.
Implements VQwDataElement.
Definition at line 358 of file QwVQWK_Channel.cc.
References fBlock_raw, fBlocksPerEvent, fHardwareBlockSum_raw, VQwHardwareChannel::fNumberOfDataWords, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, VQwDataElement::IsNameEmpty(), and kWordsPerChannel.
Referenced by QwIntegrationPMT::ProcessEvBuffer(), QwBPMCavity::ProcessEvBuffer(), QwLinearDiodeArray::ProcessEvBuffer(), and QwQPD::ProcessEvBuffer().
void QwVQWK_Channel::ProcessEvent | ( | ) |
Process the event data according to pedestal and calibration factor.
Definition at line 405 of file QwVQWK_Channel.cc.
References QwLog::endl(), fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, VQwHardwareChannel::fPedestal, VQwDataElement::GetElementName(), kErrorFlag_sample, and QwWarning.
Referenced by QwBPMCavity::ProcessEvent(), QwQPD::ProcessEvent(), QwLinearDiodeArray::ProcessEvent(), and QwIntegrationPMT::ProcessEvent().
void QwVQWK_Channel::Product | ( | const QwVQWK_Channel & | value1, |
const QwVQWK_Channel & | value2 | ||
) |
Definition at line 1124 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
Referenced by QwLinearDiodeArray::ProcessEvent().
|
virtual |
Internally generate random event data.
Implements MQwMockable.
Definition at line 261 of file QwVQWK_Channel.cc.
References fBlocksPerEvent, MQwMockable::fMockAsymmetry, MQwMockable::fMockDriftAmplitude, MQwMockable::fMockDriftFrequency, MQwMockable::fMockDriftPhase, MQwMockable::fMockGaussianMean, MQwMockable::fMockGaussianSigma, MQwMockable::GetRandomValue(), Qw::pi, and SetEventData().
Referenced by QwIntegrationPMT::RandomizeEventData().
void QwVQWK_Channel::Ratio | ( | const QwVQWK_Channel & | numer, |
const QwVQWK_Channel & | denom | ||
) |
Definition at line 1048 of file QwVQWK_Channel.cc.
References fBlock_raw, fBlocksPerEvent, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, fHardwareBlockSum_raw, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
Referenced by QwLinearDiodeArray::ProcessEvent(), QwQPD::ProcessEvent(), QwQPD::Ratio(), QwBPMCavity::Ratio(), QwLinearDiodeArray::Ratio(), and QwIntegrationPMT::Ratio().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 1159 of file QwVQWK_Channel.cc.
References fBlock, fBlockM2, fBlocksPerEvent, fHardwareBlockSum, fHardwareBlockSumM2, and VQwDataElement::IsNameEmpty().
Referenced by QwEnergyCalculator::ProcessEvent(), QwBPMCavity::ProcessEvent(), QwQPD::ProcessEvent(), QwLinearDiodeArray::ProcessEvent(), QwEnergyCalculator::Scale(), QwQPD::Scale(), QwBPMCavity::Scale(), QwLinearDiodeArray::Scale(), and QwIntegrationPMT::Scale().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 1589 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwDataElement::fErrorFlag, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, fSequenceNumber, fSoftwareBlockSum_raw, and VQwDataElement::IsNameEmpty().
|
inline |
Definition at line 221 of file QwVQWK_Channel.h.
References kVQWK_VoltsPerBit, and VQwHardwareChannel::SetCalibrationFactor().
|
inline |
Definition at line 89 of file QwVQWK_Channel.h.
References fNumberOfSamples_map.
Referenced by LoadChannelParameters(), and QwIntegrationPMT::SetDefaultSampleSize().
void QwVQWK_Channel::SetEventData | ( | Double_t * | block, |
UInt_t | sequencenumber = 0 |
||
) |
Definition at line 303 of file QwVQWK_Channel.cc.
References fBlock, fBlock_raw, fBlockM2, fBlocksPerEvent, VQwHardwareChannel::fCalibrationFactor, fHardwareBlockSum, fHardwareBlockSum_raw, fHardwareBlockSumM2, fNumberOfSamples, VQwHardwareChannel::fPedestal, fSequenceNumber, and fSoftwareBlockSum_raw.
Referenced by RandomizeEventData(), QwIntegrationPMT::SetEventData(), and SetHardwareSum().
void QwVQWK_Channel::SetHardwareSum | ( | Double_t | hwsum, |
UInt_t | sequencenumber = 0 |
||
) |
TODO: SetHardwareSum should be removed, and SetEventData should be made protected.
Definition at line 288 of file QwVQWK_Channel.cc.
References fBlocksPerEvent, and SetEventData().
Referenced by QwQPD::SetEventData(), QwBPMCavity::SetEventData(), QwLinearDiodeArray::SetEventData(), and QwIntegrationPMT::SetHardwareSum().
|
inline |
Definition at line 172 of file QwVQWK_Channel.h.
References fSaturationABSLimit.
Referenced by QwVQWK_Channel().
|
virtual |
Implements VQwHardwareChannel.
Definition at line 858 of file QwVQWK_Channel.cc.
References VQwDataElement::GetElementName().
void QwVQWK_Channel::Sum | ( | const QwVQWK_Channel & | value1, |
const QwVQWK_Channel & | value2 | ||
) |
Definition at line 1036 of file QwVQWK_Channel.cc.
Referenced by QwQPD::ProcessEvent().
|
friend |
Definition at line 1417 of file QwVQWK_Channel.cc.
|
private |
Definition at line 342 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 343 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
staticprivate |
debugging display purposes
For VQWK data element trimming uses
Definition at line 337 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), FillTreeVector(), and MatchNumberOfSamples().
|
private |
Definition at line 345 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 340 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 341 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 344 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 346 of file QwVQWK_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Keep track of how many events with same ADC value returned.
Definition at line 327 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Array of the sub-block data.
Definition at line 289 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AddChannelOffset(), AssignScaledValue(), Blind(), ClearEventData(), GetValue(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), Scale(), ScaledAdd(), and SetEventData().
|
private |
Array of the sub-block data as read from the module.
Definition at line 283 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), ClearEventData(), EncodeEventData(), GetRawValue(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), Ratio(), ScaledAdd(), and SetEventData().
|
private |
Uncertainty on the sub-block.
Definition at line 298 of file QwVQWK_Channel.h.
Referenced by CalculateRunningAverage(), ClearEventData(), and GetValueError().
|
private |
Second moment of the sub-block.
Definition at line 297 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueM2(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), ProcessEvent(), Product(), Scale(), ScaledAdd(), and SetEventData().
|
private |
Definition at line 277 of file QwVQWK_Channel.h.
Referenced by AddChannelOffset(), AssignScaledValue(), Blind(), CalculateRunningAverage(), ClearEventData(), ConstructHistograms(), FillHistograms(), FillTreeVector(), InitializeChannel(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), RandomizeEventData(), Ratio(), Scale(), ScaledAdd(), SetEventData(), and SetHardwareSum().
|
private |
check to see ADC channel is saturated
Definition at line 313 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
check to see ADC returning same HW value
Definition at line 317 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
for sample size check
Definition at line 314 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
sequence number check
Definition at line 316 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
HW_sum==SW_sum check.
Definition at line 315 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
check to see ADC returning zero
Definition at line 318 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
Module-based sum of the four sub-blocks.
Definition at line 290 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AddChannelOffset(), AssignScaledValue(), Blind(), ClearEventData(), ConstructBranch(), GetAverageVolts(), GetValue(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), Scale(), ScaledAdd(), and SetEventData().
|
private |
Module-based sum of the four sub-blocks as read from the module.
Definition at line 284 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), ClearEventData(), EncodeEventData(), GetRawValue(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), Ratio(), ScaledAdd(), and SetEventData().
|
private |
Uncertainty on the hardware sum.
Definition at line 301 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueError(), operator=(), and PrintInfo().
|
private |
Second moment of the hardware sum.
Definition at line 300 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), AssignScaledValue(), CalculateRunningAverage(), ClearEventData(), GetValueM2(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), PrintInfo(), ProcessEvent(), Product(), Scale(), ScaledAdd(), and SetEventData().
|
private |
Number of samples read through the module.
Definition at line 307 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), AssignScaledValue(), ClearEventData(), EncodeEventData(), FillTreeVector(), GetAverageVolts(), GetNumberOfSamples(), InitializeChannel(), MatchNumberOfSamples(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), ProcessEvent(), Product(), Ratio(), ScaledAdd(), and SetEventData().
|
private |
Number of samples in the expected to read through the module. This value is set in the QwBeamline map file.
Definition at line 308 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), InitializeChannel(), and SetDefaultSampleSize().
|
private |
Counts the Event cut rejected events.
Definition at line 320 of file QwVQWK_Channel.h.
Referenced by AddErrEntriesToList(), IncrementErrorCounters(), InitializeChannel(), and PrintErrorCounters().
|
private |
Previous Module-based sum of the four sub-blocks.
Definition at line 330 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Previous event sequence number for this channel.
Definition at line 306 of file QwVQWK_Channel.h.
Referenced by InitializeChannel().
|
private |
Pointer to the running sum for this channel.
Definition at line 263 of file QwVQWK_Channel.h.
Referenced by AccumulateRunningSum(), and InitializeChannel().
|
private |
absolute value of the VQWK saturation volt
Definition at line 334 of file QwVQWK_Channel.h.
Referenced by GetVQWKSaturationLimt(), and SetVQWKSaturationLimt().
|
private |
Internal counter to keep track of the sequence number.
Definition at line 329 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Keep the sequence number of the last event.
Definition at line 328 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), and InitializeChannel().
|
private |
Event sequence number for this channel.
Definition at line 305 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), ClearEventData(), EncodeEventData(), FillTreeVector(), GetSequenceNumber(), MatchSequenceNumber(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), Product(), Ratio(), ScaledAdd(), and SetEventData().
|
private |
Sum of the data in the four sub-blocks raw.
Definition at line 285 of file QwVQWK_Channel.h.
Referenced by AssignScaledValue(), ClearEventData(), operator*=(), operator+=(), operator-=(), operator=(), PrintInfo(), ProcessEvBuffer(), Product(), Ratio(), ScaledAdd(), and SetEventData().
|
staticprivate |
Definition at line 255 of file QwVQWK_Channel.h.
Referenced by ConstructBranch(), and ConstructBranchAndVector().
|
staticprivate |
Definition at line 260 of file QwVQWK_Channel.h.
Referenced by GetBufferOffset().
|
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 267 of file QwVQWK_Channel.h.
Referenced by ApplyHWChecks(), GetAverageVolts(), and SetCalibrationToVolts().
|
staticprivate |
Definition at line 259 of file QwVQWK_Channel.h.
Referenced by GetBufferOffset(), and ProcessEvBuffer().