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

Standard clock channel with calibration representing frequency. More...

#include <QwClock.h>

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

Public Member Functions

 QwClock ()
 
 QwClock (TString subsystemname, TString name, TString type="")
 
 QwClock (const QwClock &source)
 
 ~QwClock () override
 
void LoadChannelParameters (QwParameterFile &paramfile) 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 subsystem, TString name, TString datatosave, TString type="") override
 
void ClearEventData () override
 Clear the event data in this element.
 
void EncodeEventData (std::vector< UInt_t > &buffer)
 
void ProcessEvent () override
 
Bool_t ApplyHWChecks ()
 
Bool_t ApplySingleEventCuts () override
 
void IncrementErrorCounters () override
 
Bool_t CheckForBurpFail (const QwClock *ev_error)
 
Bool_t CheckForBurpFail (const VQwClock *ev_error) override
 
Bool_t CheckForBurpFail (const VQwDataElement *ev_error)
 
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 QwClock *ev_error)
 
void SetSingleEventCuts (UInt_t errorflag, Double_t min=0, Double_t max=0, Double_t stability=0, Double_t burplevel=0) override
 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) override
 
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.
 
VQwClockoperator= (const VQwClock &value) override
 
VQwClockoperator+= (const VQwClock &value) override
 
VQwClockoperator-= (const VQwClock &value) override
 
QwClockoperator= (const QwClock &value)
 
QwClockoperator+= (const QwClock &value)
 
QwClockoperator-= (const QwClock &value)
 
void Ratio (const VQwClock &numer, const VQwClock &denom) override
 
void Ratio (const QwClock &numer, const QwClock &denom)
 
void Scale (Double_t factor) override
 
void AccumulateRunningSum (const VQwClock &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
 
void DeaccumulateRunningSum (VQwClock &value, Int_t ErrorMask=0xFFFFFFF) override
 
void CalculateRunningAverage () override
 
void SetPedestal (Double_t ped) override
 
void SetCalibrationFactor (Double_t calib) override
 
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) override
 
void ConstructBranch (TTree *tree, TString &prefix) override
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) override
 
void FillTreeVector (QwRootTreeBranchVector &values) const override
 
Double_t GetNormClockValue () override
 
Double_t GetStandardClockValue () override
 
const VQwHardwareChannelGetTime () const override
 
- Public Member Functions inherited from VQwClock
 VQwClock ()
 
 VQwClock (const VQwClock &source)
 
 ~VQwClock () override
 
- 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)
 
virtual Bool_t NeedsExternalClock ()
 
virtual std::string GetExternalClockName ()
 
virtual void SetExternalClockPtr (const VQwHardwareChannel *)
 
virtual void SetExternalClockName (const std::string)
 
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
 
fClock
 
Int_t fDeviceErrorCode
 
Bool_t bEVENTCUTMODE
 
Double_t fNormalizationValue
 

Static Private Attributes

static const Bool_t bDEBUG =kFALSE
 

Additional Inherited Members

- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0 , kDerived , kMoments }
 
- Static Public Member Functions inherited from VQwClock
static VQwClockCreate (TString subsystemname, TString type, TString name)
 
static VQwClockCreate (const VQwClock &source)
 
- 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 QwClock< T >

Standard clock channel with calibration representing frequency.

Provides timing and normalization support for subsystems that need an external clock. The calibration factor encodes the clock frequency. Implements specialized polymorphic dispatch for burp-failure checks via the VQwClock base as per the dual-operator pattern.

Definition at line 42 of file QwClock.h.

Constructor & Destructor Documentation

◆ QwClock() [1/3]

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

Definition at line 45 of file QwClock.h.

45{ };

Referenced by AccumulateRunningSum(), CheckForBurpFail(), CheckForBurpFail(), CheckForBurpFail(), DeaccumulateRunningSum(), operator+=(), operator+=(), operator-=(), operator-=(), operator=(), operator=(), QwClock(), Ratio(), Ratio(), and UpdateErrorFlag().

+ Here is the caller graph for this function:

◆ QwClock() [2/3]

template<typename T>
QwClock< T >::QwClock ( TString subsystemname,
TString name,
TString type = "" )
inline

