QwAnalysis
VQwClock Class Referenceabstract

#include <VQwClock.h>

+ Inheritance diagram for VQwClock:
+ Collaboration diagram for VQwClock:

Public Member Functions

 VQwClock ()
 
 VQwClock (const VQwClock &source)
 
virtual ~VQwClock ()
 
virtual Int_t ProcessEvBuffer (UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0)=0
 Process the CODA event buffer for this element. More...
 
virtual void ConstructHistograms (TDirectory *folder, TString &prefix)=0
 Construct the histograms for this data element. More...
 
virtual void FillHistograms ()=0
 Fill the histograms for this data element. More...
 
virtual void SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, 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. More...
 
virtual void Ratio (const VQwClock &numer, const VQwClock &denom)
 
virtual void ClearEventData ()=0
 Clear the event data in this element. More...
 
virtual void InitializeChannel (TString subsystem, TString name, TString datatosave, TString type="")=0
 
virtual void LoadChannelParameters (QwParameterFile &paramfile)=0
 
virtual void SetEventCutMode (Int_t bcuts)=0
 
virtual void SetPedestal (Double_t ped)=0
 
virtual void SetCalibrationFactor (Double_t calib)=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 VQwClock &value)=0
 
virtual void ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values)=0
 
virtual void ConstructBranch (TTree *tree, TString &prefix)=0
 
virtual void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)=0
 
virtual void FillTreeVector (std::vector< Double_t > &values) const =0
 
virtual std::vector
< QwDBInterface
GetDBEntry ()=0
 
virtual VQwClockoperator= (const VQwClock &value)=0
 
virtual VQwClockoperator+= (const VQwClock &value)=0
 
virtual VQwClockoperator-= (const VQwClock &value)=0
 
virtual Double_t GetNormClockValue ()=0
 
virtual Double_t GetStandardClockValue ()=0
 
virtual const VQwHardwareChannelGetTime () const =0
 
- Public Member Functions inherited from VQwDataElement
 VQwDataElement ()
 Default constructor. More...
 
 VQwDataElement (const VQwDataElement &value)
 Copy constructor. More...
 
virtual ~VQwDataElement ()
 Virtual destructor. More...
 
Bool_t IsNameEmpty () const
 Is the name of this element empty? More...
 
void SetElementName (const TString &name)
 Set the name of this element. More...
 
virtual const TString & GetElementName () const
 Get the name of this element. More...
 
size_t GetNumberOfDataWords ()
 Get the number of data words in this data element. More...
 
UInt_t GetGoodEventCount () const
 
virtual void AssignValueFrom (const VQwDataElement *valueptr)
 
virtual VQwDataElementoperator+= (const VQwDataElement &value)
 Addition-assignment operator. More...
 
virtual VQwDataElementoperator-= (const VQwDataElement &value)
 Subtraction-assignment operator. More...
 
virtual void Sum (const VQwDataElement &value1, const VQwDataElement &value2)
 Sum operator. More...
 
virtual void Difference (const VQwDataElement &value1, const VQwDataElement &value2)
 Difference operator. More...
 
virtual void Ratio (const VQwDataElement &numer, const VQwDataElement &denom)
 Ratio operator. More...
 
virtual void PrintValue () const
 Print single line of value and error of this data element. More...
 
virtual void PrintInfo () const
 Print multiple lines of information about this data element. More...
 
virtual void PrintErrorCounters () const
 report number of events failed due to HW and event cut failure More...
 
virtual UInt_t GetEventcutErrorFlag ()
 return the error flag on this channel/device More...
 
virtual UInt_t UpdateErrorFlag ()
 Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag". More...
 
virtual void SetNeedsExternalClock (Bool_t needed)
 
virtual Bool_t NeedsExternalClock ()
 
virtual std::string GetExternalClockName ()
 
virtual void SetExternalClockPtr (const VQwHardwareChannel *clock)
 
virtual void SetExternalClockName (const std::string name)
 
TString GetSubsystemName () const
 Return the name of the inheriting subsystem name. More...
 
void SetSubsystemName (TString sysname)
 Set the name of the inheriting subsystem name. More...
 
TString GetModuleType () const
 Return the type of the beam instrument. More...
 
void SetModuleType (TString ModuleType)
 set the type of the beam instrument More...
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects. More...
 

Static Public Member Functions

static VQwClockCreate (TString subsystemname, TString type, TString name)
 A fast way of creating a Clock of specified type. More...
 
static VQwClockCreate (const VQwClock &source)
 

Additional Inherited Members

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

Detailed Description

Definition at line 30 of file VQwClock.h.

Constructor & Destructor Documentation

VQwClock::VQwClock ( )
inline

Definition at line 39 of file VQwClock.h.

39 { }; // Do not use this function!!
VQwClock::VQwClock ( const VQwClock source)
inline

Definition at line 40 of file VQwClock.h.

41  : VQwDataElement(source)
42  { }
VQwDataElement()
Default constructor.
virtual VQwClock::~VQwClock ( )
inlinevirtual

Definition at line 43 of file VQwClock.h.

43 {};

Member Function Documentation

virtual void VQwClock::AccumulateRunningSum ( const VQwClock value)
pure virtual

Implemented in QwClock< T >.

virtual Bool_t VQwClock::ApplySingleEventCuts ( )
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::CalculateRunningAverage ( )
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::ClearEventData ( )
pure virtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

Implemented in QwClock< T >.

virtual void VQwClock::ConstructBranch ( TTree *  tree,
TString &  prefix 
)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::ConstructBranch ( TTree *  tree,
TString &  prefix,
QwParameterFile modulelist 
)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::ConstructBranchAndVector ( TTree *  tree,
TString &  prefix,
std::vector< Double_t > &  values 
)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::ConstructHistograms ( TDirectory *  folder,
TString &  prefix 
)
pure virtual

