JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwHaloMonitor Class Reference

Wrapper around a scaler channel to monitor beam halo rates. More...

#include <QwHaloMonitor.h>

+ Inheritance diagram for QwHaloMonitor:
+ Collaboration diagram for QwHaloMonitor:

Public Member Functions

 QwHaloMonitor ()
 
 QwHaloMonitor (TString name)
 
 QwHaloMonitor (TString subsystemname, TString name)
 
 QwHaloMonitor (const QwHaloMonitor &source)
 
 ~QwHaloMonitor () override
 
void InitializeChannel (TString name)
 Initialize the halo monitor with a detector name.
 
void InitializeChannel (TString subsystem, TString name)
 Initialize the halo monitor with subsystem and name.
 
void ClearEventData () override
 Clear event-scoped data in the underlying counter.
 
void LoadChannelParameters (QwParameterFile &paramfile) override
 
std::string GetExternalClockName () override
 
Bool_t NeedsExternalClock () override
 
void SetExternalClockPtr (const VQwHardwareChannel *clock) override
 
void SetExternalClockName (const std::string name) override
 
Double_t GetNormClockValue () override
 
void PrintErrorCounters ()
 
void UpdateHWErrorCount ()
 
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 ProcessEvent ()
 Process event (delegated to the underlying counter).
 
QwHaloMonitoroperator= (const QwHaloMonitor &value)
 Copy-assign from another halo monitor.
 
QwHaloMonitoroperator+= (const QwHaloMonitor &value)
 Add-assign from another halo monitor (sum counters).
 
QwHaloMonitoroperator-= (const QwHaloMonitor &value)
 Subtract-assign from another halo monitor (difference counters).
 
void Sum (QwHaloMonitor &value1, QwHaloMonitor &value2)
 Sum two halo monitors into this instance.
 
void Difference (QwHaloMonitor &value1, QwHaloMonitor &value2)
 Compute the difference of two halo monitors into this instance.
 
void Ratio (QwHaloMonitor &numer, QwHaloMonitor &denom)
 Form the ratio of two halo monitors into this instance.
 
void Offset (Double_t Offset)
 
void Scale (Double_t Offset)
 Scale the underlying counter by a constant factor.
 
void SetPedestal (Double_t ped)
 
void SetCalibrationFactor (Double_t factor)
 
void AccumulateRunningSum (const QwHaloMonitor &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
 Accumulate running sums from another monitor into this one.
 
void DeaccumulateRunningSum (QwHaloMonitor &value, Int_t ErrorMask=0xFFFFFFF)
 Remove a single entry from the running sums using a source value.
 
void CalculateRunningAverage ()
 Update running averages for the underlying counter.
 
Bool_t ApplySingleEventCuts ()
 Apply single-event cuts on the underlying counter.
 
void IncrementErrorCounters ()
 
UInt_t GetEventcutErrorFlag () override
 return the error flag on this channel/device
 
Bool_t CheckForBurpFail (const VQwDataElement *ev_error)
 Check for burp failures by delegating to the underlying counter.
 
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 QwHaloMonitor *ev_error)
 
void PrintErrorCounters () const override
 Print accumulated error counters for this monitor.
 
Bool_t ApplyHWChecks ()
 Apply hardware checks (no hardware errors for simple counters).
 
void SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability, Double_t burplevel)
 
void SetEventCutMode (Int_t bcuts)
 
void ConstructHistograms (TDirectory *folder, TString &prefix) override
 Define histograms for this monitor (delegated to underlying counter).
 
void FillHistograms () override
 Fill histograms for this monitor if enabled.
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
 Construct ROOT branches and value vector entries.
 
void ConstructBranch (TTree *tree, TString &prefix)
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)
 
void FillTreeVector (QwRootTreeBranchVector &values) const
 
VQwHardwareChannelGetScaler ()
 
const VQwHardwareChannelGetScaler () const
 
Double_t GetValue ()
 
void PrintValue () const override
 Print a compact value summary for this monitor.
 
void PrintInfo () const override
 Print detailed information for this monitor.
 
- 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 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)
 
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

QwSIS3801D24_Channel fHalo_Counter
 
Int_t fDeviceErrorCode
 
Bool_t bEVENTCUTMODE
 

Static Private Attributes

static const Bool_t kDEBUG
 

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

Wrapper around a scaler channel to monitor beam halo rates.

Definition at line 40 of file QwHaloMonitor.h.

