20#ifdef __USE_DATABASE__
95 void InitializeChannel(TString subsystem, TString instrumenttype, TString name, TString datatosave)
override;
127 Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left, UInt_t index = 0)
override;
159 void Scale(Double_t Offset)
override;
170 if (tmp_ptr != NULL) {
173 throw std::invalid_argument(
"Standard exception from QwADC18_Channel::AccumulateRunningSum: incompatible hardware channel type");
234#ifdef HAS_RNTUPLE_SUPPORT
235 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
236 void FillNTupleVector(std::vector<Double_t>& values)
const override;
257#ifdef __USE_DATABASE__
virtual void LoadMockDataParameters(QwParameterFile ¶mfile)
Load the mock data parameters from the current line in the param file.
Concrete hardware channel for HAPPEX 18-bit ADC modules.
static const Int_t kFooterWordsPerModule
static const Int_t kMaxChannels
Double_t GetValue(size_t element) const override
static const Int_t kHeaderWordsPerBank
Double_t fPrev_HardwareBlockSum
Previous Module-based sum of the four sub-blocks.
UInt_t fNumberOfSamples
Number of samples read through the module.
static const Int_t kHeaderWordsPerModule
static const Bool_t kDEBUG
Int_t fErrorCount_HWSat
check to see ADC channel is saturated
void PrintInfo() const override
Print multiple lines of information about this data element.
QwADC18_Channel & operator*=(const QwADC18_Channel &value)
static const Double_t kADC18_VoltsPerBit
void DeaccumulateRunningSum(const QwADC18_Channel &value, Int_t ErrorMask=0xFFFFFFF)
void AddValueFrom(const VQwHardwareChannel *valueptr) override
Int_t ApplyHWChecks() override
Int_t fErrorCount_SW_HW
HW_sum==SW_sum check.
void RandomizeEventData(int helicity=0.0, double time=0.0) override
Internally generate random event data.
void ProcessEvent() override
Process the event data according to pedestal and calibration factor.
static void PrintErrorCounterHead()
Double_t fSaturationABSLimit
absolute value of the ADC18 saturation volt
static const UInt_t mask3029x
static const Int_t kFooterWordsPerBank
const QwADC18_Channel operator+(const QwADC18_Channel &value) const
Int_t fSequenceNo_Counter
Internal counter to keep track of the sequence number.
Int_t fErrorCount_SameHW
check to see ADC returning same HW value
void FillHistograms() override
Fill the histograms for this data element.
void Product(const QwADC18_Channel &value1, const QwADC18_Channel &value2)
void SubtractValueFrom(const VQwHardwareChannel *valueptr) override
Int_t fErrorCount_sample
for sample size check
Int_t fSequenceNo_Prev
Keep the sequence number of the last event.
QwADC18_Channel(TString name, TString datatosave="raw")
void ArcTan(const QwADC18_Channel &value)
Double_t GetADC18SaturationLimt()
void Sum(const QwADC18_Channel &value1, const QwADC18_Channel &value2)
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Construct the histograms for this data element.
void Scale(Double_t Offset) override
void CalculateRunningAverage() override
size_t GetSequenceNumber() const
void Difference(const QwADC18_Channel &value1, const QwADC18_Channel &value2)
void PrintValue() const override
Print single line of value and error of this data element.
void FillTreeVector(QwRootTreeBranchVector &values) const override
Int_t fErrorCount_ZeroHW
check to see ADC returning zero
void ConstructBranch(TTree *tree, TString &prefix) override
static const UInt_t mask2422x
void AddChannelOffset(Double_t Offset)
void PrintErrorCounters() const override
report number of events failed due to HW and event cut failure
QwADC18_Channel * fDAC
Pointer to the DAC channel for this channel.
void AccumulateRunningSum(const QwADC18_Channel &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
static const UInt_t mask2625x
void Ratio(const QwADC18_Channel &numer, const QwADC18_Channel &denom)
static const UInt_t mask170x
Int_t fADC_Same_NumEvt
Keep track of how many events with same ADC value returned.
void SetRawEventData() override
void ClearEventData() override
Clear the event data in this element.
void ScaledAdd(Double_t scale, const VQwHardwareChannel *value) override
void AssignScaledValue(const QwADC18_Channel &value, Double_t scale)
const QwADC18_Channel operator-(const QwADC18_Channel &value) const
QwADC18_Channel & operator=(const QwADC18_Channel &value)
Bool_t MatchNumberOfSamples(size_t numsamp)
void ForceMapfileSampleSize()
void SetCalibrationToVolts()
static const Bool_t bDEBUG
debugging display purposes
QwADC18_Channel * fRunningSum
Pointer to the running sum for this channel.
QwADC18_Channel(const QwADC18_Channel &value)
Double_t GetValueError(size_t element) const override
void SmearByResolution(double resolution) override
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
Int_t GetRawValue(size_t element) const override
void SetADC18SaturationLimt(Double_t sat_volts=8.5)
void SetEventData(Double_t value)
void LoadChannelParameters(QwParameterFile ¶mfile) override
UInt_t fPreviousSequenceNumber
Previous event sequence number for this channel.
Int_t fNumEvtsWithEventCutsRejected
Counts the Event cut rejected events.
QwADC18_Channel & operator-=(const QwADC18_Channel &value)
static const UInt_t mask200x
static const UInt_t mask31x
VQwHardwareChannel & operator/=(const VQwHardwareChannel &input) override
Bool_t bDevice_Error_Code
~QwADC18_Channel() override
Double_t GetAverageVolts() const
void IncrementErrorCounters() override
void Blind(const QwBlinder *blinder)
Blind this channel as an asymmetry.
static const Double_t kTimePerSample
void MultiplyBy(const VQwHardwareChannel *valueptr) override
Bool_t ApplySingleEventCuts() override
QwADC18_Channel & operator+=(const QwADC18_Channel &value)
static const UInt_t mask2118x
static Int_t GetBufferOffset(Int_t moduleindex, Int_t channelindex)
Bool_t IsHeaderWord(UInt_t word) const
Decode the event data from a CODA buffer.
void InitializeChannel(TString name, TString datatosave) override
Initialize the fields in this object.
static void PrintErrorCounterTail()
QwADC18_Channel(const QwADC18_Channel &value, VQwDataElement::EDataToSave datatosave)
static const UInt_t mask21x
static const Int_t kDataWordsPerChannel
VQwHardwareChannel * Clone(VQwDataElement::EDataToSave datatosave) const override
Bool_t MatchSequenceNumber(size_t seqnum)
UInt_t fNumberOfSamples_map
Number of samples in the expected to read through the module. This value is set in the QwBeamline map...
size_t GetNumberOfSamples() const
Double_t GetValueM2(size_t element) const override
void AssignValueFrom(const VQwDataElement *valueptr) override
Int_t fErrorCount_Sequence
sequence number check
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) override
Process the CODA event buffer for this element.
void EncodeEventData(std::vector< UInt_t > &buffer) override
Encode the event data into a CODA buffer.
void DivideBy(const VQwHardwareChannel *valueptr) override
friend std::ostream & operator<<(std::ostream &stream, const QwADC18_Channel &channel)
void SetDefaultSampleSize(size_t num_samples_map)
const QwADC18_Channel operator*(const QwADC18_Channel &value) const
static const UInt_t mask150x
Int_t ProcessDataWord(UInt_t word)
void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
UInt_t fSequenceNumber
Event sequence number for this channel.
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)
virtual VQwHardwareChannel * Clone() const
virtual void AddErrEntriesToList(std::vector< QwErrDBInterface > &)
Double_t GetValueWidth() const
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.