QwAnalysis
QwSubsystemArrayTracking Class Reference

#include <QwSubsystemArrayTracking.h>

+ Inheritance diagram for QwSubsystemArrayTracking:
+ Collaboration diagram for QwSubsystemArrayTracking:

Public Member Functions

 QwSubsystemArrayTracking (QwOptions &options)
 Constructor with options. More...
 
virtual ~QwSubsystemArrayTracking ()
 Default destructor. More...
 
VQwSubsystemTrackingGetSubsystemByName (const TString &name)
 Get the subsystem with the specified name. More...
 
const QwGeometry GetGeometry ()
 Get the detector info for all detectors. More...
 
void GetHitList (QwHitContainer &hitlist)
 
void GetHitList (QwHitContainer *hitlist)
 
void FillHardwareErrorSummary ()
 
- Public Member Functions inherited from QwSubsystemArray
 QwSubsystemArray (QwOptions &options, CanContainFn myCanContain)
 Constructor with options. More...
 
 QwSubsystemArray (const QwSubsystemArray &source)
 Copy constructor by reference. More...
 
virtual ~QwSubsystemArray ()
 Virtual destructor. More...
 
void SetCodaRunNumber (UInt_t runnum)
 Set the internal record of the CODA run number. More...
 
void SetCodaSegmentNumber (UInt_t segnum)
 Set the internal record of the CODA segment number. More...
 
void SetCodaEventNumber (UInt_t evtnum)
 Set the internal record of the CODA event number. More...
 
void SetCodaEventType (UInt_t evttype)
 Set the internal record of the CODA event type. More...
 
UInt_t GetCodaRunNumber () const
 Get the internal record of the CODA run number. More...
 
UInt_t GetCodaSegmentNumber () const
 Get the internal record of the CODA segment number. More...
 
UInt_t GetCodaEventNumber () const
 Get the internal record of the CODA event number. More...
 
UInt_t GetCodaEventType () const
 Get the internal record of the CODA event type. More...
 
void SetCleanParameters (Double_t cleanparameter[3])
 Set the internal record of the CODA event number. More...
 
void SetEventTypeMask (const UInt_t mask)
 Set event type mask. More...
 
UInt_t GetEventTypeMask () const
 Get event type mask. More...
 
UInt_t UpdateEventTypeMask ()
 Update the event type mask from the subsystems. More...
 
void SetDataLoaded (const Bool_t flag)
 Set data loaded flag. More...
 
Bool_t HasDataLoaded () const
 Get data loaded flag. More...
 
void ProcessOptionsToplevel (QwOptions &options)
 Process configuration options for the subsystem array itself. More...
 
void ProcessOptionsSubsystems (QwOptions &options)
 Process configuration options for all subsystems in the array. More...
 
void ProcessOptions (QwOptions &options)
 Process configuration options (default behavior) More...
 
void push_back (VQwSubsystem *subsys)
 Add the subsystem to this array. More...
 
virtual std::vector
< VQwSubsystem * > 
GetSubsystemByType (const std::string &type)
 Get the list of subsystems of the specified type. More...
 
void ClearEventData ()
 
Int_t ProcessConfigurationBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words)
 Process the event buffer for 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 for events. More...
 
void RandomizeEventData (int helicity=0, double time=0.0)
 Randomize the data in this event. More...
 
void EncodeEventData (std::vector< UInt_t > &buffer)
 Encode the data in this event. More...
 
void ProcessEvent ()
 Process the decoded data in this event. More...
 
void AtEndOfEventLoop ()
 Perform actions at the end of the event loop. More...
 
Bool_t RequestExternalValue (const TString &name, VQwHardwareChannel *value) const
 Retrieve the variable name from other subsystem arrays. More...
 
const VQwHardwareChannelReturnInternalValue (const TString &name) const
 Retrieve the variable name from subsystems in this subsystem array. More...
 
Bool_t ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const
 Retrieve the variable name from subsystems in this subsystem array. More...
 
Bool_t PublishInternalValue (const TString name, const TString desc, const VQwSubsystem *subsys, const VQwHardwareChannel *element)
 Publish the value name with description from a subsystem in this array. More...
 