Constructor & Destructor Documentation

◆ QwHaloMonitor() [1/4]

QwHaloMonitor::QwHaloMonitor ( )
inline

Definition at line 44 of file QwHaloMonitor.h.

44{ };

Referenced by AccumulateRunningSum(), CheckForBurpFail(), DeaccumulateRunningSum(), Difference(), GetScaler(), operator+=(), operator-=(), operator=(), QwHaloMonitor(), Ratio(), Sum(), UpdateErrorFlag(), and UpdateHWErrorCount().

+ Here is the caller graph for this function:

◆ QwHaloMonitor() [2/4]

QwHaloMonitor::QwHaloMonitor ( TString name)
inline

Definition at line 45 of file QwHaloMonitor.h.

45 {
47 };
void InitializeChannel(TString name)
Initialize the halo monitor with a detector name.

References InitializeChannel().

+ Here is the call graph for this function:

◆ QwHaloMonitor() [3/4]

QwHaloMonitor::QwHaloMonitor ( TString subsystemname,
TString name )
inline

Definition at line 48 of file QwHaloMonitor.h.

48 {
49 InitializeChannel(subsystemname, name);
50 };

References InitializeChannel().

+ Here is the call graph for this function:

◆ QwHaloMonitor() [4/4]

QwHaloMonitor::QwHaloMonitor ( const QwHaloMonitor & source)
inline

Definition at line 51 of file QwHaloMonitor.h.

52 : VQwDataElement(source),
54 { }
VQwDataElement()
Default constructor.
QwSIS3801D24_Channel fHalo_Counter

References fHalo_Counter, QwHaloMonitor(), and VQwDataElement::VQwDataElement().

+ Here is the call graph for this function:

◆ ~QwHaloMonitor()

QwHaloMonitor::~QwHaloMonitor ( )
inlineoverride

Definition at line 55 of file QwHaloMonitor.h.

55{ };

Member Function Documentation

◆ AccumulateRunningSum()

void QwHaloMonitor::AccumulateRunningSum ( const QwHaloMonitor & value,
Int_t count = 0,
Int_t ErrorMask = 0xFFFFFFF )

Accumulate running sums from another monitor into this one.

Definition at line 145 of file QwHaloMonitor.cc.

145 {
146 fHalo_Counter.AccumulateRunningSum(value.fHalo_Counter, count, ErrorMask);
147}

References fHalo_Counter, and QwHaloMonitor().

+ Here is the call graph for this function:

◆ ApplyHWChecks()

Bool_t QwHaloMonitor::ApplyHWChecks ( )

Apply hardware checks (no hardware errors for simple counters).

Definition at line 68 of file QwHaloMonitor.cc.

69{
70 Bool_t eventokay=kTRUE;
71 return eventokay;
72}

◆ ApplySingleEventCuts()

Bool_t QwHaloMonitor::ApplySingleEventCuts ( )

Apply single-event cuts on the underlying counter.

Definition at line 76 of file QwHaloMonitor.cc.

77{
78 return fHalo_Counter.ApplySingleEventCuts();
79}

References fHalo_Counter.

◆ CalculateRunningAverage()

void QwHaloMonitor::CalculateRunningAverage ( )

Update running averages for the underlying counter.

Definition at line 155 of file QwHaloMonitor.cc.

155 {
156 fHalo_Counter.CalculateRunningAverage();
157}

References fHalo_Counter.

◆ CheckForBurpFail()

Bool_t QwHaloMonitor::CheckForBurpFail ( const VQwDataElement * ev_error)

Check for burp failures by delegating to the underlying counter.

Parameters
ev_errorReference halo monitor to compare against.
Returns
kTRUE if a burp failure was detected; otherwise kFALSE.

Definition at line 178 of file QwHaloMonitor.cc.

178 {
179 Bool_t burpstatus = kFALSE;
180 try {
181 if(typeid(*ev_error)==typeid(*this)) {
182 //std::cout<<" Here in QwHaloMonitor::CheckForBurpFail \n";
183 if (this->GetElementName()!="") {
184 const QwHaloMonitor* value_halo = dynamic_cast<const QwHaloMonitor* >(ev_error);
185 burpstatus |= fHalo_Counter.CheckForBurpFail(&(value_halo->fHalo_Counter));
186 }
187 } else {
188 TString loc="Standard exception from QwHaloMonitor::CheckForBurpFail :"+
189 ev_error->GetElementName()+" "+this->GetElementName()+" are not of the "
190 +"same type";
191 throw std::invalid_argument(loc.Data());
192 }
193 } catch (std::exception& e) {
194 std::cerr<< e.what()<<std::endl;
195 }
196 return burpstatus;
197}
virtual const TString & GetElementName() const
Get the name of this element.