Definition at line 46 of file QwClock.h.

46 {
49 };
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.
Standard clock channel with calibration representing frequency.
Definition QwClock.h:42
void InitializeChannel(TString subsystem, TString name, TString datatosave, TString type="") override
Definition QwClock.cc:42

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

+ Here is the call graph for this function:

◆ QwClock() [3/3]

template<typename T>
QwClock< T >::QwClock ( const QwClock< T > & source)
inline

Definition at line 50 of file QwClock.h.

References fCalibration, fClock, fLLimit, fNormalizationValue, fPedestal, fULimit, QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ ~QwClock()

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

Definition at line 57 of file QwClock.h.

57{ };

Member Function Documentation

◆ AccumulateRunningSum()

template<typename T>
void QwClock< T >::AccumulateRunningSum ( const VQwClock< T > & value,
Int_t count = 0,
Int_t ErrorMask = 0xFFFFFFF )
overridevirtual

Implements VQwClock.

Definition at line 309 of file QwClock.cc.

309 {
310 fClock.AccumulateRunningSum(
311 dynamic_cast<const QwClock<T>* >(&value)->fClock, count, ErrorMask);
312}
QwClock()
Definition QwClock.h:45

References fClock, QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ ApplyHWChecks()

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

Definition at line 89 of file QwClock.cc.

90{
92
93 UInt_t deviceerror=fClock.ApplyHWChecks();//will check for HW consistency and return the error code (=0 is HW good)
94 eventokay=(deviceerror & 0x0);//if no HW error return true
95
96 return eventokay;
97}

References fClock.

Referenced by ProcessEvBuffer().

+ Here is the caller graph for this function:

◆ ApplySingleEventCuts()

template<typename T>
Bool_t QwClock< T >::ApplySingleEventCuts ( )
overridevirtual

Implements VQwClock.

Definition at line 117 of file QwClock.cc.

117 {
118 //std::cout<<" QwClock::SingleEventCuts() "<<std::endl;
120
121 if (fClock.ApplySingleEventCuts()){
123 }
124 else{
125
126 if (bDEBUG) std::cout<<" evnt cut failed:-> set limit "<<fULimit<<" hardware sum "<<fClock.GetValue();
127 status&=kFALSE;
128 }
129 return status;
130}
static const Bool_t bDEBUG
Definition QwClock.h:179

References bDEBUG, fClock, and fULimit.

◆ CalculateRunningAverage()

template<typename T>
void QwClock< T >::CalculateRunningAverage ( )
overridevirtual

Implements VQwClock.

Definition at line 304 of file QwClock.cc.

304 {
305 fClock.CalculateRunningAverage();
306}

References fClock.

◆ CheckForBurpFail() [1/3]

template<typename T>
Bool_t QwClock< T >::CheckForBurpFail ( const QwClock< T > * ev_error)
inline

Definition at line 76 of file QwClock.h.

76 {
77 return fClock.CheckForBurpFail(&(ev_error->fClock));
78 }

References fClock, and QwClock().

Referenced by CheckForBurpFail(), and CheckForBurpFail().

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

◆ CheckForBurpFail() [2/3]

template<typename T>
Bool_t QwClock< T >::CheckForBurpFail ( const VQwClock< T > * ev_error)
inlineoverridevirtual

Implements VQwClock.

Definition at line 81 of file QwClock.h.

81 {
82 auto rhs = dynamic_cast<const QwClock*>(ev_error);
83 if (!rhs) {
84 throw std::invalid_argument("Type mismatch in QwClock::CheckForBurpFail(VQwClock*)");
85 }
86 return CheckForBurpFail(rhs);
87 }
Bool_t CheckForBurpFail(const QwClock *ev_error)
Definition QwClock.h:76

References CheckForBurpFail(), QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ CheckForBurpFail() [3/3]

template<typename T>
Bool_t QwClock< T >::CheckForBurpFail ( const VQwDataElement * ev_error)
inline

Definition at line 90 of file QwClock.h.

90 {
91 auto rhs = dynamic_cast<const QwClock*>(ev_error);
92 if (!rhs) {
93 throw std::invalid_argument("Type mismatch in QwClock::CheckForBurpFail");
94 }
95 return CheckForBurpFail(rhs);
96 }

