QwAnalysis
VQwBCM Class Referenceabstract

#include <VQwBCM.h>

+ Inheritance diagram for VQwBCM:
+ Collaboration diagram for VQwBCM:

Public Member Functions

virtual ~VQwBCM ()
 
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 VQwBCM &numer, const VQwBCM &denom)
 
virtual void ClearEventData ()=0
 Clear the event data in this element. More...
 
virtual void InitializeChannel (TString name, TString datatosave)=0
 
virtual void InitializeChannel (TString subsystem, TString name, TString datatosave)=0
 
virtual void LoadChannelParameters (QwParameterFile &paramfile)=0
 
virtual Bool_t NeedsExternalClock ()=0
 
virtual void SetExternalClockPtr (const VQwHardwareChannel *clock)=0
 
virtual void SetExternalClockName (const std::string name)=0
 
virtual Double_t GetNormClockValue ()=0
 
virtual void SetDefaultSampleSize (Int_t sample_size)=0
 
virtual void SetEventCutMode (Int_t bcuts)=0
 
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 UpdateErrorFlag (const VQwBCM *ev_error)=0
 
virtual void SetPedestal (Double_t ped)=0
 
virtual void SetCalibrationFactor (Double_t calib)=0
 
virtual void RandomizeEventData (int helicity, double time)=0
 
virtual void EncodeEventData (std::vector< UInt_t > &buffer)=0
 
virtual Bool_t ApplySingleEventCuts ()=0
 
virtual void IncrementErrorCounters ()=0
 
virtual void ProcessEvent ()=0
 
virtual void Scale (Double_t factor)=0
 
virtual void CalculateRunningAverage ()=0
 
virtual void AccumulateRunningSum (const VQwBCM &value)=0
 
virtual void DeaccumulateRunningSum (VQwBCM &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 std::vector
< QwErrDBInterface
GetErrDBEntry ()=0
 
virtual Double_t GetValue ()=0
 
virtual Double_t GetValueError ()=0
 
virtual Double_t GetValueWidth ()=0
 
virtual const VQwHardwareChannelGetCharge () const =0
 
virtual void SetRandomEventParameters (Double_t mean, Double_t sigma)=0
 
virtual void SetRandomEventAsymmetry (Double_t asymmetry)=0
 
virtual void AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency)=0
 
virtual VQwBCMoperator= (const VQwBCM &value)=0
 
virtual VQwBCMoperator+= (const VQwBCM &value)=0
 
virtual VQwBCMoperator-= (const VQwBCM &value)=0
 
virtual void SetBCMForCombo (VQwBCM *bcm, Double_t weight, Double_t sumqw)=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 void SetNeedsExternalClock (Bool_t needed)
 
virtual std::string GetExternalClockName ()
 
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 VQwBCMCreate (TString subsystemname, TString type, TString name, TString clock="")
 A fast way of creating a BCM of specified type. More...
 
static VQwBCMCreate (const VQwBCM &source)
 
static VQwBCMCreateCombo (TString subsystemname, TString type, TString name)
 A fast way of creating a combo BCM of specified type. More...
 
static VQwBCMCreateCombo (const VQwBCM &source)
 

Protected Member Functions

 VQwBCM (VQwDataElement &beamcurrent)
 
 VQwBCM (VQwDataElement &beamcurrent, TString name)
 
- 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

VQwDataElementfBeamCurrent_ref
 
- 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...
 

Additional Inherited Members

- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0, kDerived }
 

Detailed Description

Definition at line 32 of file VQwBCM.h.

Constructor & Destructor Documentation

VQwBCM::VQwBCM ( VQwDataElement beamcurrent)
inlineprotected

Definition at line 41 of file VQwBCM.h.

41 : fBeamCurrent_ref(beamcurrent) { };
VQwDataElement & fBeamCurrent_ref
Definition: VQwBCM.h:118
VQwBCM::VQwBCM ( VQwDataElement beamcurrent,
TString  name 
)
inlineprotected

Definition at line 42 of file VQwBCM.h.

42 : fBeamCurrent_ref(beamcurrent) { };
VQwDataElement & fBeamCurrent_ref
Definition: VQwBCM.h:118
virtual VQwBCM::~VQwBCM ( )
inlinevirtual

Definition at line 45 of file VQwBCM.h.

45 { };

Member Function Documentation

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

Implemented in QwBCM< T >.