References fHalo_Counter, VQwDataElement::GetElementName(), QwHaloMonitor(), and VQwDataElement::VQwDataElement().

+ Here is the call graph for this function:

◆ ClearEventData()

void QwHaloMonitor::ClearEventData ( )
overridevirtual

Clear event-scoped data in the underlying counter.

Reimplemented from VQwDataElement.

Definition at line 48 of file QwHaloMonitor.cc.

49{
50 fHalo_Counter.ClearEventData();
51}

References fHalo_Counter.

◆ ConstructBranch() [1/2]

void QwHaloMonitor::ConstructBranch ( TTree * tree,
TString & prefix )

Definition at line 242 of file QwHaloMonitor.cc.

243{
244 if (GetElementName()==""){
245 // This channel is not used, so skip filling the histograms.
246 }
247 else{
248 fHalo_Counter.ConstructBranch(tree, prefix);
249 // this functions doesn't do anything yet
250 }
251}

References fHalo_Counter, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ ConstructBranch() [2/2]

void QwHaloMonitor::ConstructBranch ( TTree * tree,
TString & prefix,
QwParameterFile & modulelist )

Definition at line 255 of file QwHaloMonitor.cc.

256{
257 TString devicename;
258
259 devicename=GetElementName();
260 devicename.ToLower();
261 if (GetElementName()==""){
262 // This channel is not used, so skip filling the histograms.
263 } else {
264
265 //QwMessage <<" QwHaloMonitor "<<devicename<<QwLog::endl;
266 if (modulelist.HasValue(devicename)){
267 fHalo_Counter.ConstructBranch(tree, prefix);
268 QwMessage <<" Tree leaf added to "<<devicename<<QwLog::endl;
269 }
270 // this functions doesn't do anything yet
271 }
272}
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297
Bool_t HasValue(TString &vname)

References QwLog::endl(), fHalo_Counter, VQwDataElement::GetElementName(), QwParameterFile::HasValue(), and QwMessage.

+ Here is the call graph for this function:

◆ ConstructBranchAndVector()

void QwHaloMonitor::ConstructBranchAndVector ( TTree * tree,
TString & prefix,
QwRootTreeBranchVector & values )

Construct ROOT branches and value vector entries.

Parameters
treeOutput tree.
prefixBranch name prefix.
valuesOutput value vector to be appended.

Definition at line 231 of file QwHaloMonitor.cc.

232{
233 if (GetElementName()==""){
234 // This channel is not used, so skip filling the histograms.
235 }
236 else{
237 fHalo_Counter.ConstructBranchAndVector(tree, prefix,values);
238 // this functions doesn't do anything yet
239 }
240}

References fHalo_Counter, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ ConstructHistograms()

void QwHaloMonitor::ConstructHistograms ( TDirectory * folder,
TString & prefix )
overridevirtual

Define histograms for this monitor (delegated to underlying counter).

Parameters
folderROOT folder to contain histograms.
prefixHistogram name prefix.

Implements VQwDataElement.

Definition at line 204 of file QwHaloMonitor.cc.

205{
206 if (GetElementName()==""){
207 // This channel is not used, so skip filling the histograms.
208 }
209 else{
210 fHalo_Counter.ConstructHistograms(folder, prefix);
211 }
212}

References fHalo_Counter, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ DeaccumulateRunningSum()

void QwHaloMonitor::DeaccumulateRunningSum ( QwHaloMonitor & value,
Int_t ErrorMask = 0xFFFFFFF )

Remove a single entry from the running sums using a source value.

Definition at line 150 of file QwHaloMonitor.cc.

150 {
151 fHalo_Counter.DeaccumulateRunningSum(value.fHalo_Counter, ErrorMask);
152}

References fHalo_Counter, and QwHaloMonitor().

+ Here is the call graph for this function:

◆ Difference()

void QwHaloMonitor::Difference ( QwHaloMonitor & value1,
QwHaloMonitor & value2 )

Compute the difference of two halo monitors into this instance.

Definition at line 124 of file QwHaloMonitor.cc.

124 {
125 *this = value1;
126 *this -= value2;
127}