References CheckForBurpFail(), QwClock(), and VQwDataElement::VQwDataElement().

+ Here is the call graph for this function:

◆ ClearEventData()

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

Clear the event data in this element.

Implements VQwClock.

Definition at line 56 of file QwClock.cc.

57{
58 fClock.ClearEventData();
59 return;
60}

References fClock.

◆ ConstructBranch() [1/2]

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

Implements VQwClock.

Definition at line 377 of file QwClock.cc.

378{
379 if (GetElementName()==""){
380 // This channel is not used, so skip filling the histograms.
381 } else
382 {
383 fClock.ConstructBranch(tree, prefix);
384 // this functions doesn't do anything yet
385 }
386 return;
387}
virtual const TString & GetElementName() const
Get the name of this element.

References fClock, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ ConstructBranch() [2/2]

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

Implements VQwClock.

Definition at line 390 of file QwClock.cc.

391{
393
395 devicename.ToLower();
396 if (GetElementName()==""){
397 // This channel is not used, so skip filling the histograms.
398 } else
399 {
400
401 //QwMessage <<" QwClock "<<devicename<<QwLog::endl;
402 if (modulelist.HasValue(devicename)){
403 fClock.ConstructBranch(tree, prefix);
404 QwMessage <<" Tree leave added to "<<devicename<<QwLog::endl;
405 }
406 // this functions doesn't do anything yet
407 }
408 return;
409}

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

+ Here is the call graph for this function:

◆ ConstructBranchAndVector()

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

Implements VQwClock.

Definition at line 365 of file QwClock.cc.

366{
367 if (this->GetElementName()==""){
368 // This channel is not used, so skip
369 } else
370 {
371 fClock.ConstructBranchAndVector(tree, prefix,values);
372 }
373 return;
374}

References fClock, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ ConstructHistograms()

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

Construct the histograms for this data element.

Implements VQwClock.

Definition at line 335 of file QwClock.cc.

336{
337 if (this->GetElementName()=="")
338 {
339 // This channel is not used, so skip filling the histograms.
340 }
341 else
342 {
343 fClock.ConstructHistograms(folder, prefix);
344 }
345 return;
346}

References fClock, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ DeaccumulateRunningSum()

template<typename T>
void QwClock< T >::DeaccumulateRunningSum ( VQwClock< T > & value,
Int_t ErrorMask = 0xFFFFFFF )
overridevirtual

Implements VQwClock.

Definition at line 315 of file QwClock.cc.

315 {
316 fClock.DeaccumulateRunningSum(
317 dynamic_cast<const QwClock<T>* >(&value)->fClock, ErrorMask);
318}

References fClock, QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ EncodeEventData()

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

Definition at line 77 of file QwClock.cc.

78{
79 fClock.EncodeEventData(buffer);
80}

References fClock.

◆ FillHistograms()

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

Fill the histograms for this data element.

Implements VQwClock.

Definition at line 349 of file QwClock.cc.

350{
351 if (this->GetElementName()=="")
352 {
353 // This channel is not used, so skip filling the histograms.
354 }
355 else
356 {
357 fClock.FillHistograms();
358 }
359
360
361 return;
362}

References fClock, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ FillTreeVector()

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

Implements VQwClock.

Definition at line 412 of file QwClock.cc.

413{
414 if (this->GetElementName()==""){
415 // This channel is not used, so skip filling the histograms.
416 } else
417 {
418 fClock.FillTreeVector(values);
419 // this functions doesn't do anything yet
420 }
421 return;
422}

References fClock, and VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ GetEventcutErrorFlag()

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

return the error flag on this channel/device

Reimplemented from VQwDataElement.

Definition at line 100 of file QwClock.h.

100 {//return the error flag
101 return fClock.GetEventcutErrorFlag();
102 }

References fClock.

Referenced by UpdateErrorFlag().

+ Here is the caller graph for this function:

◆ GetNormClockValue()

template<typename T>
Double_t QwClock< T >::GetNormClockValue ( )
inlineoverridevirtual

Implements VQwClock.

Definition at line 158 of file QwClock.h.

158{ return fNormalizationValue;};

References fNormalizationValue.

◆ GetStandardClockValue()

template<typename T>
Double_t QwClock< T >::GetStandardClockValue ( )
inlineoverridevirtual

Implements VQwClock.

Definition at line 159 of file QwClock.h.

159{ return fCalibration; };

References fCalibration.

◆ GetTime()

template<typename T>
const VQwHardwareChannel * QwClock< T >::GetTime ( ) const
inlineoverridevirtual

Implements VQwClock.

Definition at line 161 of file QwClock.h.

161 {
162 return &fClock;
163 };

References fClock.

◆ IncrementErrorCounters()

template<typename T>
void QwClock< T >::IncrementErrorCounters ( )
inlineoverridevirtual

Implements VQwClock.

Definition at line 74 of file QwClock.h.

74{fClock.IncrementErrorCounters();}

References fClock.

◆ InitializeChannel()

template<typename T>
void QwClock< T >::InitializeChannel ( TString subsystem,
TString name,
TString datatosave,
TString type = "" )
overridevirtual

Implements VQwClock.

Definition at line 42 of file QwClock.cc.

42 {
43 SetPedestal(0.);
45 if (type.Length() > 0)
47 fClock.InitializeChannel(subsystem, "QwClock", name, datatosave);
48 fClock.SetNeedsExternalClock(kFALSE);
50 //set default limits to event cuts
51 fLLimit=0;//init two timits
52 fULimit=0;//init two timits
53}
void SetElementName(const TString &name)
Set the name of this element.
void SetModuleType(TString ModuleType)
set the type of the beam instrument
void SetPedestal(Double_t ped) override
Definition QwClock.cc:28
void SetCalibrationFactor(Double_t calib) override
Definition QwClock.cc:35

References fClock, fLLimit, fULimit, SetCalibrationFactor(), VQwDataElement::SetElementName(), VQwDataElement::SetModuleType(), and SetPedestal().

Referenced by QwClock().

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

◆ LoadChannelParameters()

template<typename T>
void QwClock< T >::LoadChannelParameters ( QwParameterFile & paramfile)
inlineoverridevirtual

Implements VQwClock.

Definition at line 59 of file QwClock.h.

59 {
60 fClock.LoadChannelParameters(paramfile);
61 };

References fClock.

◆ operator+=() [1/2]

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

Definition at line 199 of file QwClock.cc.

200{
201 if (this->GetElementName()!="")
202 {
203 this->fClock+=value.fClock;
205 this->fCalibration=0;
206 }
207 return *this;
208}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), and QwClock().

+ Here is the call graph for this function:

◆ operator+=() [2/2]

template<typename T>
VQwClock & QwClock< T >::operator+= ( const VQwClock< T > & value)
overridevirtual

Implements VQwClock.

Definition at line 211 of file QwClock.cc.

212{
213 try {
214 if(typeid(value)==typeid(*this)) {
215 // std::cout<<" Here in QwClock::operator+= \n";
216 if (this->GetElementName()!="") {
217 const QwClock<T>* value_bcm = dynamic_cast<const QwClock<T>* >(&value);
218 QwClock<T>* this_cast = dynamic_cast<QwClock<T>* >(this);
222 }
223 } else {
224 TString loc="Standard exception from QwClock::operator+= :"+
225 value.GetElementName()+" "+this->GetElementName()+" are not of the "
226 +"same type";
227 throw std::invalid_argument(loc.Data());
228 }
229 } catch (std::exception& e) {
230 std::cerr<< e.what()<<std::endl;
231 }
232
233 return *this;
234}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ operator-=() [1/2]

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

Definition at line 251 of file QwClock.cc.

252{
253 try {
254 if(typeid(value)==typeid(*this)) {
255 // std::cout<<" Here in QwClock::operator-= \n";
256 if (this->GetElementName()!="") {
257 const QwClock<T>* value_bcm = dynamic_cast<const QwClock<T>* >(&value);
258 QwClock<T>* this_cast = dynamic_cast<QwClock<T>* >(this);
262 }
263 } else {
264 TString loc="Standard exception from QwClock::operator-= :"+
265 value.GetElementName()+" "+this->GetElementName()+" are not of the "
266 +"same type";
267 throw std::invalid_argument(loc.Data());
268 }
269 } catch (std::exception& e) {
270 std::cerr<< e.what()<<std::endl;
271 }
272 return *this;
273}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), and QwClock().

+ Here is the call graph for this function:

◆ operator-=() [2/2]

template<typename T>
VQwClock & QwClock< T >::operator-= ( const VQwClock< T > & value)
overridevirtual

Implements VQwClock.

Definition at line 237 of file QwClock.cc.

238{
239 if (this->GetElementName()!="")
240 {
241 const QwClock<T>* value_bcm = dynamic_cast<const QwClock<T>* >(&value);
242 QwClock<T>* this_cast = dynamic_cast<QwClock<T>* >(this);
246 }
247 return *this;
248}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ operator=() [1/2]

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

Definition at line 150 of file QwClock.cc.

151{
152// std::cout<<" Here in QwClock::operator= \n";
153 if (this->GetElementName()!="")
154 {
155 this->fClock=value.fClock;
158 }
159// std::cout<<" to be copied \n";
160// value.Print();
161// std::cout<<" copied \n";
162// this->Print();
163
164 return *this;
165}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), and QwClock().

+ Here is the call graph for this function:

◆ operator=() [2/2]

template<typename T>
VQwClock & QwClock< T >::operator= ( const VQwClock< T > & value)
overridevirtual

Implements VQwClock.

Definition at line 168 of file QwClock.cc.

169{
170 try {
171 if(typeid(value)==typeid(*this)) {
172 // std::cout<<" Here in QwClock::operator= \n";
173 if (this->GetElementName()!="") {
174 const QwClock<T>* value_bcm = dynamic_cast<const QwClock<T>* >(&value);
175 QwClock<T>* this_cast = dynamic_cast<QwClock<T>* >(this);
179 }
180 } else {
181 TString loc="Standard exception from QwClock::operator= :"+
182 value.GetElementName()+" "+this->GetElementName()+" are not of the "
183 +"same type";
184 throw std::invalid_argument(loc.Data());
185 }
186 } catch (std::exception& e) {
187 std::cerr<< e.what()<<std::endl;
188 }
189// std::cout<<" to be copied \n";
190// value.Print();
191// std::cout<<" copied \n";
192// this->Print();
193
194 return *this;
195
196}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), QwClock(), and VQwClock::VQwClock().

+ Here is the call graph for this function:

◆ PrintErrorCounters()

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

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

Reimplemented from VQwDataElement.

Definition at line 135 of file QwClock.cc.

135 {// report number of events failed due to HW and event cut failure
136 fClock.PrintErrorCounters();
137}

References fClock.

◆ PrintInfo()

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

Print multiple lines of information about this data element.

Reimplemented from VQwDataElement.

Definition at line 327 of file QwClock.cc.

328{
329 std::cout << "QwVQWK_Channel Info " << std::endl;
330 fClock.PrintInfo();
331}

References fClock.

◆ PrintValue()

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

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

Reimplemented from VQwDataElement.

Definition at line 321 of file QwClock.cc.

322{
323 fClock.PrintValue();
324}

References fClock.

◆ ProcessEvBuffer()

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

Process the CODA event buffer for this element.

Implements VQwClock.

Definition at line 142 of file QwClock.cc.

143{
145 this->ApplyHWChecks();
146 return words_read;
147}
Bool_t ApplyHWChecks()
Definition QwClock.cc:89

References ApplyHWChecks(), fClock, and QwBPMStripline< T >::subelement.

+ Here is the call graph for this function:

◆ ProcessEvent()

template<typename T>
void QwClock< T >::ProcessEvent ( )
overridevirtual

Implements VQwClock.

Definition at line 83 of file QwClock.cc.

84{
85 return;
86}

◆ Ratio() [1/2]

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

Definition at line 283 of file QwClock.cc.

284{
285 // std::cout<<"QwClock::Ratio element name ="<<GetElementName()<<" \n";
286 if (this->GetElementName()!="")
287 {
288 // std::cout<<"here in \n";
289 this->fClock.Ratio(numer.fClock,denom.fClock);
290 this->fPedestal=0;
291 this->fCalibration=0;
292 }
293 return;
294}

References fCalibration, fClock, fPedestal, VQwDataElement::GetElementName(), and QwClock().

+ Here is the call graph for this function:

◆ Ratio() [2/2]

template<typename T>
void QwClock< T >::Ratio ( const VQwClock< T > & numer,
const VQwClock< T > & denom )
overridevirtual

Reimplemented from VQwClock.

Definition at line 276 of file QwClock.cc.

277{
278 Ratio(*dynamic_cast<const QwClock<T>* >(&numer),
279 *dynamic_cast<const QwClock<T>* >(&denom));
280}
void Ratio(const VQwClock &numer, const VQwClock &denom) override
Definition QwClock.cc:276

References QwClock(), Ratio(), and VQwClock::VQwClock().

Referenced by Ratio().

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

◆ Scale()

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

Implements VQwClock.

Definition at line 297 of file QwClock.cc.

298{
299 fClock.Scale(factor);
300 return;
301}

References fClock.

◆ SetCalibrationFactor()

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

Implements VQwClock.

Definition at line 35 of file QwClock.cc.

36{
38 fClock.SetCalibrationFactor(fCalibration);
39}

References fCalibration, and fClock.

Referenced by InitializeChannel().

+ Here is the caller graph for this function:

◆ SetDefaultSampleSize()

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

Definition at line 110 of file QwClock.cc.

110 {
111 fClock.SetDefaultSampleSize((size_t)sample_size);
112}

References fClock.

◆ SetEventCutMode()

template<typename T>
void QwClock< T >::SetEventCutMode ( Int_t bcuts)
inlineoverridevirtual

Implements VQwClock.

Definition at line 112 of file QwClock.h.

112 {
114 fClock.SetEventCutMode(bcuts);
115 }
Bool_t bEVENTCUTMODE
Definition QwClock.h:180

References bEVENTCUTMODE, and fClock.

◆ SetPedestal()

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

Implements VQwClock.

Definition at line 28 of file QwClock.cc.

29{
31 fClock.SetPedestal(fPedestal);
32}

References fClock, and fPedestal.

Referenced by InitializeChannel().

+ Here is the caller graph for this function:

◆ SetSingleEventCuts()

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

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

Implements VQwClock.

Definition at line 101 of file QwClock.cc.

101 {
102 //set the unique tag to identify device type (bcm,bpm & etc)
104 QwMessage<<"QwClock Error Code passing to QwVQWK_Ch "<<errorflag<<QwLog::endl;
105 fClock.SetSingleEventCuts(errorflag,LL,UL,stability,burplevel);
106
107}

References QwLog::endl(), fClock, kBCMErrorFlag, and QwMessage.

+ Here is the call graph for this function:

◆ UpdateErrorFlag() [1/2]

template<typename T>
UInt_t QwClock< 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 103 of file QwClock.h.

103{return GetEventcutErrorFlag();};
UInt_t GetEventcutErrorFlag() override
return the error flag on this channel/device
Definition QwClock.h:100

References GetEventcutErrorFlag().

+ Here is the call graph for this function:

◆ UpdateErrorFlag() [2/2]

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

Definition at line 104 of file QwClock.h.

104 {
105 fClock.UpdateErrorFlag(ev_error->fClock);
106 }

References fClock, and QwClock().

+ Here is the call graph for this function:

Field Documentation

◆ bDEBUG

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

Definition at line 179 of file QwClock.h.

Referenced by ApplySingleEventCuts().

◆ bEVENTCUTMODE

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

Definition at line 180 of file QwClock.h.

Referenced by SetEventCutMode().

◆ fCalibration

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

◆ fClock

◆ fDeviceErrorCode

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

Definition at line 177 of file QwClock.h.

◆ fLLimit

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

Definition at line 173 of file QwClock.h.

Referenced by InitializeChannel(), and QwClock().

◆ fNormalizationValue

template<typename T>
Double_t QwClock< T >::fNormalizationValue
private

Definition at line 182 of file QwClock.h.

Referenced by GetNormClockValue(), and QwClock().

◆ fPedestal

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

◆ fULimit

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

Definition at line 173 of file QwClock.h.

Referenced by ApplySingleEventCuts(), InitializeChannel(), and QwClock().


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