JAPAn
Just Another Parity Analyzer
|
Abstract base for beam current monitors (BCMs) More...
#include <VQwBCM.h>
Public Member Functions | |
~VQwBCM () override | |
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. | |
void | ConstructHistograms (TDirectory *folder, TString &prefix) override=0 |
Construct the histograms for this data element. | |
void | FillHistograms () override=0 |
Fill the histograms for this data element. | |
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), stability % and the error flag on this channel. | |
virtual void | Ratio (const VQwBCM &, const VQwBCM &) |
void | ClearEventData () override=0 |
Clear the event data in this element. | |
virtual void | InitializeChannel (TString name, TString datatosave)=0 |
virtual void | InitializeChannel (TString subsystem, TString name, TString datatosave)=0 |
void | LoadChannelParameters (QwParameterFile ¶mfile) override=0 |
Bool_t | NeedsExternalClock () override=0 |
void | SetExternalClockPtr (const VQwHardwareChannel *clock) override=0 |
void | SetExternalClockName (const std::string name) override=0 |
Double_t | GetNormClockValue () override=0 |
virtual void | SetDefaultSampleSize (Int_t sample_size)=0 |
virtual void | SetEventCutMode (Int_t bcuts)=0 |
UInt_t | UpdateErrorFlag () override |
Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag". | |
virtual void | UpdateErrorFlag (const VQwBCM *ev_error)=0 |
virtual void | SetPedestal (Double_t ped)=0 |
virtual void | SetCalibrationFactor (Double_t calib)=0 |
virtual void | RandomizeEventData (int helicity, double time)=0 |
virtual void | EncodeEventData (std::vector< UInt_t > &buffer)=0 |
virtual Bool_t | ApplySingleEventCuts ()=0 |
virtual void | IncrementErrorCounters ()=0 |
virtual void | ProcessEvent ()=0 |
virtual void | Scale (Double_t factor)=0 |
virtual void | CalculateRunningAverage ()=0 |
virtual void | AccumulateRunningSum (const VQwBCM &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)=0 |
virtual void | DeaccumulateRunningSum (VQwBCM &value, Int_t ErrorMask=0xFFFFFFF)=0 |
virtual void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0 |
virtual void | ConstructBranch (TTree *tree, TString &prefix)=0 |
virtual void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)=0 |
virtual void | FillTreeVector (QwRootTreeBranchVector &values) const =0 |
virtual void | ApplyResolutionSmearing () |
virtual void | FillRawEventData () |
virtual void | GetProjectedCharge (VQwBCM *) |
virtual size_t | GetNumberOfElements () |
virtual TString | GetSubElementName (Int_t) |
virtual Double_t | GetValue ()=0 |
virtual Double_t | GetValueError ()=0 |
virtual Double_t | GetValueWidth ()=0 |
virtual const VQwHardwareChannel * | GetCharge () const |
virtual Bool_t | CheckForBurpFail (const VQwDataElement *ev_error) |
virtual void | SetRandomEventParameters (Double_t mean, Double_t sigma)=0 |
virtual void | SetRandomEventAsymmetry (Double_t asymmetry)=0 |
virtual void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency)=0 |
virtual VQwBCM & | operator= (const VQwBCM &value)=0 |
virtual VQwBCM & | operator+= (const VQwBCM &value)=0 |
virtual VQwBCM & | operator-= (const VQwBCM &value)=0 |
virtual void | SetBCMForCombo (VQwBCM *bcm, Double_t weight, Double_t sumqw)=0 |
![]() | |
VQwDataElement () | |
Default constructor. | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. | |
~VQwDataElement () override | |
Virtual destructor. | |
void | CopyFrom (const VQwDataElement &value) |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? | |
void | SetElementName (const TString &name) |
Set the name of this element. | |
virtual const TString & | GetElementName () const |
Get the name of this element. | |
virtual void | LoadMockDataParameters (QwParameterFile &) |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. | |
UInt_t | GetGoodEventCount () const |
virtual void | AssignValueFrom (const VQwDataElement *) |
VQwDataElement & | operator+= (const VQwDataElement &) |
Addition-assignment operator. | |
VQwDataElement & | operator-= (const VQwDataElement &) |
Subtraction-assignment operator. | |
void | Sum (const VQwDataElement &, const VQwDataElement &) |
Sum operator (base class fallback throws runtime error) | |
void | Difference (const VQwDataElement &, const VQwDataElement &) |
Difference operator (base class fallback throws runtime error) | |
void | Ratio (const VQwDataElement &, const VQwDataElement &) |
Ratio operator (base class fallback throws runtime error) | |
virtual void | PrintValue () const |
Print single line of value and error of this data element. | |
virtual void | PrintInfo () const |
Print multiple lines of information about this data element. | |
void | SetSingleEventCuts (UInt_t, Double_t, Double_t, Double_t) |
set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel | |
virtual void | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure | |
Bool_t | CheckForBurpFail (const VQwDataElement *) |
virtual UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device | |
virtual void | SetNeedsExternalClock (Bool_t) |
virtual std::string | GetExternalClockName () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. | |
TString | GetModuleType () const |
Return the type of the beam instrument. | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. | |
Static Public Member Functions | |
static VQwBCM * | Create (TString subsystemname, TString type, TString name, TString clock="") |
Factory method to create a concrete BCM instance for the requested module type. | |
static VQwBCM * | Create (const VQwBCM &source) |
Copy constructor factory method to clone a BCM from an existing instance. | |
static VQwBCM * | CreateCombo (TString subsystemname, TString type, TString name) |
Factory method to create a concrete Combined BCM for the requested module type. | |
static VQwBCM * | CreateCombo (const VQwBCM &source) |
Protected Member Functions | |
VQwBCM (VQwDataElement &beamcurrent) | |
VQwBCM (VQwDataElement &beamcurrent, TString) | |
virtual VQwHardwareChannel * | GetCharge ()=0 |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. | |
VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. | |
void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
MQwHistograms () | |
Default constructor. | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. | |
virtual | ~MQwHistograms () |
Virtual destructor. | |
MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. | |
Protected Attributes | |
VQwDataElement & | fBeamCurrent_ref |
![]() | |
TString | fElementName |
Name of this data element. | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. | |
UInt_t | fGoodEventCount |
Number of good events accumulated in this element. | |
TString | fSubsystemName |
TString | fModuleType |
UInt_t | fErrorFlag |
This the standard error code generated for the channel that contains the global/local/stability flags and the Device error code (Unique error code for HW failures) | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. | |
Friends | |
template<typename T> | |
class | QwBCM |
template<typename T> | |
class | QwCombinedBCM |
Additional Inherited Members | |
![]() | |
enum | EDataToSave { kRaw = 0 , kDerived , kMoments } |
Abstract base for beam current monitors (BCMs)
Provides the interface for current-like data elements used for normalization and beam quality monitoring. Concrete implementations (e.g., QwBCM<T>, QwCombinedBCM<T>) implement hardware decoding, event processing, and error handling, while this base exposes common hooks for the analysis framework.
|
inlineprotected |
Definition at line 64 of file VQwBCM.h.
References fBeamCurrent_ref, and VQwDataElement::VQwDataElement().
Referenced by QwBCM< T >::AccumulateRunningSum(), AccumulateRunningSum(), Create(), Create(), CreateCombo(), CreateCombo(), QwBCM< T >::DeaccumulateRunningSum(), DeaccumulateRunningSum(), GetCharge(), QwCombinedBCM< T >::GetProjectedCharge(), GetProjectedCharge(), QwBCM< T >::operator+=(), operator+=(), QwBCM< T >::operator-=(), operator-=(), QwBCM< T >::operator=(), QwCombinedBCM< T >::operator=(), operator=(), QwBCM< T >::QwBCM(), QwBCM< T >::QwBCM(), QwBCM< T >::QwBCM(), QwBCM< T >::QwBCM(), QwBCM< T >::QwBCM(), QwBCM< T >::Ratio(), Ratio(), QwBCM< T >::SetBCMForCombo(), QwCombinedBCM< T >::SetBCMForCombo(), SetBCMForCombo(), QwBCM< T >::UpdateErrorFlag(), and UpdateErrorFlag().
|
inlineprotected |
Definition at line 65 of file VQwBCM.h.
References fBeamCurrent_ref, and VQwDataElement::VQwDataElement().
|
pure virtual |
|
pure virtual |
Implemented in QwBCM< T >.
|
inlinevirtual |
Reimplemented in QwBCM< T >.
Definition at line 117 of file VQwBCM.h.
Referenced by QwCombinedBCM< T >::GetProjectedCharge().
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
inlinevirtual |
Reimplemented in QwBCM< T >.
Definition at line 148 of file VQwBCM.h.
References VQwDataElement::CheckForBurpFail(), and VQwDataElement::VQwDataElement().
|
overridepure virtual |
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
overridepure virtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Implemented in QwBCM< T >.
Copy constructor factory method to clone a BCM from an existing instance.
source | Reference BCM to copy from. |
Creates a deep copy of the source BCM by determining its concrete type and calling the appropriate template constructor. Preserves all calibration parameters and configuration from the source.
Definition at line 74 of file VQwBCM.cc.
References QwLog::endl(), VQwDataElement::GetModuleType(), QwBCM, QwMessage, QwWarning, and VQwBCM().
|
static |
Factory method to create a concrete BCM instance for the requested module type.
subsystemname | Name of the parent subsystem. |
name | BCM channel name. |
type | Module type string (VQWK, ADC18, SIS3801, SIS3801D24/SCALER, MOLLERADC). |
clock | Clock reference name for timing-based modules. |
Creates appropriate concrete BCM template instantiation based on module type. Supported types include integrating ADCs (VQWK, ADC18, MOLLERADC) and scalers (SIS3801, SIS3801D24). Each type uses the corresponding channel class for data handling and calibration.
Definition at line 41 of file VQwBCM.cc.
References QwBCM, QwMessage, QwWarning, and VQwBCM().
Referenced by QwBeamLine::AddToElementList(), and QwBeamLine::CopyTemplatedDataElements().
Definition at line 125 of file VQwBCM.cc.
References QwLog::endl(), VQwDataElement::GetModuleType(), QwCombinedBCM, QwMessage, QwWarning, and VQwBCM().
|
static |
Factory method to create a concrete Combined BCM for the requested module type.
Definition at line 101 of file VQwBCM.cc.
References QwCombinedBCM, QwMessage, QwWarning, and VQwBCM().
Referenced by QwBeamLine::CopyTemplatedDataElements(), and QwBeamLine::LoadChannelMap().
|
pure virtual |
|
pure virtual |
Implemented in QwBCM< T >.
|
overridepure virtual |
|
inlinevirtual |
Reimplemented in QwBCM< T >.
Definition at line 119 of file VQwBCM.h.
Referenced by QwCombinedBCM< T >::GetProjectedCharge().
|
pure virtual |
Implemented in QwBCM< T >.
|
inlinevirtual |
Reimplemented in QwCombinedBCM< T >.
Definition at line 143 of file VQwBCM.h.
References GetCharge(), and VQwBCM().
Referenced by GetCharge(), and QwCombinedBCM< T >::GetProjectedCharge().
|
protectedpure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
overridepure virtual |
Reimplemented from VQwDataElement.
Implemented in QwBCM< T >.
|
inlinevirtual |
Reimplemented in QwCombinedBCM< T >.
Definition at line 122 of file VQwBCM.h.
|
inlinevirtual |
Reimplemented in QwCombinedBCM< T >.
Definition at line 121 of file VQwBCM.h.
References VQwBCM().
|
inlinevirtual |
Reimplemented in QwCombinedBCM< T >.
Definition at line 123 of file VQwBCM.h.
References VQwDataElement::GetElementName().
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
overridepure virtual |
Reimplemented from VQwDataElement.
Implemented in QwBCM< T >.
|
overridepure virtual |
Reimplemented from VQwDataElement.
Implemented in QwBCM< T >.
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
References VQwBCM().
|
overridepure virtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
References QwBPMStripline< T >::subelement.
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
Reimplemented in QwBCM< T >.
Definition at line 76 of file VQwBCM.h.
References VQwBCM().
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
References VQwBCM().
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
overridepure virtual |
Reimplemented from VQwDataElement.
Implemented in QwBCM< T >.
|
overridepure virtual |
Reimplemented from VQwDataElement.
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >, and QwCombinedBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Implemented in QwBCM< T >.
|
pure virtual |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.
Implemented in QwBCM< T >.
|
inlineoverridevirtual |
Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag".
Reimplemented from VQwDataElement.
Definition at line 93 of file VQwBCM.h.
References VQwDataElement::GetEventcutErrorFlag().
|
pure virtual |
|
friend |
|
friend |
Definition at line 61 of file VQwBCM.h.
References QwCombinedBCM.
Referenced by CreateCombo(), CreateCombo(), QwCombinedBCM, and QwBCM< T >::QwCombinedBCM< T >.
|
protected |