QwAnalysis
VQwSubsystemTracking.h
Go to the documentation of this file.
1 #ifndef __VQWSUBSYSTEMTRACKING__
2 #define __VQWSUBSYSTEMTRACKING__
3 
4 // ROOT headers
5 #include <TTree.h>
6 
7 // Qweak headers
8 #include "VQwSubsystem.h"
9 #include "QwGeometry.h"
10 #include "QwRootFile.h"
11 
12 // Forward declarations
14 
15 
16 /**
17  * \class VQwsubsystemTracking
18  * \ingroup QwTracking
19  *
20  * \brief Base class for tracking subsystems
21  *
22  * This base class for tracking subsystems provides functionality for
23  * constructing tree branches, loading and manipuliting geometry info,
24  * and retrieval of hit lists from the tracking subsystem.
25  */
26 class VQwSubsystemTracking: virtual public VQwSubsystem {
27  /******************************************************************
28  * Class: VQwSubsystemTracking
29  * Virtual base class for the classes containing the
30  * event-based information from each tracking subsystem.
31  * This will define the interfaces used in communicating
32  * with the CODA routines.
33  *
34  ******************************************************************/
35  private:
36 
37  /// Private default constructor (not implemented, will throw linker error on use)
39 
40  public:
41 
42  /// Constructor with name
43  VQwSubsystemTracking(TString name)
44  : VQwSubsystem(name),
46  SetEventTypeMask(0xfffe); // do not accept 0x1
47  fDetectorInfo.clear(); // clear detector info
48  };
49 
50  /// Default destructor
52  // Clear detector info objects
53  QwGeometry::iterator i;
54  for (i = fDetectorInfo.begin(); i != fDetectorInfo.end(); i++) {
55  delete *i;
56  }
57  fDetectorInfo.clear();
58  };
59 
60 
61  /// \name Tree and branch construction and maintenance
62  /// These functions are optional for tracking subsystems; some tracking
63  /// subsystems might not need to write anything to a tree.
64  // @{
65  /// \brief Construct the branch and tree vector
67  virtual void ConstructBranchAndVector(TTree *tree, TString& prefix, std::vector<Double_t>& values) { };
68  /// \brief Construct the branch and tree vector
69  virtual void ConstructBranch(TTree *tree, TString& prefix) { };
70  /// \brief Construct the branch and tree vector based on the trim file
71  virtual void ConstructBranch(TTree *tree, TString& prefix, QwParameterFile& trim_file) { };
72  /// \brief Fill the tree vector
73  virtual void FillTreeVector(std::vector<Double_t>& values) const { };
74  // @}
75 
76 
77  /// Load geometry definition for tracking subsystems
78  Int_t LoadGeometryDefinition(TString mapfile);
79  /// Load crosstalk definition for tracking subsystems
80  Int_t LoadCrosstalkDefinition(TString mapfile);
81 
82  /// Get the hit list
83  virtual void GetHitList(QwHitContainer & grandHitContainer) = 0;
84 
85 
86  /// Get the detector geometry information
87  const QwGeometry& GetDetectorInfo() const { return fDetectorInfo; };
88 
89  /// Hardware error summary
90  virtual void FillHardwareErrorSummary() {};
91 
92  protected:
93 
94  /// Geometry information of this subsystem
96 
97  /// Tree indices
100 
102 
103 }; // class VQwSubsystemTracking
104 
105 #endif // __VQWSUBSYSTEMTRACKING__
virtual void GetHitList(QwHitContainer &grandHitContainer)=0
Get the hit list.
Definition of the pure virtual base class of all subsystems.
Int_t LoadGeometryDefinition(TString mapfile)
Load geometry definition for tracking subsystems.
virtual void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
Construct the branch and tree vector.
VQwSubsystemTracking(TString name)
Constructor with name.
virtual ~VQwSubsystemTracking()
Default destructor.
QwGeometry fDetectorInfo
Geometry information of this subsystem.
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
Definition: VQwSubsystem.h:166
size_t fTreeArrayIndex
Tree indices.
virtual void ConstructBranch(TTree *tree, TString &prefix)
Construct the branch and tree vector.
The pure virtual base class of all subsystems.
Definition: VQwSubsystem.h:59
virtual void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)=0
Construct the branch and tree vector.
virtual void ConstructBranch(TTree *tree, TString &prefix, QwParameterFile &trim_file)
Construct the branch and tree vector based on the trim file.
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
Definition: QwGeometry.h:27
VQwSubsystemTracking()
Private default constructor (not implemented, will throw linker error on use)
virtual void FillTreeVector(std::vector< Double_t > &values) const
Fill the tree vector.
const QwGeometry & GetDetectorInfo() const
Get the detector geometry information.
Int_t LoadCrosstalkDefinition(TString mapfile)
Load crosstalk definition for tracking subsystems.
virtual void FillHardwareErrorSummary()
Hardware error summary.