virtual void VQwBCM::AddRandomEventDriftParameters ( Double_t  amplitude,
Double_t  phase,
Double_t  frequency 
)
pure virtual

Implemented in QwBCM< T >.

Referenced by main().

+ Here is the caller graph for this function:

virtual Bool_t VQwBCM::ApplySingleEventCuts ( )
pure virtual

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

virtual void VQwBCM::CalculateRunningAverage ( )
pure virtual

Implemented in QwBCM< T >.

virtual void VQwBCM::ClearEventData ( )
pure virtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

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

Construct the histograms for this data element.

Implements VQwDataElement.

Implemented in QwBCM< T >.

VQwBCM * VQwBCM::Create ( TString  subsystemname,
TString  type,
TString  name,
TString  clock = "" 
)
static

A fast way of creating a BCM of specified type.

Definition at line 27 of file VQwBCM.cc.

References QwMessage, and QwWarning.

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

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

+ Here is the caller graph for this function:

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

Definition at line 47 of file VQwBCM.cc.

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

48 {
49  Bool_t localDebug = kFALSE;
50  TString type = source.GetModuleType();
51  type.ToUpper();
52  if( localDebug ) QwMessage<<"Creating BCM of type: "<<type<<QwLog::endl;
53  // (jc2) As a first try, let's do this the ugly way (but rather very
54  // simple), just list out the types of BCM's supported by this code!!!
55  if( type == "VQWK") {
56  return new QwBCM<QwVQWK_Channel>(dynamic_cast<const QwBCM<QwVQWK_Channel>&>(source));
57  } else if ( type == "SIS3801" ) {
58  return new QwBCM<QwSIS3801_Channel>(dynamic_cast<const QwBCM<QwSIS3801_Channel>&>(source));
59  } else if ( type == "SCALER" || type == "SIS3801D24" ) {
60  return new QwBCM<QwSIS3801D24_Channel>(dynamic_cast<const QwBCM<QwSIS3801D24_Channel>&>(source));
61  } else { // Unsupported one!
62  QwWarning << "BCM of type="<<type<<" is UNSUPPORTED!!\n";
63  exit(-1);
64  }
65 }
#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
Definition: QwBCM.h:34
#define QwWarning
Predefined log drain for warnings.
Definition: QwLog.h:45

+ Here is the call graph for this function:

VQwBCM * VQwBCM::CreateCombo ( TString  subsystemname,
TString  type,
TString  name 
)
static

A fast way of creating a combo BCM of specified type.

Definition at line 70 of file VQwBCM.cc.

References QwMessage, and QwWarning.

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

71 {
72  Bool_t localDebug = kFALSE;
73  type.ToUpper();
74  if( localDebug ) QwMessage<<"Creating CombinedBCM of type: "<<type<<" with name: "<<
75  name<<". Subsystem Name: " <<subsystemname<<"\n";
76  // (jc2) As a first try, let's do this the ugly way (but rather very
77  // simple), just list out the types of BCM's supported by this code!!!
78  if( type == "VQWK") {
79  return new QwCombinedBCM<QwVQWK_Channel>(subsystemname,name,type);
80  } else if ( type == "SIS3801" ) { // Default SCALER channel
81  return new QwCombinedBCM<QwSIS3801_Channel>(subsystemname,name,type);
82  } else if ( type == "SCALER" || type == "SIS3801D24" ) {
83  return new QwCombinedBCM<QwSIS3801D24_Channel>(subsystemname,name,type);
84  } else { // Unsupported one!
85  QwWarning << "BCM of type="<<type<<" is UNSUPPORTED!!\n";
86  exit(-1);
87  }
88 }
#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:

VQwBCM * VQwBCM::CreateCombo ( const VQwBCM source)
static

Definition at line 90 of file VQwBCM.cc.

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

91 {
92  Bool_t localDebug = kFALSE;
93  TString type = source.GetModuleType();
94  type.ToUpper();
95  if( localDebug ) QwMessage<<"Creating CombinedBCM of type: "<<type<< QwLog::endl;
96  // (jc2) As a first try, let's do this the ugly way (but rather very
97  // simple), just list out the types of BCM's supported by this code!!!
98  if( type == "VQWK") {
99  return new QwCombinedBCM<QwVQWK_Channel>(dynamic_cast<const QwCombinedBCM<QwVQWK_Channel>&>(source));
100  } else if ( type == "SIS3801" ) { // Default SCALER channel
101  return new QwCombinedBCM<QwSIS3801_Channel>(dynamic_cast<const QwCombinedBCM<QwSIS3801_Channel>&>(source));
102  } else if ( type == "SCALER" || type == "SIS3801D24" ) {
103  return new QwCombinedBCM<QwSIS3801D24_Channel>(dynamic_cast<const QwCombinedBCM<QwSIS3801D24_Channel>&>(source));
104  } else { // Unsupported one!
105  QwWarning << "BCM of type="<<type<<" is UNSUPPORTED!!\n";
106  exit(-1);
107  }
108 }
#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 VQwBCM::DeaccumulateRunningSum ( VQwBCM value)
pure virtual