References QwHaloMonitor().

+ Here is the call graph for this function:

◆ FillHistograms()

void QwHaloMonitor::FillHistograms ( )
overridevirtual

Fill histograms for this monitor if enabled.

Implements VQwDataElement.

Definition at line 215 of file QwHaloMonitor.cc.

216{
217 if (GetElementName()==""){
218 // This channel is not used, so skip filling the histograms.
219 }
220 else{
221 fHalo_Counter.FillHistograms();
222 }
223}

References fHalo_Counter, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ FillTreeVector()

void QwHaloMonitor::FillTreeVector ( QwRootTreeBranchVector & values) const

Definition at line 277 of file QwHaloMonitor.cc.

278{
279 if (GetElementName()==""){
280 // This channel is not used, so skip filling the histograms.
281 }
282 else{
283 fHalo_Counter.FillTreeVector(values);
284 // this functions doesn't do anything yet
285 }
286}

References fHalo_Counter, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ GetEventcutErrorFlag()

UInt_t QwHaloMonitor::GetEventcutErrorFlag ( )
inlineoverridevirtual

return the error flag on this channel/device

Reimplemented from VQwDataElement.

Definition at line 96 of file QwHaloMonitor.h.

96{return fHalo_Counter.GetEventcutErrorFlag();};

References fHalo_Counter.

Referenced by UpdateErrorFlag().

+ Here is the caller graph for this function:

◆ GetExternalClockName()

std::string QwHaloMonitor::GetExternalClockName ( )
inlineoverridevirtual

Reimplemented from VQwDataElement.

Definition at line 65 of file QwHaloMonitor.h.

65{ return fHalo_Counter.GetExternalClockName(); };

References fHalo_Counter.

◆ GetNormClockValue()

Double_t QwHaloMonitor::GetNormClockValue ( )
inlineoverridevirtual

Reimplemented from VQwDataElement.

Definition at line 69 of file QwHaloMonitor.h.

69{ return fHalo_Counter.GetNormClockValue();}

References fHalo_Counter.

◆ GetScaler() [1/2]

VQwHardwareChannel * QwHaloMonitor::GetScaler ( )
inline

Definition at line 129 of file QwHaloMonitor.h.

129 {
130 return &fHalo_Counter;
131 };

References fHalo_Counter.

Referenced by GetScaler().

+ Here is the caller graph for this function:

◆ GetScaler() [2/2]

const VQwHardwareChannel * QwHaloMonitor::GetScaler ( ) const
inline

Definition at line 133 of file QwHaloMonitor.h.

133 {
134 return const_cast<QwHaloMonitor*>(this)->GetScaler();
135 };
VQwHardwareChannel * GetScaler()

References GetScaler(), and QwHaloMonitor().

+ Here is the call graph for this function:

◆ GetValue()

Double_t QwHaloMonitor::GetValue ( )
inline

Definition at line 137 of file QwHaloMonitor.h.

137 {
138 return fHalo_Counter.GetValue();
139 }

References fHalo_Counter.

◆ IncrementErrorCounters()

void QwHaloMonitor::IncrementErrorCounters ( )
inline

Definition at line 95 of file QwHaloMonitor.h.

95{fHalo_Counter.IncrementErrorCounters();};

References fHalo_Counter.

◆ InitializeChannel() [1/2]

void QwHaloMonitor::InitializeChannel ( TString name)

Initialize the halo monitor with a detector name.

Parameters
nameDetector name used for branches and histograms.

Definition at line 42 of file QwHaloMonitor.cc.

42 {
43 fHalo_Counter.InitializeChannel(name);
44 SetElementName(name);
45}
void SetElementName(const TString &name)
Set the name of this element.

References fHalo_Counter, and VQwDataElement::SetElementName().

Referenced by QwHaloMonitor(), and QwHaloMonitor().

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

◆ InitializeChannel() [2/2]

void QwHaloMonitor::InitializeChannel ( TString subsystem,
TString name )

Initialize the halo monitor with subsystem and name.

Parameters
subsystemSubsystem identifier.
nameDetector name used for branches and histograms.

Definition at line 33 of file QwHaloMonitor.cc.

33 {
34 fHalo_Counter.InitializeChannel(name);
35 SetElementName(name);
36}

References fHalo_Counter, and VQwDataElement::SetElementName().

+ Here is the call graph for this function:

◆ LoadChannelParameters()

