JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwIntegratedRasterChannel< T > Class Template Reference

Template for integrated raster readout channel. More...

#include <QwIntegratedRasterChannel.h>

+ Inheritance diagram for QwIntegratedRasterChannel< T >:
+ Collaboration diagram for QwIntegratedRasterChannel< T >:

Public Member Functions

 QwIntegratedRasterChannel ()
 
 QwIntegratedRasterChannel (TString name)
 
 QwIntegratedRasterChannel (TString subsystemname, TString name)
 
 ~QwIntegratedRasterChannel () override
 
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 InitializeChannel (TString name, TString datatosave)
 
void InitializeChannel (TString subsystem, TString name, TString datatosave)
 
void ClearEventData () override
 Clear the event data in this element.
 
void SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency)
 
void AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency)
 
void SetRandomEventParameters (Double_t mean, Double_t sigma)
 
void SetRandomEventAsymmetry (Double_t asymmetry)
 
void RandomizeEventData (int helicity=0, double time=0)
 
void SetHardwareSum (Double_t hwsum, UInt_t sequencenumber=0)
 
void SetEventData (Double_t *block, UInt_t sequencenumber)
 
void EncodeEventData (std::vector< UInt_t > &buffer)
 
void UseExternalRandomVariable ()
 
void SetExternalRandomVariable (Double_t random_variable)
 
void ProcessEvent ()
 
Bool_t ApplyHWChecks ()
 
Bool_t ApplySingleEventCuts ()
 
void IncrementErrorCounters ()
 
void PrintErrorCounters () const override
 report number of events failed due to HW and event cut failure
 
UInt_t GetEventcutErrorFlag () override
 return the error flag on this channel/device
 
UInt_t UpdateErrorFlag () override
 Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag".
 
void UpdateErrorFlag (const QwIntegratedRasterChannel *ev_error)
 
Int_t SetSingleEventCuts (Double_t mean=0, Double_t sigma=0)
 
void SetSingleEventCuts (UInt_t errorflag, Double_t min=0, Double_t max=0, Double_t stability=0)
 Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.
 
void SetDefaultSampleSize (Int_t sample_size)
 
void SetEventCutMode (Int_t bcuts)
 
void PrintValue () const override
 Print single line of value and error of this data element.
 
void PrintInfo () const override
 Print multiple lines of information about this data element.
 
QwIntegratedRasterChanneloperator= (const QwIntegratedRasterChannel &value)
 
QwIntegratedRasterChanneloperator+= (const QwIntegratedRasterChannel &value)
 
QwIntegratedRasterChanneloperator-= (const QwIntegratedRasterChannel &value)
 
void Sum (QwIntegratedRasterChannel &value1, QwIntegratedRasterChannel &value2)
 
void Difference (QwIntegratedRasterChannel &value1, QwIntegratedRasterChannel &value2)
 
void Ratio (QwIntegratedRasterChannel &numer, QwIntegratedRasterChannel &denom)
 
void Scale (Double_t factor)
 
void AccumulateRunningSum (const QwIntegratedRasterChannel &value)
 
void CalculateRunningAverage ()
 
void SetPedestal (Double_t ped)
 
void SetCalibrationFactor (Double_t calib)
 
void ConstructHistograms (TDirectory *folder, TString &prefix) override
 Construct the histograms for this data element.
 
void FillHistograms () override
 Fill the histograms for this data element.
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
 
void ConstructBranch (TTree *tree, TString &prefix)
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)
 
void FillTreeVector (QwRootTreeBranchVector &values) const
 
std::vector< QwDBInterfaceGetDBEntry ()
 
std::vector< QwErrDBInterfaceGetErrDBEntry ()
 
const VQwDataElementGetElement () const
 
- Public Member Functions inherited from VQwDataElement
 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 LoadChannelParameters (QwParameterFile &)
 
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 *)
 
VQwDataElementoperator+= (const VQwDataElement &)
 Addition-assignment operator.
 
