QwAnalysis
QwOmnivore< VQwSubsystem_t > Class Template Reference

An omnivorous subsystem. More...

#include <QwOmnivore.h>

Inherits VQwSubsystem_t.

Public Member Functions

 QwOmnivore (const TString &name)
 Constructor with name. More...
 
 QwOmnivore (const QwOmnivore &source)
 Copy constructor. More...
 
virtual ~QwOmnivore ()
 Virtual destructor. More...
 
Int_t LoadChannelMap (TString mapfile)
 Map file definition. More...
 
Int_t LoadInputParameters (TString mapfile)
 Parameter file definition. More...
 
Int_t LoadGeometryDefinition (TString mapfile)
 Geometry definition for tracking subsystems. More...
 
Int_t LoadEventCuts (TString filename)
 Load the event cuts file. More...
 
Bool_t ApplySingleEventCuts ()
 Apply the single event cuts. More...
 
void PrintErrorCounters () const
 Report the number of events failed due to HW and event cut failures. More...
 
UInt_t GetEventcutErrorFlag ()
 Return the error flag to the main routine. More...
 
void IncrementErrorCounters ()
 Increment error counters. More...
 
void UpdateErrorFlag (const VQwSubsystem *)
 Update error flag. More...
 
void ClearEventData ()
 Get the hit list. More...
 
Int_t ProcessConfigurationBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
 Process the configuration events. More...
 
Int_t ProcessEvBuffer (const UInt_t event_type, const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
 Process the event buffer. More...
 
Int_t ProcessEvBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
 TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version. More...
 
void ProcessEvent ()
 Process the event. More...
 
VQwSubsystemoperator= (VQwSubsystem *value)
 Assignment/addition/subtraction operators. More...
 
VQwSubsystemoperator+= (VQwSubsystem *value)
 
VQwSubsystemoperator-= (VQwSubsystem *value)
 
void Sum (VQwSubsystem *value1, VQwSubsystem *value2)
 Sum/difference/ratio/scale operations. More...
 
void Difference (VQwSubsystem *value1, VQwSubsystem *value2)
 
void Ratio (VQwSubsystem *numer, VQwSubsystem *denom)
 
void Scale (Double_t factor)
 
void ConstructHistograms (TDirectory *folder, TString &prefix)
 Construct the histograms for this subsystem in a folder with a prefix. More...
 
void FillHistograms ()
 Fill the histograms for this subsystem. More...
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values)
 Construct the branch and tree vector. More...
 
void FillTreeVector (std::vector< Double_t > &values) const
 Fill the tree vector. More...
 
void ConstructBranch (TTree *, TString &)
 Construct branch. More...
 
void ConstructBranch (TTree *, TString &, QwParameterFile &)
 Construct branch. More...
 
void AccumulateRunningSum (VQwSubsystem *value)
 Update the running sums for devices. More...
 
void DeaccumulateRunningSum (VQwSubsystem *value)
 
void CalculateRunningAverage ()
 Calculate the average for all good events. More...
 

Private Member Functions

 QwOmnivore ()
 Private default constructor (not implemented, will throw linker error on use) More...
 

Detailed Description

template<class VQwSubsystem_t>
class QwOmnivore< VQwSubsystem_t >

An omnivorous subsystem.

Definition at line 16 of file QwOmnivore.h.

Constructor & Destructor Documentation

template<class VQwSubsystem_t >
QwOmnivore< VQwSubsystem_t >::QwOmnivore ( )
private

Private default constructor (not implemented, will throw linker error on use)

template<class VQwSubsystem_t >
QwOmnivore< VQwSubsystem_t >::QwOmnivore ( const TString &  name)
inline

Constructor with name.

Definition at line 24 of file QwOmnivore.h.

24 : VQwSubsystem(name),VQwSubsystem_t(name) { };
The pure virtual base class of all subsystems.
Definition: VQwSubsystem.h:59
template<class VQwSubsystem_t >
QwOmnivore< VQwSubsystem_t >::QwOmnivore ( const QwOmnivore< VQwSubsystem_t > &  source)
inline

Copy constructor.

Definition at line 26 of file QwOmnivore.h.

27  : VQwSubsystem(source),VQwSubsystem_t(source)
28  { }
The pure virtual base class of all subsystems.
Definition: VQwSubsystem.h:59
template<class VQwSubsystem_t >
virtual QwOmnivore< VQwSubsystem_t >::~QwOmnivore ( )
inlinevirtual

Virtual destructor.

Definition at line 30 of file QwOmnivore.h.

30 { };

Member Function Documentation

template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::AccumulateRunningSum ( VQwSubsystem value)
inline

Update the running sums for devices.

Definition at line 115 of file QwOmnivore.h.

115 { };
template<class VQwSubsystem_t >
Bool_t QwOmnivore< VQwSubsystem_t >::ApplySingleEventCuts ( )
inline

Apply the single event cuts.

Definition at line 42 of file QwOmnivore.h.

42 { return kTRUE; };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::CalculateRunningAverage ( )
inline

Calculate the average for all good events.

Definition at line 118 of file QwOmnivore.h.

118 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::ClearEventData ( )
inline

Get the hit list.

Get the detector geometry information Clear event data

Definition at line 60 of file QwOmnivore.h.

60 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::ConstructBranch ( TTree *  ,
TString &   
)
inline

Construct branch.

Definition at line 110 of file QwOmnivore.h.

110 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::ConstructBranch ( TTree *  ,
TString &  ,
QwParameterFile  
)
inline

Construct branch.

Definition at line 112 of file QwOmnivore.h.

112 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::ConstructBranchAndVector ( TTree *  tree,
TString &  prefix,
std::vector< Double_t > &  values 
)
inline

Construct the branch and tree vector.

