19#ifdef HAS_RNTUPLE_SUPPORT
20#include <ROOT/RNTupleModel.hxx>
131 virtual Double_t
GetValue(
size_t element)
const = 0;
150 virtual void Scale(Double_t Offset) = 0;
156 virtual void InitializeChannel(TString subsystem, TString instrumenttype, TString name, TString datatosave) = 0;
166 Bool_t foundburp = kFALSE;
168 Double_t diff = this->
GetValue() -
event->GetValue();
190 void SetSingleEventCuts(UInt_t errorflag,Double_t min, Double_t max, Double_t stability=-1.0, Double_t BurpLevel=-1.0);
210 if (
this != &value) {
268#ifdef HAS_RNTUPLE_SUPPORT
269 virtual void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs) = 0;
270 virtual void FillNTupleVector(std::vector<Double_t>& values)
const = 0;
284 if (datatosave ==
"raw")
286 else if (datatosave ==
"derived")
299 if (prefix.Contains(
"asym_")
300 || prefix.Contains(
"diff_")
301 || prefix.Contains(
"yield_"))
303 if (prefix.Contains(
"stat"))
312 TString loc=
"VQwDataElement::RangeCheck for "
313 +this->
GetElementName()+
" failed for subelement "+Form(
"%zu",element);
314 throw std::out_of_range(loc.Data());
#define QwError
Predefined log drain for errors.
Definition of the pure virtual base class of all data elements.
static const UInt_t kErrorFlag_BurpCut
static const UInt_t kPreserveError
static std::ostream & endl(std::ostream &)
End of the line.
Configuration file parser with flexible tokenization and search capabilities.
A helper class to manage a vector of branch entries for ROOT trees.
UInt_t fGoodEventCount
Number of good events accumulated in this element.
VQwDataElement()
Default constructor.
virtual void ClearEventData()
Clear the event data in this element.
virtual UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return parameter is th...
virtual UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
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...
Bool_t IsNameEmpty() const
Is the name of this element empty?
VQwDataElement & operator=(const VQwDataElement &value)
Arithmetic assignment operator: Should only copy event-based data.
Abstract base for concrete hardware channels implementing dual-operator pattern.
void AddEntriesToList(std::vector< QwDBInterface > &row_list)
virtual void CalculateRunningAverage()=0
void SetSingleEventCuts(Double_t min, Double_t max)
Set the upper and lower limits (fULimit and fLLimit) for this channel.
virtual VQwHardwareChannel & operator/=(const VQwHardwareChannel &input)=0
void SetDataToSave(TString datatosave)
Set the flag indicating if raw or derived values are in this data element.
Double_t GetValueError() const
virtual void MultiplyBy(const VQwHardwareChannel *valueptr)=0
virtual void ScaledAdd(Double_t scale, const VQwHardwareChannel *value)=0
void UpdateErrorFlag(const VQwHardwareChannel &elem)
static Int_t fBurpHoldoff
size_t GetNumberOfSubelements()
Get the number of subelements in this data element.
virtual VQwHardwareChannel & operator+=(const VQwHardwareChannel &input)=0
Double_t GetCalibrationFactor() const
virtual void FillTreeVector(QwRootTreeBranchVector &values) const =0
Double_t GetValueM2() const
size_t GetNumberOfDataWords()
Get the number of data words in this data element.
static void SetBurpHoldoff(Int_t holdoff)
void SetCalibrationFactor(Double_t factor)
UInt_t fNumberOfSubElements
Number of subelements in this data element.
virtual Double_t GetValue(size_t element) const =0
virtual Double_t GetValueM2(size_t element) const =0
virtual UInt_t GetErrorCode() const
void SetDataToSave(VQwDataElement::EDataToSave datatosave)
Set the flag indicating if raw or derived values are in this data element.
Double_t GetEventCutUpperLimit() const
virtual void CopyParameters(const VQwHardwareChannel *)
void AssignScaledValue(const VQwHardwareChannel &value, Double_t scale)
virtual void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0
Double_t fCalibrationFactor
Double_t GetValueWidth(size_t element) const
virtual Int_t ApplyHWChecks()=0
void CopyFrom(const VQwHardwareChannel &value)
virtual void ConstructBranch(TTree *tree, TString &prefix)=0
UInt_t UpdateErrorFlag() override
Update the error flag based on the error flags of internally contained objects Return parameter is th...
~VQwHardwareChannel() override
virtual void InitializeChannel(TString subsystem, TString instrumenttype, TString name, TString datatosave)=0
virtual Bool_t CheckForBurpFail(const VQwHardwareChannel *event)
void SetNumberOfSubElements(const size_t elements)
Set the number of data words in this data element.
virtual void AddValueFrom(const VQwHardwareChannel *valueptr)=0
void SetPedestal(Double_t ped)
virtual Bool_t ApplySingleEventCuts()=0
virtual void SubtractValueFrom(const VQwHardwareChannel *valueptr)=0
virtual VQwHardwareChannel * Clone() const
size_t fTreeArrayNumEntries
VQwHardwareChannel & operator=(const VQwHardwareChannel &value)
Arithmetic assignment operator: Should only copy event-based data.
void SetNumberOfDataWords(const UInt_t &numwords)
Set the number of data words in this data element.
virtual void InitializeChannel(TString name, TString datatosave)=0
void InitializeChannel(TString name)
Initialize the fields in this object.
virtual VQwHardwareChannel & operator*=(const VQwHardwareChannel &input)=0
Double_t GetPedestal() const
virtual void Scale(Double_t Offset)=0
void ClearEventData() override
Clear the event data in this element.
virtual void AddErrEntriesToList(std::vector< QwErrDBInterface > &)
UInt_t fNumberOfDataWords
Number of raw data words 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.
Double_t GetValueWidth() const
virtual void IncrementErrorCounters()=0
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
virtual VQwHardwareChannel & operator-=(const VQwHardwareChannel &input)=0
virtual void DivideBy(const VQwHardwareChannel *valueptr)=0
virtual void ProcessEvent()=0
virtual Int_t GetRawValue(size_t element) const =0
Int_t GetRawValue() const
virtual VQwHardwareChannel * Clone(VQwDataElement::EDataToSave datatosave) const =0
virtual void Ratio(const VQwHardwareChannel *numer, const VQwHardwareChannel *denom)
void AssignValueFrom(const VQwDataElement *valueptr) override=0
virtual Double_t GetValueError(size_t element) const =0
virtual void DeaccumulateRunningSum(const VQwHardwareChannel *value, Int_t ErrorMask=0xFFFFFFF)
Double_t GetStabilityLimit() const
void SetEventCutMode(Int_t bcuts)
Double_t GetEventCutLowerLimit() const
virtual void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)