VQwDataElementoperator-= (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)
 
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
 
Bool_t CheckForBurpFail (const VQwDataElement *)
 
virtual void SetNeedsExternalClock (Bool_t)
 
virtual Bool_t NeedsExternalClock ()
 
virtual std::string GetExternalClockName ()
 
virtual void SetExternalClockPtr (const VQwHardwareChannel *)
 
virtual void SetExternalClockName (const std::string)
 
virtual Double_t GetNormClockValue ()
 
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
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects.
 

Private Attributes

Double_t fPedestal
 
Double_t fCalibration
 
Double_t fULimit
 
Double_t fLLimit
 
Bool_t fGoodEvent
 
fTriumf_ADC
 
Int_t fDeviceErrorCode
 
Bool_t bEVENTCUTMODE
 

Static Private Attributes

static const Bool_t bDEBUG =kFALSE
 

Additional Inherited Members

- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0 , kDerived , kMoments }
 
- Protected Member Functions inherited from VQwDataElement
void SetNumberOfDataWords (const UInt_t &numwords)
 Set the number of data words in this data element.
 
VQwDataElementoperator= (const VQwDataElement &value)
 Arithmetic assignment operator: Should only copy event-based data.
 
void UpdateErrorFlag (const UInt_t &error)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor.
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor.
 
virtual ~MQwHistograms ()
 Virtual destructor.
 
MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram.
 
- Protected Attributes inherited from VQwDataElement
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
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 Histograms associated with this data element.
 

Detailed Description

template<typename T>
class QwIntegratedRasterChannel< T >

Template for integrated raster readout channel.

Provides accumulation and processing of fast raster signals into per-window integrated values. The template parameter T is the underlying hardware channel type (e.g. QwVQWK_Channel).

Definition at line 32 of file QwIntegratedRasterChannel.h.

Constructor & Destructor Documentation

◆ QwIntegratedRasterChannel() [1/3]

template<typename T>
QwIntegratedRasterChannel< T >::QwIntegratedRasterChannel ( )
inline

Definition at line 35 of file QwIntegratedRasterChannel.h.

35{ };

Referenced by AccumulateRunningSum(), Difference(), GetElement(), operator+=(), operator-=(), operator=(), Ratio(), Sum(), and UpdateErrorFlag().

+ Here is the caller graph for this function:

◆ QwIntegratedRasterChannel() [2/3]

template<typename T>
QwIntegratedRasterChannel< T >::QwIntegratedRasterChannel ( TString name)
inline

Definition at line 36 of file QwIntegratedRasterChannel.h.

36 {
38 };
Template for integrated raster readout channel.
void InitializeChannel(TString name, TString datatosave)

References InitializeChannel().

+ Here is the call graph for this function:

◆ QwIntegratedRasterChannel() [3/3]

template<typename T>
QwIntegratedRasterChannel< T >::QwIntegratedRasterChannel ( TString subsystemname,
TString name )
inline

Definition at line 39 of file QwIntegratedRasterChannel.h.

39 {
42 };
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.

References InitializeChannel(), and VQwDataElement::SetSubsystemName().

+ Here is the call graph for this function:

◆ ~QwIntegratedRasterChannel()

template<typename T>
QwIntegratedRasterChannel< T >::~QwIntegratedRasterChannel ( )
inlineoverride

Definition at line 43 of file QwIntegratedRasterChannel.h.

43{ };

Member Function Documentation

◆ AccumulateRunningSum()

template<typename T>
void QwIntegratedRasterChannel< T >::AccumulateRunningSum ( const QwIntegratedRasterChannel< T > & value)

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ AddRandomEventDriftParameters()

template<typename T>
void QwIntegratedRasterChannel< T >::AddRandomEventDriftParameters ( Double_t amplitude,
Double_t phase,
Double_t frequency )

◆ ApplyHWChecks()