Definition at line 106 of file QwOmnivore.h.

106 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::ConstructHistograms ( TDirectory *  folder,
TString &  prefix 
)
inline

Construct the histograms for this subsystem in a folder with a prefix.

Definition at line 101 of file QwOmnivore.h.

101 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::DeaccumulateRunningSum ( VQwSubsystem value)
inline

Definition at line 116 of file QwOmnivore.h.

116 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::Difference ( VQwSubsystem value1,
VQwSubsystem value2 
)
inline

Definition at line 96 of file QwOmnivore.h.

96 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::FillHistograms ( )
inline

Fill the histograms for this subsystem.

Definition at line 103 of file QwOmnivore.h.

103 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::FillTreeVector ( std::vector< Double_t > &  values) const
inline

Fill the tree vector.

Definition at line 108 of file QwOmnivore.h.

108 { };
template<class VQwSubsystem_t >
UInt_t QwOmnivore< VQwSubsystem_t >::GetEventcutErrorFlag ( )
inline

Return the error flag to the main routine.

Definition at line 46 of file QwOmnivore.h.

46 { return 0; };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::IncrementErrorCounters ( )
inline

Increment error counters.

Definition at line 49 of file QwOmnivore.h.

49 { };
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::LoadChannelMap ( TString  mapfile)
inline

Map file definition.

Definition at line 33 of file QwOmnivore.h.

33 { return 0; };
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::LoadEventCuts ( TString  filename)
inline

Load the event cuts file.

Definition at line 40 of file QwOmnivore.h.

40 { return 0; };
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::LoadGeometryDefinition ( TString  mapfile)
inline

Geometry definition for tracking subsystems.

Definition at line 37 of file QwOmnivore.h.

37 { return 0; };
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::LoadInputParameters ( TString  mapfile)
inline

Parameter file definition.

Definition at line 35 of file QwOmnivore.h.

35 { return 0; };
template<class VQwSubsystem_t >
VQwSubsystem& QwOmnivore< VQwSubsystem_t >::operator+= ( VQwSubsystem value)
inline

Definition at line 92 of file QwOmnivore.h.

92 { return *this; };
template<class VQwSubsystem_t >
VQwSubsystem& QwOmnivore< VQwSubsystem_t >::operator-= ( VQwSubsystem value)
inline

Definition at line 93 of file QwOmnivore.h.

93 { return *this; };
template<class VQwSubsystem_t >
VQwSubsystem& QwOmnivore< VQwSubsystem_t >::operator= ( VQwSubsystem value)
inline

Assignment/addition/subtraction operators.

Definition at line 91 of file QwOmnivore.h.

91 { return *this; };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::PrintErrorCounters ( ) const
inline

Report the number of events failed due to HW and event cut failures.

Definition at line 44 of file QwOmnivore.h.

44 { };
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::ProcessConfigurationBuffer ( const UInt_t  roc_id,
const UInt_t  bank_id,
UInt_t *  buffer,
UInt_t  num_words 
)
inline

Process the configuration events.

Om nom nom nom

Definition at line 63 of file QwOmnivore.h.

63  {
64  /// Om nom nom nom
65  // TODO (wdc) configuration events seem to have num_words = 0xffffffff
66  //UInt_t cheeseburger;
67  //for (UInt_t word = 0; word < num_words; word++)
68  // cheeseburger += buffer[word]; // (addition to prevent compiler from optimizing local away)
69  return 0; // my plate is empty
70  };
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::ProcessEvBuffer ( const UInt_t  event_type,
const UInt_t  roc_id,
const UInt_t  bank_id,
UInt_t *  buffer,
UInt_t  num_words 
)
inline

Process the event buffer.

TODO: Subsystems should be changing their ProcessEvBuffer routines to take the event_type as the first arguement. But in the meantime, default to just calling the non-event-type-aware ProcessEvBuffer routine.

Definition at line 73 of file QwOmnivore.h.

73  {
74  /// TODO: Subsystems should be changing their ProcessEvBuffer routines to take the event_type as the first
75  /// arguement. But in the meantime, default to just calling the non-event-type-aware ProcessEvBuffer routine.
76  return this->ProcessEvBuffer(roc_id, bank_id, buffer, num_words);
77  };
Int_t ProcessEvBuffer(const UInt_t event_type, const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
Process the event buffer.
Definition: QwOmnivore.h:73
template<class VQwSubsystem_t >
Int_t QwOmnivore< VQwSubsystem_t >::ProcessEvBuffer ( const UInt_t  roc_id,
const UInt_t  bank_id,
UInt_t *  buffer,
UInt_t  num_words 
)
inline

TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.

Om nom nom nom

Definition at line 79 of file QwOmnivore.h.

79  {
80  /// Om nom nom nom
81  UInt_t cheeseburger;
82  for (UInt_t word = 0; word < num_words; word++)
83  cheeseburger += buffer[word]; // (addition to prevent compiler from optimizing local away)
84  return 0; // my plate is empty
85  };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::ProcessEvent ( )
inline

Process the event.

Definition at line 88 of file QwOmnivore.h.

88 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::Ratio ( VQwSubsystem numer,
VQwSubsystem denom 
)
inline

Definition at line 97 of file QwOmnivore.h.

97 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::Scale ( Double_t  factor)
inline

Definition at line 98 of file QwOmnivore.h.

98 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::Sum ( VQwSubsystem value1,
VQwSubsystem value2 
)
inline

Sum/difference/ratio/scale operations.

Definition at line 95 of file QwOmnivore.h.

95 { };
template<class VQwSubsystem_t >
void QwOmnivore< VQwSubsystem_t >::UpdateErrorFlag ( const VQwSubsystem )
inline

Update error flag.

Definition at line 51 of file QwOmnivore.h.

51 { };

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