void QwHaloMonitor::LoadChannelParameters ( QwParameterFile & paramfile)
inlineoverridevirtual

Reimplemented from VQwDataElement.

Definition at line 62 of file QwHaloMonitor.h.

62 {
63 fHalo_Counter.LoadChannelParameters(paramfile);
64 }

References fHalo_Counter.

◆ NeedsExternalClock()

Bool_t QwHaloMonitor::NeedsExternalClock ( )
inlineoverridevirtual

Reimplemented from VQwDataElement.

Definition at line 66 of file QwHaloMonitor.h.

66{ return fHalo_Counter.NeedsExternalClock(); };

References fHalo_Counter.

◆ Offset()

void QwHaloMonitor::Offset ( Double_t Offset)

References Offset().

Referenced by Offset().

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

◆ operator+=()

QwHaloMonitor & QwHaloMonitor::operator+= ( const QwHaloMonitor & value)

Add-assign from another halo monitor (sum counters).

Definition at line 99 of file QwHaloMonitor.cc.

100{
101 if (GetElementName()!=""){
102 this->fHalo_Counter+=value.fHalo_Counter;
103 }
104 return *this;
105}

References fHalo_Counter, VQwDataElement::GetElementName(), and QwHaloMonitor().

+ Here is the call graph for this function:

◆ operator-=()

QwHaloMonitor & QwHaloMonitor::operator-= ( const QwHaloMonitor & value)

Subtract-assign from another halo monitor (difference counters).

Definition at line 108 of file QwHaloMonitor.cc.

109{
110 if (GetElementName()!=""){
111 this->fHalo_Counter-=value.fHalo_Counter;
112 }
113 return *this;
114}

References fHalo_Counter, VQwDataElement::GetElementName(), and QwHaloMonitor().

+ Here is the call graph for this function:

◆ operator=()

QwHaloMonitor & QwHaloMonitor::operator= ( const QwHaloMonitor & value)

Copy-assign from another halo monitor.

Definition at line 90 of file QwHaloMonitor.cc.

91{
92 if (GetElementName()!=""){
93 this->fHalo_Counter=value.fHalo_Counter;
94 }
95 return *this;
96}

References fHalo_Counter, VQwDataElement::GetElementName(), and QwHaloMonitor().

+ Here is the call graph for this function:

◆ PrintErrorCounters() [1/2]

void QwHaloMonitor::PrintErrorCounters ( )

◆ PrintErrorCounters() [2/2]

void QwHaloMonitor::PrintErrorCounters ( ) const
overridevirtual

Print accumulated error counters for this monitor.

Reimplemented from VQwDataElement.

Definition at line 83 of file QwHaloMonitor.cc.

84{
85 fHalo_Counter.PrintErrorCounters();
86}

References fHalo_Counter.

◆ PrintInfo()

void QwHaloMonitor::PrintInfo ( ) const
overridevirtual

Print detailed information for this monitor.

Reimplemented from VQwDataElement.

Definition at line 167 of file QwHaloMonitor.cc.

168{
169 std::cout << "QwVQWK_Channel Info " << std::endl;
170 fHalo_Counter.PrintInfo();
171}

References fHalo_Counter.

◆ PrintValue()

void QwHaloMonitor::PrintValue ( ) const
overridevirtual

Print a compact value summary for this monitor.

Reimplemented from VQwDataElement.

Definition at line 161 of file QwHaloMonitor.cc.

162{
163 fHalo_Counter.PrintValue();
164}

References fHalo_Counter.

◆ ProcessEvBuffer()

Int_t QwHaloMonitor::ProcessEvBuffer ( UInt_t * buffer,
UInt_t num_words_left,
UInt_t index = 0 )
overridevirtual

Decode the raw event buffer into the underlying counter.

Implements VQwDataElement.

Definition at line 61 of file QwHaloMonitor.cc.

62{
63 return fHalo_Counter.ProcessEvBuffer(buffer,num_words_left);
64}

References fHalo_Counter.

◆ ProcessEvent()

void QwHaloMonitor::ProcessEvent ( )

Process event (delegated to the underlying counter).

Definition at line 54 of file QwHaloMonitor.cc.

55{
56 // no processing required for the halos as they are just counters(?).
57 fHalo_Counter.ProcessEvent();
58}

References fHalo_Counter.

◆ Ratio()

void QwHaloMonitor::Ratio ( QwHaloMonitor & numer,
QwHaloMonitor & denom )

