16#ifdef HAS_RNTUPLE_SUPPORT
17#include "ROOT/RNTupleModel.hxx"
27#ifdef __USE_DATABASE__
46 QwClock(TString subsystemname, TString name, TString type =
""){
60 fClock.LoadChannelParameters(paramfile);
65 void InitializeChannel(TString subsystem, TString name, TString datatosave, TString type =
"")
override;
82 auto rhs =
dynamic_cast<const QwClock*
>(ev_error);
84 throw std::invalid_argument(
"Type mismatch in QwClock::CheckForBurpFail(VQwClock*)");
91 auto rhs =
dynamic_cast<const QwClock*
>(ev_error);
93 throw std::invalid_argument(
"Type mismatch in QwClock::CheckForBurpFail");
101 return fClock.GetEventcutErrorFlag();
109 void SetSingleEventCuts(UInt_t errorflag, Double_t min = 0, Double_t max = 0, Double_t stability = 0, Double_t burplevel = 0)
override;
114 fClock.SetEventCutMode(bcuts);
131 void Scale(Double_t factor)
override;
147#ifdef HAS_RNTUPLE_SUPPORT
148 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
149 void FillNTupleVector(std::vector<Double_t>& values)
const override;
152#ifdef __USE_DATABASE__
153 std::vector<QwDBInterface> GetDBEntry();
Parameter file parsing and management.
Definition of the pure virtual base class of all data elements.
const TString QwBPMStripline< T >::subelement[4]
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.
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.
Abstract base for concrete hardware channels implementing dual-operator pattern.
Standard clock channel with calibration representing frequency.
void SetEventCutMode(Int_t bcuts) override
VQwClock & operator+=(const VQwClock &value) override
void SetSingleEventCuts(UInt_t errorflag, Double_t min=0, Double_t max=0, Double_t stability=0, Double_t burplevel=0) override
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit),...
void AccumulateRunningSum(const VQwClock &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
VQwClock & operator=(const VQwClock &value) override
void ConstructBranch(TTree *tree, TString &prefix) override
void InitializeChannel(TString subsystem, TString name, TString datatosave, TString type="") override
Bool_t CheckForBurpFail(const VQwClock *ev_error) override
UInt_t UpdateErrorFlag() override
Update the error flag based on the error flags of internally contained objects Return parameter is th...
QwClock(TString subsystemname, TString name, TString type="")
void ClearEventData() override
Clear the event data in this element.
void PrintErrorCounters() const override
report number of events failed due to HW and event cut failure
Bool_t ApplySingleEventCuts() override
void CalculateRunningAverage() override
void DeaccumulateRunningSum(VQwClock &value, Int_t ErrorMask=0xFFFFFFF) override
Double_t fNormalizationValue
void IncrementErrorCounters() override
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
UInt_t GetEventcutErrorFlag() override
return the error flag on this channel/device
Bool_t CheckForBurpFail(const VQwDataElement *ev_error)
QwClock(const QwClock &source)
void SetDefaultSampleSize(Int_t sample_size)
void Ratio(const VQwClock &numer, const VQwClock &denom) override
const VQwHardwareChannel * GetTime() const override
void EncodeEventData(std::vector< UInt_t > &buffer)
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0) override
Process the CODA event buffer for this element.
void FillTreeVector(QwRootTreeBranchVector &values) const override
void PrintValue() const override
Print single line of value and error of this data element.
void ProcessEvent() override
void UpdateErrorFlag(const QwClock *ev_error)
Double_t GetStandardClockValue() override
Bool_t CheckForBurpFail(const QwClock *ev_error)
void LoadChannelParameters(QwParameterFile ¶mfile) override
VQwClock & operator-=(const VQwClock &value) override
Double_t GetNormClockValue() override
void PrintInfo() const override
Print multiple lines of information about this data element.
static const Bool_t bDEBUG
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Construct the histograms for this data element.
void SetPedestal(Double_t ped) override
void SetCalibrationFactor(Double_t calib) override
void FillHistograms() override
Fill the histograms for this data element.
void Scale(Double_t factor) override
Abstract base for beam clocks used to normalize rates and yields.