template<typename T>
Bool_t QwIntegratedRasterChannel< T >::ApplyHWChecks ( )

◆ ApplySingleEventCuts()

template<typename T>
Bool_t QwIntegratedRasterChannel< T >::ApplySingleEventCuts ( )

◆ CalculateRunningAverage()

template<typename T>
void QwIntegratedRasterChannel< T >::CalculateRunningAverage ( )

◆ ClearEventData()

template<typename T>
void QwIntegratedRasterChannel< T >::ClearEventData ( )
overridevirtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

◆ ConstructBranch() [1/2]

template<typename T>
void QwIntegratedRasterChannel< T >::ConstructBranch ( TTree * tree,
TString & prefix )

◆ ConstructBranch() [2/2]

template<typename T>
void QwIntegratedRasterChannel< T >::ConstructBranch ( TTree * tree,
TString & prefix,
QwParameterFile & modulelist )

◆ ConstructBranchAndVector()

template<typename T>
void QwIntegratedRasterChannel< T >::ConstructBranchAndVector ( TTree * tree,
TString & prefix,
QwRootTreeBranchVector & values )

◆ ConstructHistograms()

template<typename T>
void QwIntegratedRasterChannel< T >::ConstructHistograms ( TDirectory * folder,
TString & prefix )
overridevirtual

Construct the histograms for this data element.

Implements VQwDataElement.

◆ Difference()

template<typename T>
void QwIntegratedRasterChannel< T >::Difference ( QwIntegratedRasterChannel< T > & value1,
QwIntegratedRasterChannel< T > & value2 )

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ EncodeEventData()

template<typename T>
void QwIntegratedRasterChannel< T >::EncodeEventData ( std::vector< UInt_t > & buffer)

◆ FillHistograms()

template<typename T>
void QwIntegratedRasterChannel< T >::FillHistograms ( )
overridevirtual

Fill the histograms for this data element.

Implements VQwDataElement.

◆ FillTreeVector()

template<typename T>
void QwIntegratedRasterChannel< T >::FillTreeVector ( QwRootTreeBranchVector & values) const

◆ GetDBEntry()

template<typename T>
std::vector< QwDBInterface > QwIntegratedRasterChannel< T >::GetDBEntry ( )

◆ GetElement()

template<typename T>
const VQwDataElement * QwIntegratedRasterChannel< T >::GetElement ( ) const
inline

Definition at line 117 of file QwIntegratedRasterChannel.h.

117 {
118 return const_cast<QwIntegratedRasterChannel*>(this)->GetElement();
119 };
const VQwDataElement * GetElement() const

References GetElement(), QwIntegratedRasterChannel(), and VQwDataElement::VQwDataElement().

Referenced by GetElement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetErrDBEntry()

template<typename T>
std::vector< QwErrDBInterface > QwIntegratedRasterChannel< T >::GetErrDBEntry ( )

◆ GetEventcutErrorFlag()

template<typename T>
UInt_t QwIntegratedRasterChannel< T >::GetEventcutErrorFlag ( )
inlineoverridevirtual

return the error flag on this channel/device

Reimplemented from VQwDataElement.

Definition at line 70 of file QwIntegratedRasterChannel.h.

70 {//return the error flag
71 return fTriumf_ADC.GetEventcutErrorFlag();
72 }

References fTriumf_ADC.

Referenced by UpdateErrorFlag().

+ Here is the caller graph for this function:

◆ IncrementErrorCounters()

template<typename T>
void QwIntegratedRasterChannel< T >::IncrementErrorCounters ( )
inline

Definition at line 68 of file QwIntegratedRasterChannel.h.

68{fTriumf_ADC.IncrementErrorCounters();};

References fTriumf_ADC.

◆ InitializeChannel() [1/2]

template<typename T>
void QwIntegratedRasterChannel< T >::InitializeChannel ( TString name,
TString datatosave )

Referenced by QwIntegratedRasterChannel(), and QwIntegratedRasterChannel().

