18#ifdef HAS_RNTUPLE_SUPPORT
19#include "ROOT/RNTupleModel.hxx"
31#ifdef __USE_DATABASE__
84 UInt_t word_position_in_buffer,UInt_t indexnumber)
override;
94 void SetSingleEventCuts(UInt_t errorflag,Double_t min, Double_t max, Double_t stability, Double_t burplevel);
111 void Set(
const VQwBPM* device,TString type, TString property ,Double_t tmatrix_ratio);
113 void Scale(Double_t factor);
133#ifdef HAS_RNTUPLE_SUPPORT
134 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs);
135 void FillNTupleVector(std::vector<Double_t>& values)
const;
146#ifdef __USE_DATABASE__
147 std::vector<QwDBInterface> GetDBEntry();
148 std::vector<QwErrDBInterface> GetErrDBEntry();
Decoding and management for Moller ADC channels (6x32-bit datawords)
Decoding and management for VQWK ADC channels (6x32-bit datawords)
Combined beam position monitor using weighted average.
Stripline beam position monitor implementation.
Virtual base class for beam position monitors.
Concrete hardware channel for Moller ADC modules (6x32-bit words)
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.
Computes beam energy change from BPM information.
void SetEventCutMode(Int_t bcuts)
QwEnergyCalculator(TString name)
void ClearEventData() override
Clear event-scoped data of this calculator and underlying channel.
void RandomizeEventData(int helicity=0, double time=0.0)
Generate mock event data for testing.
std::vector< const VQwBPM * > fDevice
void PrintInfo() const override
Print detailed information for this calculator.
void Difference(const QwEnergyCalculator &value1, const QwEnergyCalculator &value2)
QwEnergyCalculator & operator-=(const QwEnergyCalculator &value)
Subtract-assign from another calculator (difference energy change).
TString GetSubElementName(Int_t index)
void ConstructBranch(TTree *tree, TString &prefix)
Construct ROOT branches for this calculator (if enabled).
void CalculateRunningAverage()
Update running averages for the underlying energy channel.
std::vector< TString > fType
void PrintValue() const override
Print a compact value summary for this calculator.
void LoadChannelParameters(QwParameterFile ¶mfile) override
void FillHistograms() override
Fill histograms for this calculator if enabled.
void Scale(Double_t factor)
Scale the underlying energy channel by a constant factor.
void SetRootSaveStatus(TString &prefix)
Determine whether to save full ROOT output based on the prefix.
QwEnergyCalculator & operator+=(const QwEnergyCalculator &value)
Add-assign from another calculator (sum energy change).
void FillTreeVector(QwRootTreeBranchVector &values) const
Int_t SetSingleEventCuts(Double_t mean, Double_t sigma)
Set single-event cut limits on the underlying energy channel.
QwEnergyCalculator(TString subsystem, TString name)
std::vector< Double_t > fTMatrixRatio
size_t GetNumberOfElements()
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
Construct ROOT branches and value vector entries.
void LoadMockDataParameters(QwParameterFile ¶mfile) override
Load mock-data configuration for the underlying channel from a file.
void PrintErrorCounters() const override
Print accumulated error counters for diagnostic purposes.
void Set(const VQwBPM *device, TString type, TString property, Double_t tmatrix_ratio)
Register a BPM-based device contributing to the energy calculation.
UInt_t UpdateErrorFlag() override
Update and return the composite event-cut error flag.
void GetProjectedPosition(VQwBPM *device)
Back-project a BPM position from the current dp/p estimate.
void ProcessEvent()
Compute per-event energy change by summing configured device terms.
Bool_t ApplySingleEventCuts()
Apply single-event cuts to the energy channel and contributing devices.
void AccumulateRunningSum(const QwEnergyCalculator &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
Accumulate running sums from another calculator into this one.
QwMollerADC_Channel fEnergyChange
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t indexnumber) override
Process a configuration/event buffer (no-op for this calculator).
void SetRandomEventParameters(Double_t mean, Double_t sigma)
Configure Gaussian mock data parameters for the underlying channel.
std::vector< TString > fProperty
void DeaccumulateRunningSum(QwEnergyCalculator &value, Int_t ErrorMask=0xFFFFFFF)
Remove a single entry from the running sums using a source value.
void Ratio(QwEnergyCalculator &numer, QwEnergyCalculator &denom)
Define the ratio for asymmetry formation (here acts as pass-through).
Bool_t CheckForBurpFail(const VQwDataElement *ev_error)
Check for burp failures by delegating to the energy channel.
void InitializeChannel(TString name, TString datatosave)
Initialize this energy calculator with a name and data-saving mode.
UInt_t GetEventcutErrorFlag() override
return the error flag on this channel/device
VQwHardwareChannel * GetEnergy()
void Sum(const QwEnergyCalculator &value1, const QwEnergyCalculator &value2)
~QwEnergyCalculator() override
const VQwHardwareChannel * GetEnergy() const
QwEnergyCalculator & operator=(const QwEnergyCalculator &value)
Copy-assign from another calculator (event-scoped data).
QwEnergyCalculator(const QwEnergyCalculator &source)
Bool_t ApplyHWChecks()
Apply hardware checks (delegated to contributing channels if any).
void IncrementErrorCounters()
Increment error counters in the underlying energy channel.
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Define histograms for this calculator (delegated to energy channel).
Abstract base for beam position monitors (BPMs)