void ListPublishedValues () const
 List the published values and description in this subsystem array. More...
 
void PrintParamFileList () const
 Print list of parameter files. More...
 
TList * GetParamFileNameList (TString name) const
 Get list of parameter files. More...
 
void PrintInfo () const
 Print some information about the subsystem. More...
 
void push_back (boost::shared_ptr< VQwSubsystem > subsys)
 
void ConstructHistograms ()
 Construct the histograms for this subsystem. More...
 
void ConstructHistograms (TDirectory *folder)
 Construct the histograms for this subsystem in a folder. More...
 
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 ShareHistograms (const QwSubsystemArray &source)
 Share the histograms with another subsystem. More...
 
void ConstructBranchAndVector (TTree *tree, std::vector< Double_t > &values)
 Construct the tree and vector for this subsystem. More...
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values)
 Construct a branch and vector for this subsystem with a prefix. More...
 
void ConstructBranch (TTree *tree, TString &prefix)
 Construct a branch for this subsystem with a prefix. More...
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file)
 Construct a branch for this subsystem with a prefix after tree leave trimming. More...
 
void FillTreeVector (std::vector< Double_t > &values) const
 Fill the vector for this subsystem. More...
 
void ConstructTree ()
 Construct the tree for this subsystem. More...
 
void ConstructTree (TDirectory *folder)
 Construct the tree for this subsystem in a folder. More...
 
void ConstructTree (TDirectory *folder, TString &prefix)
 Construct the tree for this subsystem in a folder with a prefix. More...
 
void FillTree ()
 Fill the tree for this subsystem. More...
 
void DeleteTree ()
 Delete the tree for this subsystem. More...
 

Static Protected Member Functions

static Bool_t CanContain (VQwSubsystem *subsys)
 Test whether this subsystem array can contain a particular subsystem. More...
 
- Static Protected Member Functions inherited from QwSubsystemArray
static Bool_t CanContain (VQwSubsystem *subsys)
 Test whether this subsystem array can contain a particular subsystem. More...
 

Private Member Functions

 QwSubsystemArrayTracking ()
 Private default constructor. More...
 

Additional Inherited Members

- Public Types inherited from QwSubsystemArray
typedef Bool_t(* CanContainFn )(VQwSubsystem *)
 
- Static Public Member Functions inherited from QwSubsystemArray
static void DefineOptions (QwOptions &options)
 Define configuration options for global array. More...
 
- Data Fields inherited from std::vector< T >
elements
 STL member. More...
 
- Protected Member Functions inherited from QwSubsystemArray
void LoadSubsystemsFromParameterFile (QwParameterFile &detectors)
 
- Protected Attributes inherited from QwSubsystemArray
size_t fTreeArrayIndex
 
UInt_t fCodaRunNumber
 Index of this data element in root tree. More...
 
UInt_t fCodaSegmentNumber
 CODA segment number as provided by QwEventBuffer. More...
 
UInt_t fCodaEventNumber
 CODA event number as provided by QwEventBuffer. More...
 
UInt_t fCodaEventType
 CODA event type as provided by QwEventBuffer. More...
 
Double_t fCleanParameter [3]
 
UInt_t fEventTypeMask
 Mask of event types. More...
 
Bool_t fHasDataLoaded
 Has this array gotten data to be processed? More...
 
CanContainFn fnCanContain
 Function to determine which subsystems we can accept. More...
 

Detailed Description

Definition at line 19 of file QwSubsystemArrayTracking.h.

Constructor & Destructor Documentation

QwSubsystemArrayTracking::QwSubsystemArrayTracking ( )
private

Private default constructor.

QwSubsystemArrayTracking::QwSubsystemArrayTracking ( QwOptions options)
inline

Constructor with options.

Definition at line 29 of file QwSubsystemArrayTracking.h.

29 : QwSubsystemArray(options, CanContain) { };
QwSubsystemArray()
Private default constructor.
static Bool_t CanContain(VQwSubsystem *subsys)
Test whether this subsystem array can contain a particular subsystem.
virtual QwSubsystemArrayTracking::~QwSubsystemArrayTracking ( )
inlinevirtual

Default destructor.

Definition at line 31 of file QwSubsystemArrayTracking.h.

