17#ifdef HAS_RNTUPLE_SUPPORT
18#include "ROOT/RNTupleModel.hxx"
27#ifdef __USE_DATABASE__
76 Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left,UInt_t index=0)
override;
107 void SetSingleEventCuts(UInt_t errorflag,Double_t min, Double_t max, Double_t stability, Double_t burplevel){
109 fHalo_Counter.SetSingleEventCuts(errorflag,min,max,stability,burplevel);
124#ifdef HAS_RNTUPLE_SUPPORT
125 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs);
126 void FillNTupleVector(std::vector<Double_t>& values)
const;
144#ifdef __USE_DATABASE__
145 std::vector<QwDBInterface> GetDBEntry();
146 std::vector<QwErrDBInterface> GetErrDBEntry();
Base and derived classes for scaler channel data handling.
class QwScaler_Channel< 0x00ffffff, 0 > QwSIS3801D24_Channel
#define QwError
Predefined log drain for errors.
Parameter file parsing and management.
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.
The pure virtual base class of all data elements.
VQwDataElement()
Default constructor.
Abstract base for concrete hardware channels implementing dual-operator pattern.
Wrapper around a scaler channel to monitor beam halo rates.
void ProcessEvent()
Process event (delegated to the underlying counter).
void UpdateHWErrorCount()
void ConstructBranch(TTree *tree, TString &prefix)
void PrintValue() const override
Print a compact value summary for this monitor.
void SetSingleEventCuts(UInt_t errorflag, Double_t min, Double_t max, Double_t stability, Double_t burplevel)
QwHaloMonitor & operator=(const QwHaloMonitor &value)
Copy-assign from another halo monitor.
static const Bool_t kDEBUG
QwSIS3801D24_Channel fHalo_Counter
Bool_t NeedsExternalClock() override
void ClearEventData() override
Clear event-scoped data in the underlying counter.
void SetExternalClockName(const std::string name) override
void SetExternalClockPtr(const VQwHardwareChannel *clock) override
QwHaloMonitor(TString name)
Double_t GetNormClockValue() override
void SetPedestal(Double_t ped)
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Define histograms for this monitor (delegated to underlying counter).
void LoadChannelParameters(QwParameterFile ¶mfile) override
const VQwHardwareChannel * GetScaler() const
UInt_t UpdateErrorFlag() override
Update the error flag based on the error flags of internally contained objects Return parameter is th...
QwHaloMonitor(TString subsystemname, TString name)
std::string GetExternalClockName() override
void PrintErrorCounters()
void Sum(QwHaloMonitor &value1, QwHaloMonitor &value2)
Sum two halo monitors into this instance.
void InitializeChannel(TString name)
Initialize the halo monitor with a detector name.
void AccumulateRunningSum(const QwHaloMonitor &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
Accumulate running sums from another monitor into this one.
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
Construct ROOT branches and value vector entries.
QwHaloMonitor(const QwHaloMonitor &source)
void Difference(QwHaloMonitor &value1, QwHaloMonitor &value2)
Compute the difference of two halo monitors into this instance.
QwHaloMonitor & operator-=(const QwHaloMonitor &value)
Subtract-assign from another halo monitor (difference counters).
void FillHistograms() override
Fill histograms for this monitor if enabled.
Bool_t ApplyHWChecks()
Apply hardware checks (no hardware errors for simple counters).
QwHaloMonitor & operator+=(const QwHaloMonitor &value)
Add-assign from another halo monitor (sum counters).
Bool_t CheckForBurpFail(const VQwDataElement *ev_error)
Check for burp failures by delegating to the underlying counter.
void FillTreeVector(QwRootTreeBranchVector &values) const
void Ratio(QwHaloMonitor &numer, QwHaloMonitor &denom)
Form the ratio of two halo monitors into this instance.
void SetEventCutMode(Int_t bcuts)
void DeaccumulateRunningSum(QwHaloMonitor &value, Int_t ErrorMask=0xFFFFFFF)
Remove a single entry from the running sums using a source value.
~QwHaloMonitor() override
void CalculateRunningAverage()
Update running averages for the underlying counter.
void SetCalibrationFactor(Double_t factor)
void IncrementErrorCounters()
void Scale(Double_t Offset)
Scale the underlying counter by a constant factor.
void UpdateErrorFlag(const QwHaloMonitor *ev_error)
UInt_t GetEventcutErrorFlag() override
return the error flag on this channel/device
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) override
Decode the raw event buffer into the underlying counter.
void Offset(Double_t Offset)
VQwHardwareChannel * GetScaler()
void PrintInfo() const override
Print detailed information for this monitor.
Bool_t ApplySingleEventCuts()
Apply single-event cuts on the underlying counter.