+ Here is the caller graph for this function:

◆ InitializeChannel() [2/2]

template<typename T>
void QwIntegratedRasterChannel< T >::InitializeChannel ( TString subsystem,
TString name,
TString datatosave )

◆ operator+=()

template<typename T>
QwIntegratedRasterChannel & QwIntegratedRasterChannel< T >::operator+= ( const QwIntegratedRasterChannel< T > & value)

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ operator-=()

template<typename T>
QwIntegratedRasterChannel & QwIntegratedRasterChannel< T >::operator-= ( const QwIntegratedRasterChannel< T > & value)

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ operator=()

template<typename T>
QwIntegratedRasterChannel & QwIntegratedRasterChannel< T >::operator= ( const QwIntegratedRasterChannel< T > & value)

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ PrintErrorCounters()

template<typename T>
void QwIntegratedRasterChannel< T >::PrintErrorCounters ( ) const
overridevirtual

report number of events failed due to HW and event cut failure

Reimplemented from VQwDataElement.

◆ PrintInfo()

template<typename T>
void QwIntegratedRasterChannel< T >::PrintInfo ( ) const
overridevirtual

Print multiple lines of information about this data element.

Reimplemented from VQwDataElement.

◆ PrintValue()

template<typename T>
void QwIntegratedRasterChannel< T >::PrintValue ( ) const
overridevirtual

Print single line of value and error of this data element.

Reimplemented from VQwDataElement.

◆ ProcessEvBuffer()

template<typename T>
Int_t QwIntegratedRasterChannel< T >::ProcessEvBuffer ( UInt_t * buffer,
UInt_t num_words_left,
UInt_t subelement = 0 )
overridevirtual

Process the CODA event buffer for this element.

Implements VQwDataElement.

References QwBPMStripline< T >::subelement.

◆ ProcessEvent()

template<typename T>
void QwIntegratedRasterChannel< T >::ProcessEvent ( )

◆ RandomizeEventData()

template<typename T>
void QwIntegratedRasterChannel< T >::RandomizeEventData ( int helicity = 0,
double time = 0 )

◆ Ratio()

template<typename T>
void QwIntegratedRasterChannel< T >::Ratio ( QwIntegratedRasterChannel< T > & numer,
QwIntegratedRasterChannel< T > & denom )

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ Scale()

template<typename T>
void QwIntegratedRasterChannel< T >::Scale ( Double_t factor)

◆ SetCalibrationFactor()

template<typename T>
void QwIntegratedRasterChannel< T >::SetCalibrationFactor ( Double_t calib)

◆ SetDefaultSampleSize()

template<typename T>
void QwIntegratedRasterChannel< T >::SetDefaultSampleSize ( Int_t sample_size)

◆ SetEventCutMode()

template<typename T>
void QwIntegratedRasterChannel< T >::SetEventCutMode ( Int_t bcuts)
inline

Definition at line 83 of file QwIntegratedRasterChannel.h.

83 {
85 fTriumf_ADC.SetEventCutMode(bcuts);
86 }

References bEVENTCUTMODE, and fTriumf_ADC.

◆ SetEventData()

template<typename T>
void QwIntegratedRasterChannel< T >::SetEventData ( Double_t * block,
UInt_t sequencenumber )

◆ SetExternalRandomVariable()

template<typename T>
void QwIntegratedRasterChannel< T >::SetExternalRandomVariable ( Double_t random_variable)

◆ SetHardwareSum()

template<typename T>
void QwIntegratedRasterChannel< T >::SetHardwareSum ( Double_t hwsum,
UInt_t sequencenumber = 0 )

◆ SetPedestal()

template<typename T>
void QwIntegratedRasterChannel< T >::SetPedestal ( Double_t ped)

◆ SetRandomEventAsymmetry()

template<typename T>
void QwIntegratedRasterChannel< T >::SetRandomEventAsymmetry ( Double_t asymmetry)