31 { };

Member Function Documentation

static Bool_t QwSubsystemArrayTracking::CanContain ( VQwSubsystem subsys)
inlinestaticprotected

Test whether this subsystem array can contain a particular subsystem.

Definition at line 49 of file QwSubsystemArrayTracking.h.

49  {
50  return (dynamic_cast<VQwSubsystemTracking*>(subsys) != 0);
51  };
void QwSubsystemArrayTracking::FillHardwareErrorSummary ( )

Definition at line 68 of file QwSubsystemArrayTracking.cc.

References VQwSubsystemTracking::FillHardwareErrorSummary().

Referenced by main().

69 {
70 
71  // Just try to use a default copy constructor... first
72  //
73  // for (const_iterator subsys = dummy_source->begin(); subsys != dummy_source->end(); ++subsys) {
74  for (iterator subsys = begin(); subsys != end(); ++subsys) {
75  VQwSubsystemTracking* subsys_tracking = dynamic_cast<VQwSubsystemTracking*>(subsys->get());
76  subsys_tracking->FillHardwareErrorSummary();
77  }
78  return;
79 }
virtual void FillHardwareErrorSummary()
Hardware error summary.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const QwGeometry QwSubsystemArrayTracking::GetGeometry ( )

Get the detector info for all detectors.

Get the detector info for all subsystems

Returns
Detector info container

Definition at line 28 of file QwSubsystemArrayTracking.cc.

References VQwSubsystemTracking::GetDetectorInfo(), and QwGeometry::push_back().

Referenced by main().

29 {
30  QwGeometry geometry;
31  if (!empty()) {
32  for (iterator subsys = begin(); subsys != end(); ++subsys) {
33  VQwSubsystemTracking* subsys_tracking =
34  dynamic_cast<VQwSubsystemTracking*>(subsys->get());
35  if (subsys_tracking != 0) {
36  geometry.push_back(subsys_tracking->GetDetectorInfo());
37  }
38  }
39  }
40  return geometry;
41 }
void push_back(QwDetectorInfo &detector)
Add single detector object.
Definition: QwGeometry.h:55
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
Definition: QwGeometry.h:27
const QwGeometry & GetDetectorInfo() const
Get the detector geometry information.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwSubsystemArrayTracking::GetHitList ( QwHitContainer hitlist)

Get the hit list from the subsystems in this array

Parameters
hitlistHit container to store the hits in

Definition at line 48 of file QwSubsystemArrayTracking.cc.

References VQwSubsystemTracking::GetHitList().

Referenced by main().

49 {
50  if (!empty()) {
51  hitlist.clear();
52  for (iterator subsys = begin(); subsys != end(); ++subsys) {
53  VQwSubsystemTracking* subsys_tracking =
54  dynamic_cast<VQwSubsystemTracking*>(subsys->get());
55  if (subsys_tracking != 0) {
56  subsys_tracking->GetHitList(hitlist);
57  } else {
58  std::cerr << "QwSubsystemArrayTracking::GetHitList: Subsystem \""
59  << ((subsys)->get())->GetSubsystemName()
60  << "\" isn't a tracking subsystem." << std::endl;
61  }
62  }
63  }
64 }
virtual void GetHitList(QwHitContainer &grandHitContainer)=0
Get the hit list.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwSubsystemArrayTracking::GetHitList ( QwHitContainer hitlist)
inline

Definition at line 41 of file QwSubsystemArrayTracking.h.

References GetHitList().

Referenced by GetHitList().

41 { GetHitList(*hitlist); };
void GetHitList(QwHitContainer &hitlist)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VQwSubsystemTracking * QwSubsystemArrayTracking::GetSubsystemByName ( const TString &  name)
virtual

Get the subsystem with the specified name.

Get the subsystem with the specified name

Parameters
nameName of the subsystem
Returns
Subsystem with that name

Reimplemented from QwSubsystemArray.

Definition at line 18 of file QwSubsystemArrayTracking.cc.

References QwSubsystemArray::GetSubsystemByName().

19 {
21 }
virtual VQwSubsystem * GetSubsystemByName(const TString &name)
Get the subsystem with the specified name.

+ Here is the call graph for this function:


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