Form the ratio of two halo monitors into this instance.

Definition at line 130 of file QwHaloMonitor.cc.

131{
132 if (GetElementName()!=""){
133 this->fHalo_Counter.Ratio(numer.fHalo_Counter,denom.fHalo_Counter);
134 }
135 return;
136}

References fHalo_Counter, VQwDataElement::GetElementName(), and QwHaloMonitor().

+ Here is the call graph for this function:

◆ Scale()

void QwHaloMonitor::Scale ( Double_t Offset)

Scale the underlying counter by a constant factor.

Definition at line 139 of file QwHaloMonitor.cc.

140{
141 fHalo_Counter.Scale(factor);
142}

References fHalo_Counter.

◆ SetCalibrationFactor()

void QwHaloMonitor::SetCalibrationFactor ( Double_t factor)
inline

Definition at line 89 of file QwHaloMonitor.h.

89{ fHalo_Counter.SetCalibrationFactor(factor); };

References fHalo_Counter.

◆ SetEventCutMode()

void QwHaloMonitor::SetEventCutMode ( Int_t bcuts)
inline

Definition at line 111 of file QwHaloMonitor.h.

111 {
112 fHalo_Counter.SetEventCutMode(bcuts);
113 }

References fHalo_Counter.

◆ SetExternalClockName()

void QwHaloMonitor::SetExternalClockName ( const std::string name)
inlineoverridevirtual

Reimplemented from VQwDataElement.

Definition at line 68 of file QwHaloMonitor.h.

68{ fHalo_Counter.SetExternalClockName(name);};

References fHalo_Counter.

◆ SetExternalClockPtr()

void QwHaloMonitor::SetExternalClockPtr ( const VQwHardwareChannel * clock)
inlineoverridevirtual

Reimplemented from VQwDataElement.

Definition at line 67 of file QwHaloMonitor.h.

67{fHalo_Counter.SetExternalClockPtr(clock);};

References fHalo_Counter.

◆ SetPedestal()

void QwHaloMonitor::SetPedestal ( Double_t ped)
inline

Definition at line 88 of file QwHaloMonitor.h.

88{ fHalo_Counter.SetPedestal(ped); };

References fHalo_Counter.

◆ SetSingleEventCuts()

void QwHaloMonitor::SetSingleEventCuts ( UInt_t errorflag,
Double_t min,
Double_t max,
Double_t stability,
Double_t burplevel )
inline

Definition at line 107 of file QwHaloMonitor.h.

107 {
108 QwError<<"***************************"<<QwLog::endl;
109 fHalo_Counter.SetSingleEventCuts(errorflag,min,max,stability,burplevel);
110 };
#define QwError
Predefined log drain for errors.
Definition QwLog.h:39

References QwLog::endl(), fHalo_Counter, and QwError.

+ Here is the call graph for this function:

◆ Sum()

void QwHaloMonitor::Sum ( QwHaloMonitor & value1,
QwHaloMonitor & value2 )

Sum two halo monitors into this instance.

Definition at line 118 of file QwHaloMonitor.cc.

118 {
119 *this = value1;
120 *this += value2;
121}

References QwHaloMonitor().

+ Here is the call graph for this function:

◆ UpdateErrorFlag() [1/2]

UInt_t QwHaloMonitor::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 100 of file QwHaloMonitor.h.

100{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]

void QwHaloMonitor::UpdateErrorFlag ( const QwHaloMonitor * ev_error)
inline

Definition at line 101 of file QwHaloMonitor.h.

101 {
102 fHalo_Counter.UpdateErrorFlag(ev_error->fHalo_Counter);
103 };

References fHalo_Counter, and QwHaloMonitor().

+ Here is the call graph for this function:

◆ UpdateHWErrorCount()

void QwHaloMonitor::UpdateHWErrorCount ( )

References QwHaloMonitor().

+ Here is the call graph for this function:

Field Documentation

◆ bEVENTCUTMODE

Bool_t QwHaloMonitor::bEVENTCUTMODE
private

Definition at line 157 of file QwHaloMonitor.h.

◆ fDeviceErrorCode

Int_t QwHaloMonitor::fDeviceErrorCode
private

Definition at line 156 of file QwHaloMonitor.h.

◆ fHalo_Counter

◆ kDEBUG

const Bool_t QwHaloMonitor::kDEBUG
staticprivate

Definition at line 152 of file QwHaloMonitor.h.


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