◆ SetRandomEventDriftParameters()

template<typename T>
void QwIntegratedRasterChannel< T >::SetRandomEventDriftParameters ( Double_t amplitude,
Double_t phase,
Double_t frequency )

◆ SetRandomEventParameters()

template<typename T>
void QwIntegratedRasterChannel< T >::SetRandomEventParameters ( Double_t mean,
Double_t sigma )

◆ SetSingleEventCuts() [1/2]

template<typename T>
Int_t QwIntegratedRasterChannel< T >::SetSingleEventCuts ( Double_t mean = 0,
Double_t sigma = 0 )

◆ SetSingleEventCuts() [2/2]

template<typename T>
void QwIntegratedRasterChannel< T >::SetSingleEventCuts ( UInt_t errorflag,
Double_t min = 0,
Double_t max = 0,
Double_t stability = 0 )

Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.

◆ Sum()

template<typename T>
void QwIntegratedRasterChannel< T >::Sum ( QwIntegratedRasterChannel< T > & value1,
QwIntegratedRasterChannel< T > & value2 )

References QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ UpdateErrorFlag() [1/2]

template<typename T>
UInt_t QwIntegratedRasterChannel< T >::UpdateErrorFlag ( )
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 73 of file QwIntegratedRasterChannel.h.

73{return GetEventcutErrorFlag();};
UInt_t GetEventcutErrorFlag() override
return the error flag on this channel/device

References GetEventcutErrorFlag().

+ Here is the call graph for this function:

◆ UpdateErrorFlag() [2/2]

template<typename T>
void QwIntegratedRasterChannel< T >::UpdateErrorFlag ( const QwIntegratedRasterChannel< T > * ev_error)
inline

Definition at line 74 of file QwIntegratedRasterChannel.h.

74 {
75 return fTriumf_ADC.UpdateErrorFlag(ev_error->fTriumf_ADC);
76 }

References fTriumf_ADC, and QwIntegratedRasterChannel().

+ Here is the call graph for this function:

◆ UseExternalRandomVariable()

template<typename T>
void QwIntegratedRasterChannel< T >::UseExternalRandomVariable ( )

Field Documentation

◆ bDEBUG

template<typename T>
const Bool_t QwIntegratedRasterChannel< T >::bDEBUG =kFALSE
staticprivate

Definition at line 140 of file QwIntegratedRasterChannel.h.

◆ bEVENTCUTMODE

template<typename T>
Bool_t QwIntegratedRasterChannel< T >::bEVENTCUTMODE
private

Definition at line 141 of file QwIntegratedRasterChannel.h.

Referenced by SetEventCutMode().

◆ fCalibration

template<typename T>
Double_t QwIntegratedRasterChannel< T >::fCalibration
private

Definition at line 129 of file QwIntegratedRasterChannel.h.

◆ fDeviceErrorCode

template<typename T>
Int_t QwIntegratedRasterChannel< T >::fDeviceErrorCode
private

Definition at line 138 of file QwIntegratedRasterChannel.h.

◆ fGoodEvent

template<typename T>
Bool_t QwIntegratedRasterChannel< T >::fGoodEvent
private

Definition at line 131 of file QwIntegratedRasterChannel.h.

◆ fLLimit

template<typename T>
Double_t QwIntegratedRasterChannel< T >::fLLimit
private

Definition at line 130 of file QwIntegratedRasterChannel.h.

◆ fPedestal

template<typename T>
Double_t QwIntegratedRasterChannel< T >::fPedestal
private

Definition at line 128 of file QwIntegratedRasterChannel.h.

◆ fTriumf_ADC

template<typename T>
T QwIntegratedRasterChannel< T >::fTriumf_ADC
private

◆ fULimit

template<typename T>
Double_t QwIntegratedRasterChannel< T >::fULimit
private

Definition at line 130 of file QwIntegratedRasterChannel.h.


The documentation for this class was generated from the following file: