22#ifdef HAS_RNTUPLE_SUPPORT
23#include "ROOT/RNTupleModel.hxx"
31#ifdef __USE_DATABASE__
37template<
typename T>
class QwBCM;
60 template <
typename T>
friend class QwBCM;
75 virtual void SetSingleEventCuts(UInt_t errorflag,Double_t min, Double_t max, Double_t stability, Double_t burplevel) = 0;
77 { std::cerr <<
"Ratio not defined! (VQwBCM)" << std::endl; }
102 virtual void Scale(Double_t factor) = 0;
111#ifdef HAS_RNTUPLE_SUPPORT
112 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;
113 virtual void FillNTupleVector(std::vector<Double_t>& values)
const = 0;
118 {std::cerr <<
"ApplyResolutionSmearing is undefined!!!\n";}
120 {std::cerr <<
"FillRawEventData for VQwBPM not implemented!\n";};
125 std::cerr <<
"GetSubElementName() is not implemented!! for device: " <<
GetElementName() <<
"\n";
126 return TString(
"OBJECT_UNDEFINED");
130#ifdef __USE_DATABASE__
131 virtual std::vector<QwDBInterface> GetDBEntry() = 0;
132 virtual std::vector<QwErrDBInterface> GetErrDBEntry() = 0;
173 static VQwBCM*
Create(TString subsystemname, TString type, TString name, TString clock =
"");
Parameter file parsing and management.
Definition of the pure virtual base class of all data elements.
std::shared_ptr< VQwBCM > VQwBCM_ptr
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.
virtual UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
virtual const TString & GetElementName() const
Get the name of this element.
Bool_t CheckForBurpFail(const VQwDataElement *)
Abstract base for concrete hardware channels implementing dual-operator pattern.
Template for a combined beam current monitor using weighted inputs.
Templated concrete beam current monitor implementation.
virtual void DeaccumulateRunningSum(VQwBCM &value, Int_t ErrorMask=0xFFFFFFF)=0
virtual void EncodeEventData(std::vector< UInt_t > &buffer)=0
virtual VQwHardwareChannel * GetCharge()=0
virtual VQwBCM & operator-=(const VQwBCM &value)=0
virtual void InitializeChannel(TString name, TString datatosave)=0
virtual void CalculateRunningAverage()=0
virtual void SetCalibrationFactor(Double_t calib)=0
friend class QwCombinedBCM
virtual void FillTreeVector(QwRootTreeBranchVector &values) const =0
virtual Double_t GetValueWidth()=0
virtual void SetBCMForCombo(VQwBCM *bcm, Double_t weight, Double_t sumqw)=0
static VQwBCM * CreateCombo(TString subsystemname, TString type, TString name)
Factory method to create a concrete Combined BCM for the requested module type.
void LoadChannelParameters(QwParameterFile ¶mfile) override=0
virtual void RandomizeEventData(int helicity, double time)=0
virtual void AccumulateRunningSum(const VQwBCM &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)=0
virtual size_t GetNumberOfElements()
VQwDataElement & fBeamCurrent_ref
virtual Bool_t ApplySingleEventCuts()=0
virtual VQwBCM & operator=(const VQwBCM &value)=0
void ConstructHistograms(TDirectory *folder, TString &prefix) override=0
Construct the histograms for this data element.
virtual void Ratio(const VQwBCM &, const VQwBCM &)
virtual VQwBCM & operator+=(const VQwBCM &value)=0
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0) override=0
Process the CODA event buffer for this element.
virtual void ConstructBranch(TTree *tree, TString &prefix, QwParameterFile &modulelist)=0
virtual void FillRawEventData()
Bool_t NeedsExternalClock() override=0
void SetExternalClockPtr(const VQwHardwareChannel *clock) override=0
virtual void SetRandomEventAsymmetry(Double_t asymmetry)=0
virtual Double_t GetValue()=0
virtual void SetPedestal(Double_t ped)=0
virtual void Scale(Double_t factor)=0
VQwBCM(VQwDataElement &beamcurrent)
virtual void GetProjectedCharge(VQwBCM *)
virtual void AddRandomEventDriftParameters(Double_t amplitude, Double_t phase, Double_t frequency)=0
virtual void UpdateErrorFlag(const VQwBCM *ev_error)=0
void FillHistograms() override=0
Fill the histograms for this data element.
virtual Double_t GetValueError()=0
virtual Bool_t CheckForBurpFail(const VQwDataElement *ev_error)
virtual void ConstructBranch(TTree *tree, TString &prefix)=0
virtual const VQwHardwareChannel * GetCharge() const
virtual void IncrementErrorCounters()=0
void SetExternalClockName(const std::string name) override=0
virtual TString GetSubElementName(Int_t)
void ClearEventData() override=0
Clear the event data in this element.
virtual void InitializeChannel(TString subsystem, TString name, TString datatosave)=0
virtual void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0
virtual void SetSingleEventCuts(UInt_t errorflag, Double_t min, Double_t max, Double_t stability, Double_t burplevel)=0
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit),...
Double_t GetNormClockValue() override=0
virtual void ProcessEvent()=0
UInt_t UpdateErrorFlag() override
Update the error flag based on the error flags of internally contained objects Return parameter is th...
virtual void SetDefaultSampleSize(Int_t sample_size)=0
virtual void SetRandomEventParameters(Double_t mean, Double_t sigma)=0
static VQwBCM * Create(TString subsystemname, TString type, TString name, TString clock="")
Factory method to create a concrete BCM instance for the requested module type.
VQwBCM(VQwDataElement &beamcurrent, TString)
virtual void SetEventCutMode(Int_t bcuts)=0
virtual void ApplyResolutionSmearing()