Implemented in QwBCM< T >.

virtual void VQwBCM::EncodeEventData ( std::vector< UInt_t > &  buffer)
pure virtual

Implemented in QwBCM< T >.

virtual void VQwBCM::FillHistograms ( )
pure virtual

Fill the histograms for this data element.

Implements VQwDataElement.

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

virtual const VQwHardwareChannel* VQwBCM::GetCharge ( ) const
pure virtual

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

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

Implemented in QwBCM< T >.

virtual std::vector<QwErrDBInterface> VQwBCM::GetErrDBEntry ( )
pure virtual

Implemented in QwBCM< T >.

virtual Double_t VQwBCM::GetNormClockValue ( )
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwBCM< T >.

virtual Double_t VQwBCM::GetValue ( )
pure virtual

Implemented in QwBCM< T >.

virtual Double_t VQwBCM::GetValueError ( )
pure virtual

Implemented in QwBCM< T >.

virtual Double_t VQwBCM::GetValueWidth ( )
pure virtual

Implemented in QwBCM< T >.

virtual void VQwBCM::IncrementErrorCounters ( )
pure virtual

Implemented in QwBCM< T >.

virtual void VQwBCM::InitializeChannel ( TString  name,
TString  datatosave 
)
pure virtual

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

virtual void VQwBCM::InitializeChannel ( TString  subsystem,
TString  name,
TString  datatosave 
)
pure virtual

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

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

Reimplemented from VQwDataElement.

Implemented in QwBCM< T >.

virtual Bool_t VQwBCM::NeedsExternalClock ( )
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

virtual Int_t VQwBCM::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 QwBCM< T >, and QwCombinedBCM< T >.

virtual void VQwBCM::ProcessEvent ( )
pure virtual

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

virtual void VQwBCM::RandomizeEventData ( int  helicity,
double  time 
)
pure virtual

Implemented in QwBCM< T >.

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

Reimplemented in QwBCM< T >.

Definition at line 53 of file VQwBCM.h.

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

Implemented in QwBCM< T >.

virtual void VQwBCM::SetBCMForCombo ( VQwBCM bcm,
Double_t  weight,
Double_t  sumqw 
)
pure virtual

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

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

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

virtual void VQwBCM::SetDefaultSampleSize ( Int_t  sample_size)
pure virtual

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >.

virtual void VQwBCM::SetExternalClockName ( const std::string  name)
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwBCM< T >.

virtual void VQwBCM::SetExternalClockPtr ( const VQwHardwareChannel clock)
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwBCM< T >.

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

Implemented in QwBCM< T >, and QwCombinedBCM< T >.

virtual void VQwBCM::SetRandomEventAsymmetry ( Double_t  asymmetry)
pure virtual

Implemented in QwBCM< T >.

Referenced by main().

+ Here is the caller graph for this function:

virtual void VQwBCM::SetRandomEventParameters ( Double_t  mean,
Double_t  sigma 
)
pure virtual

Implemented in QwBCM< T >.

Referenced by main().

+ Here is the caller graph for this function:

virtual void VQwBCM::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 QwBCM< T >.

virtual UInt_t VQwBCM::UpdateErrorFlag ( )
inlinevirtual

Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag".

Reimplemented from VQwDataElement.

Reimplemented in QwCombinedBCM< T >.

Definition at line 70 of file VQwBCM.h.

References VQwDataElement::GetEventcutErrorFlag().

70 {return this->GetEventcutErrorFlag();};
virtual UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device

+ Here is the call graph for this function:

virtual void VQwBCM::UpdateErrorFlag ( const VQwBCM ev_error)
pure virtual

Implemented in QwBCM< T >.

Field Documentation

VQwDataElement& VQwBCM::fBeamCurrent_ref
protected

Definition at line 118 of file VQwBCM.h.


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