Construct the histograms for this data element.

Implements VQwDataElement.

Implemented in QwClock< T >.

VQwClock * VQwClock::Create ( TString  subsystemname,
TString  type,
TString  name 
)
static

A fast way of creating a Clock of specified type.

Definition at line 26 of file VQwClock.cc.

References QwMessage, and QwWarning.

Referenced by QwBeamLine::AddToElementList(), and QwBeamLine::CopyTemplatedDataElements().

27 {
28  Bool_t localDebug = kFALSE;
29  type.ToUpper();
30  if( localDebug ) QwMessage<<"Creating Clock of type: "<<type<<" with name: "<<
31  name<<". Subsystem Name: " <<subsystemname<<"\n";
32  // (jc2) As a first try, let's do this the ugly way (but rather very
33  // simple), just list out the types of Clock's supported by this code!!!
34  if( type == "VQWK") { // (jc2) I don't know why on earth anyone would want
35  // a VQWK clock, but it is added here for completion :)
36  return new QwClock<QwVQWK_Channel>(subsystemname,name,type);
37  } else if ( type == "SIS3801" ) {
38  return new QwClock<QwSIS3801_Channel>(subsystemname,name,type);
39  } else if ( type == "SCALER" || type == "SIS3801D24" ) {
40  return new QwClock<QwSIS3801D24_Channel>(subsystemname,name,type);
41  } else { // Unsupported one!
42  QwWarning << "Clock of type="<<type<<" is UNSUPPORTED!!\n";
43  exit(-1);
44  }
45 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
#define QwWarning
Predefined log drain for warnings.
Definition: QwLog.h:45

+ Here is the caller graph for this function:

VQwClock * VQwClock::Create ( const VQwClock source)
static

Definition at line 47 of file VQwClock.cc.

References QwLog::endl(), VQwDataElement::GetModuleType(), QwMessage, and QwWarning.

47  {
48  Bool_t localDebug = kFALSE;
49  TString type = source.GetModuleType();
50  type.ToUpper();
51  if (localDebug) QwMessage<<"Creating Clock of type: " << type << QwLog::endl;
52  // (jc2) As a first try, let's do this the ugly way (but rather very
53  // simple), just list out the types of Clock's supported by this code!!!
54  if( type == "VQWK") { // (jc2) I don't know why on earth anyone would want
55  // a VQWK clock, but it is added here for completion :)
56  return new QwClock<QwVQWK_Channel>(dynamic_cast<const QwClock<QwVQWK_Channel>&>(source));
57  } else if ( type == "SIS3801" ) {
58  return new QwClock<QwSIS3801_Channel>(dynamic_cast<const QwClock<QwSIS3801_Channel>&>(source));
59  } else if ( type == "SCALER" || type == "SIS3801D24" ) {
60  return new QwClock<QwSIS3801D24_Channel>(dynamic_cast<const QwClock<QwSIS3801D24_Channel>&>(source));
61  } else { // Unsupported one!
62  QwWarning << "Clock of type="<<type<<" is UNSUPPORTED!!\n";
63  exit(-1);
64  }
65 
66 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
TString GetModuleType() const
Return the type of the beam instrument.
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
#define QwWarning
Predefined log drain for warnings.
Definition: QwLog.h:45

+ Here is the call graph for this function:

virtual void VQwClock::FillHistograms ( )
pure virtual

Fill the histograms for this data element.

Implements VQwDataElement.

Implemented in QwClock< T >.

virtual void VQwClock::FillTreeVector ( std::vector< Double_t > &  values) const
pure virtual

Implemented in QwClock< T >.

virtual std::vector<QwDBInterface> VQwClock::GetDBEntry ( )
pure virtual

Implemented in QwClock< T >.

virtual Double_t VQwClock::GetNormClockValue ( )
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwClock< T >.

virtual Double_t VQwClock::GetStandardClockValue ( )
pure virtual

Implemented in QwClock< T >.

virtual const VQwHardwareChannel* VQwClock::GetTime ( ) const
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::IncrementErrorCounters ( )
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::InitializeChannel ( TString  subsystem,
TString  name,
TString  datatosave,
TString  type = "" 
)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::LoadChannelParameters ( QwParameterFile paramfile)
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwClock< T >.

virtual VQwClock& VQwClock::operator+= ( const VQwClock value)
pure virtual

Implemented in QwClock< T >.

virtual VQwClock& VQwClock::operator-= ( const VQwClock value)
pure virtual

Implemented in QwClock< T >.

virtual VQwClock& VQwClock::operator= ( const VQwClock value)
pure virtual

Implemented in QwClock< T >.

virtual Int_t VQwClock::ProcessEvBuffer ( UInt_t *  buffer,
UInt_t  num_words_left,
UInt_t  subelement = 0 
)
pure virtual

Process the CODA event buffer for this element.

Implements VQwDataElement.

Implemented in QwClock< T >.

virtual void VQwClock::ProcessEvent ( )
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::Ratio ( const VQwClock numer,
const VQwClock denom 
)
inlinevirtual

Reimplemented in QwClock< T >.

Definition at line 51 of file VQwClock.h.

52  { std::cerr << "Ratio not defined! (VQwClock)" << std::endl; }
virtual void VQwClock::Scale ( Double_t  factor)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::SetCalibrationFactor ( Double_t  calib)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::SetEventCutMode ( Int_t  bcuts)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::SetPedestal ( Double_t  ped)
pure virtual

Implemented in QwClock< T >.

virtual void VQwClock::SetSingleEventCuts ( UInt_t  errorflag,
Double_t  min,
Double_t  max,
Double_t  stability 
)
pure virtual

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

Reimplemented from VQwDataElement.

Implemented in QwClock< T >.


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