25#ifdef __USE_DATABASE__
118 void InitializeChannel(TString subsystem, TString instrumenttype, TString name, TString datatosave)
override;
143 void SetEventData(Double_t* block, UInt_t sequencenumber = 0);
149 UInt_t header_num_words,
150 UInt_t header_block_number,
179 Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left, UInt_t index = 0)
override;
213 void Scale(Double_t Offset)
override;
225 if (tmp_ptr != NULL) {
228 throw std::invalid_argument(
"Standard exception from QwMollerADC_Channel::AccumulateRunningSum: incompatible hardware channel type");
277#ifdef HAS_RNTUPLE_SUPPORT
278 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
279 void FillNTupleVector(std::vector<Double_t>& values)
const override;
324#ifdef __USE_DATABASE__
ROOT file and tree management wrapper classes.
unsigned long long ULong64_t
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)
Short_t fBlock_numSamples[kMaxBlock+1]
Int_t GetRawSoftwareSum() const
static EDecodeMode fDecodeMode
Int_t ProcessEvBuffer_oldmock(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0)
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
static constexpr Int_t kOldMockWordsPerChannel
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
void SetHeaderPacketCount(ULong64_t x)
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 SetHeaderBlockNumber(UInt_t x)
void SetHardwareSum(Double_t hwsum, UInt_t sequencenumber=0)
static void PrintErrorCounterHead()
void LoadChannelParameters(QwParameterFile ¶mfile) override
static Int_t GetWordsPerChannel()
static Int_t GetDefaultBlocksPerEvent()
static void SetDecodeMode(UInt_t input)
Double_t GetValueM2() const
UInt_t GetHeaderBlockNumber() 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.
ULong64_t fRegionTimestamp
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
static constexpr Int_t kOldMockDefaultBlocks
Double_t fBlockM2[kMaxBlock]
Second moment of the sub-block.
Bool_t ApplySingleEventCuts() override
Int_t GetRawValue(size_t element) const override
void MultiplyBy(const VQwHardwareChannel *valueptr) override
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.
static constexpr Int_t kNewReshuffledDefaultBlocks
Double_t fBlockError[kMaxBlock]
Uncertainty on the sub-block.
Int_t GetRawBlockValue(size_t blocknum) const
QwMollerADC_Channel & operator-=(const QwMollerADC_Channel &value)
static Int_t GetModuleHeaderWords()
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
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)
UInt_t fHeaderBlockNumber
static constexpr Int_t kMaxBlock
void DivideBy(const VQwHardwareChannel *valueptr) override
Int_t fBlock_min[kMaxBlock+1]
Int_t fNumEvtsWithEventCutsRejected
Counts the Event cut rejected events.
void SetEventData(Double_t *block, UInt_t sequencenumber=0)
Int_t fBlock_max[kMaxBlock+1]
void Scale(Double_t Offset) override
Long64_t fSoftwareBlockSum_raw
Sum of the data in the four sub-blocks raw.
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
Double_t fSaturationABSLimit
absolute value of the MollerADC saturation volt
Double_t GetValue(size_t element) const override
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
static constexpr Int_t kNewReshuffledChannelsPerModule
Long64_t fHardwareBlockSum_raw
Module-based sum of the four sub-blocks as read from the module.
Double_t fHardwareBlockSumRMS
void SetHeaderTSamples(ULong64_t x)
void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
void SetCalibrationToVolts()
UInt_t GetHeaderNumWords() const
static constexpr Int_t kOldMockChannelsPerModule
static Int_t GetBufferOffset(Int_t moduleindex, Int_t channelindex)
ULong64_t GetHeaderTSamples() const
Long64_t fBlock_raw[kMaxBlock]
Array of the sub-block data as read from the module.
Double_t GetHardwareSumRMS() const
Int_t fErrorCount_SameHW
check to see ADC returning same HW value
void FillHistograms() override
Fill the histograms for this data element.
UInt_t GetRegionNumber() const
ULong64_t GetHeaderPacketCount() const
Int_t GetRawHardwareSum() const
ULong64_t fHeaderPacketCount
Double_t GetValueM2(size_t element) const override
static Bool_t fDecodeModeHasBeenSet
static const Int_t kModuleHeaderWords
Int_t ApplyHWChecks() override
ULong64_t fHeaderTSamples
void SetMollerADCSaturationLimt(Double_t sat_volts=8.5)
Int_t fErrorCount_Sequence
sequence number check
~QwMollerADC_Channel() override
static void PrintErrorCounterTail()
void SetMollerADCHeaderData(UInt_t region_number, ULong64_t region_timestamp, UInt_t header_num_words, UInt_t header_block_number, ULong64_t header_packet_count, ULong64_t header_tsamples)
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.
ULong64_t GetRegionTimestamp() const
Double_t GetValueWidth() const
Double_t GetBlockRMS(Int_t i) 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)
UInt_t fBlockSample[kMaxBlock+1]
Double_t GetBlockValue(size_t blocknum) const
Int_t ProcessEvBuffer_newreshuffled(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0)
void PrintInfo() const override
Print multiple lines of information about this data element.
void SubtractValueFrom(const VQwHardwareChannel *valueptr) override
void SetRegionNumber(UInt_t x)
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
void SetRegionTimestamp(ULong64_t x)
Double_t GetHardwareSum() const
void FillTreeVector(QwRootTreeBranchVector &values) const override
void SetHeaderNumWords(UInt_t x)
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
Long64_t fBlockSumSq_raw[kMaxBlock+1]
void AccumulateRunningSum(const QwMollerADC_Channel &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
const QwMollerADC_Channel operator+(const QwMollerADC_Channel &value) const
Double_t fBlockRMS[kMaxBlock+1]
static const Bool_t bDEBUG
debugging display purposes
Double_t GetHardwareSumWidth() const
Double_t GetAverageVolts() const
static constexpr Int_t kNewReshuffledWordsPerChannel
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)
static Int_t GetChannelsPerModule()
Double_t GetHardwareSumError() const
void ConstructBranch(TTree *tree, TString &prefix) override
Double_t fBlock[kMaxBlock]
Array of the sub-block data.
Configuration file parser with flexible tokenization and search capabilities.
A helper class to manage a vector of branch entries for ROOT trees.
The pure virtual base class of all data elements.
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.