25#ifdef __USE_DATABASE__
117 void InitializeChannel(TString subsystem, TString instrumenttype, TString name, TString datatosave)
override;
143 void SetEventData(Double_t* block, UInt_t sequencenumber = 0);
149 Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left, UInt_t index = 0)
override;
181 void Scale(Double_t Offset)
override;
193 if (tmp_ptr != NULL) {
196 throw std::invalid_argument(
"Standard exception from QwMollerADC_Channel::AccumulateRunningSum: incompatible hardware channel type");
245#ifdef HAS_RNTUPLE_SUPPORT
246 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
247 void FillNTupleVector(std::vector<Double_t>& values)
const override;
292#ifdef __USE_DATABASE__
ROOT file and tree management wrapper classes.
virtual void LoadMockDataParameters(QwParameterFile ¶mfile)
Load the mock data parameters from the current line in the param file.
Concrete hardware channel for Moller ADC modules (6x32-bit words)
Long64_t fBlockSumSq_raw[5]
Int_t GetRawSoftwareSum() const
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) override
Decode the event data from a CODA buffer.
Double_t GetHardwareSumM2() const
Double_t GetValueError() const
const QwMollerADC_Channel operator*(const QwMollerADC_Channel &value) const
void AssignValueFrom(const VQwDataElement *valueptr) override
Double_t GetValueError(size_t element) const override
Int_t fErrorCount_SW_HW
HW_sum==SW_sum check.
VQwHardwareChannel & operator/=(const VQwHardwareChannel &input) override
QwMollerADC_Channel(TString name, TString datatosave="raw")
void AddChannelOffset(Double_t Offset)
void SetHardwareSum(Double_t hwsum, UInt_t sequencenumber=0)
static void PrintErrorCounterHead()
void LoadChannelParameters(QwParameterFile ¶mfile) override
Double_t GetValueM2() const
Bool_t bDevice_Error_Code
QwMollerADC_Channel & operator+=(const QwMollerADC_Channel &value)
void DeaccumulateRunningSum(const QwMollerADC_Channel &value, Int_t ErrorMask=0xFFFFFFF)
UInt_t fSequenceNumber
Event sequence number for this channel.
void RandomizeEventData(int helicity=0.0, double time=0.0) override
Internally generate random event data.
static const Bool_t kDEBUG
QwMollerADC_Channel(const QwMollerADC_Channel &value)
QwMollerADC_Channel & operator=(const QwMollerADC_Channel &value)
Double_t fPrev_HardwareBlockSum
Previous Module-based sum of the four sub-blocks.
QwMollerADC_Channel & operator*=(const QwMollerADC_Channel &value)
const QwMollerADC_Channel operator-(const QwMollerADC_Channel &value) const
Bool_t ApplySingleEventCuts() override
Int_t GetRawValue(size_t element) const override
void MultiplyBy(const VQwHardwareChannel *valueptr) override
Double_t fBlockError[4]
Uncertainty on the sub-block.
void PrintValue() const override
Print single line of value and error of this data element.
void ScaledAdd(Double_t scale, const VQwHardwareChannel *value) override
void Sum(const QwMollerADC_Channel &value1, const QwMollerADC_Channel &value2)
void ProcessEvent() override
Process the event data according to pedestal and calibration factor.
Int_t fSequenceNo_Counter
Internal counter to keep track of the sequence number.
Int_t GetRawBlockValue(size_t blocknum) const
QwMollerADC_Channel & operator-=(const QwMollerADC_Channel &value)
void PrintErrorCounters() const override
report number of events failed due to HW and event cut failure
Bool_t MatchSequenceNumber(size_t seqnum)
Double_t fHardwareBlockSum
Module-based sum of the four sub-blocks.
void InitializeChannel(TString name, TString datatosave) override
Initialize the fields in this object.
Double_t GetBlockErrorValue(size_t blocknum) const
Int_t fErrorCount_sample
for sample size check
Short_t fBlock_numSamples[5]
static const Int_t kMaxChannels
UInt_t fNumberOfSamples_map
Number of samples in the expected to read through the module. This value is set in the QwBeamline map...
void SetDefaultSampleSize(size_t num_samples_map)
void Blind(const QwBlinder *blinder)
Blind this channel as an asymmetry.
Int_t fErrorCount_ZeroHW
check to see ADC returning zero
void ArcTan(const QwMollerADC_Channel &value)
void DivideBy(const VQwHardwareChannel *valueptr) override
Int_t fNumEvtsWithEventCutsRejected
Counts the Event cut rejected events.
void SetEventData(Double_t *block, UInt_t sequencenumber=0)
void Scale(Double_t Offset) override
Double_t GetMollerADCSaturationLimt()
Int_t fErrorCount_HWSat
check to see ADC channel is saturated
QwMollerADC_Channel(const QwMollerADC_Channel &value, VQwDataElement::EDataToSave datatosave)
void Ratio(const QwMollerADC_Channel &numer, const QwMollerADC_Channel &denom)
void CopyParameters(const VQwHardwareChannel *valueptr) override
void SetRawEventData() override
Int_t fSoftwareBlockSum_raw
Sum of the data in the four sub-blocks raw.
Double_t fSaturationABSLimit
absolute value of the MollerADC saturation volt
Double_t GetValue(size_t element) const override
Int_t fBlock_raw[4]
Array of the sub-block data as read from the module.
static const Double_t kTimePerSample
void EncodeEventData(std::vector< UInt_t > &buffer) override
Encode the event data into a CODA buffer.
void AddValueFrom(const VQwHardwareChannel *valueptr) override
void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
void SetCalibrationToVolts()
static Int_t GetBufferOffset(Int_t moduleindex, Int_t channelindex)
Int_t fErrorCount_SameHW
check to see ADC returning same HW value
void FillHistograms() override
Fill the histograms for this data element.
Double_t fBlockM2[4]
Second moment of the sub-block.
Int_t GetRawHardwareSum() const
Double_t GetValueM2(size_t element) const override
Int_t ApplyHWChecks() override
void SetMollerADCSaturationLimt(Double_t sat_volts=8.5)
Int_t fErrorCount_Sequence
sequence number check
~QwMollerADC_Channel() override
static void PrintErrorCounterTail()
Int_t fHardwareBlockSum_raw
Module-based sum of the four sub-blocks as read from the module.
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Construct the histograms for this data element.
void ForceMapfileSampleSize()
VQwHardwareChannel * Clone(VQwDataElement::EDataToSave datatosave) const override
UInt_t fPreviousSequenceNumber
Previous event sequence number for this channel.
static const Int_t kWordsPerChannel
Double_t GetValueWidth() const
void IncrementErrorCounters() override
Double_t fHardwareBlockSumError
Uncertainty on the hardware sum.
friend std::ostream & operator<<(std::ostream &stream, const QwMollerADC_Channel &channel)
void CopyFrom(const QwMollerADC_Channel &value)
Double_t GetBlockValue(size_t blocknum) const
Double_t fBlock[4]
Array of the sub-block data.
void PrintInfo() const override
Print multiple lines of information about this data element.
void SubtractValueFrom(const VQwHardwareChannel *valueptr) override
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
Double_t GetHardwareSum() const
void FillTreeVector(QwRootTreeBranchVector &values) const override
Double_t GetValue() const
Int_t fADC_Same_NumEvt
Keep track of how many events with same ADC value returned.
size_t GetNumberOfSamples() const
void CalculateRunningAverage() override
void AccumulateRunningSum(const QwMollerADC_Channel &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
const QwMollerADC_Channel operator+(const QwMollerADC_Channel &value) const
static const Bool_t bDEBUG
debugging display purposes
Double_t GetHardwareSumWidth() const
Double_t GetAverageVolts() const
Int_t GetRawValue() const
Int_t fSequenceNo_Prev
Keep the sequence number of the last event.
void Product(const QwMollerADC_Channel &value1, const QwMollerADC_Channel &value2)
void AssignScaledValue(const QwMollerADC_Channel &value, Double_t scale)
void SmearByResolution(double resolution) override
Double_t fHardwareBlockSumM2
Second moment of the hardware sum.
static const Double_t kMollerADC_VoltsPerBit
void ClearEventData() override
Clear the event data in this element.
void Difference(const QwMollerADC_Channel &value1, const QwMollerADC_Channel &value2)
size_t GetSequenceNumber() const
UInt_t fNumberOfSamples
Number of samples read through the module.
Bool_t MatchNumberOfSamples(size_t numsamp)
Double_t GetHardwareSumError() const
void ConstructBranch(TTree *tree, TString &prefix) override
Configuration file parser with flexible tokenization and search capabilities.
A helper class to manage a vector of branch entries for ROOT trees.
VQwDataElement()
Default constructor.
Abstract base for concrete hardware channels implementing dual-operator pattern.
Double_t GetValueError() const
Double_t GetValueM2() const
void SetCalibrationFactor(Double_t factor)
void CopyFrom(const VQwHardwareChannel &value)
virtual VQwHardwareChannel * Clone() const
virtual void AddErrEntriesToList(std::vector< QwErrDBInterface > &)
Double_t GetValueWidth() const
void RangeCheck(size_t element) const
Checks that the requested element is in range, to be used in accesses to subelements similar to std::...
Double_t GetValue() const
Int_t GetRawValue() const
virtual void DeaccumulateRunningSum(const VQwHardwareChannel *value, Int_t ErrorMask=0xFFFFFFF)
virtual void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
Data blinding utilities for parity violation analysis.