StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEventHitIter.h
1 // Author: Victor Perev 08/04/01
2 #ifndef ROOT_StEventHitIter_HH
3 #define ROOT_StEventHitIter_HH
4 
5 
7 // //
8 // StEventHitIter //
9 // //
10 // //
12 
13 #include "Rtypes.h"
14 #include "TObject.h"
15 #include "StEnumerations.h"
16 #include "vector"
17 class StEvent;
18 class StHit;
19 
20 
21 //namespace QWERTY {
22 //..............................................................................
23 
91 class StHitIter : public TObject
92 {
93 public:
94  StHitIter();
95 virtual ~StHitIter();
96 virtual const TObject *Reset(const TObject *cont);
98 virtual const TObject *operator++();
100 virtual const TObject *Get () const;
102 virtual const TObject *GetObject (int idx) const=0;
104 virtual int GetSize () const=0;
106 virtual StDetectorId DetectorId() const {return kUnknownId;}
108  void SetDowIter(StHitIter *it) {fDowIter=it;}
109 virtual void UPath(ULong64_t &upath) const;
110 protected:
111 
112 const TObject *fCont;
113 StHitIter *fDowIter;
114 int fJIter;
115 int fNIter;
116 
117 ClassDef(StHitIter,0)//
118 
119 };
120 //..............................................................................
121 class StHitIterGroup : public StHitIter {
122 public:
123  StHitIterGroup();
124 virtual ~StHitIterGroup();
125 virtual const TObject *Reset(const TObject *cont);
126 virtual const TObject *operator++();
127 virtual const TObject *Get () const;
128 virtual const StHit *operator*() const {return (StHit*)Get();}
129 virtual const TObject *GetObject (int idx) const;
130 virtual int GetSize () const {return fGroup.size();};
131 virtual StDetectorId DetectorId() const {return fDetectorId;}
132  void UPath(ULong64_t &upa) const;
133  UInt_t UPath() const;
134 virtual void Add(StHitIter* iter);
135 protected:
136 mutable StDetectorId fDetectorId;
137 std::vector<StHitIter*> fGroup;
138 
139 ClassDef(StHitIterGroup,0)//
140 
141 };
142 
143 //..............................................................................
144 
158 public:
159  StEventHitIter(const TObject *ev=0){if (ev) Reset(ev);}
160  virtual ~StEventHitIter(){;}
161  int AddDetector(StDetectorId detId);
162 private:
163 ClassDef(StEventHitIter,0)//
164 
165 };
166 
167 //}// QWERTY
168 #endif //ROOT_StEventHelper
StEventHitIter is the top level hook, providing hits to the Stv tracking code.
Definition: StHit.h:125
void SetDowIter(StHitIter *it)
For the case of nested collections, sets the iterator over another collection.
virtual int GetSize() const
Returns the number of entries in the collection.
virtual StDetectorId DetectorId() const
Returns the STAR ID of the detector.
virtual const TObject * GetObject(int idx) const
Gets an object at a specified position in the collection.
StHitIter is an abstract base class, establishing the interface between hit collections in StEvent an...
virtual const TObject * operator++()
Increments the iterator, returning the next object in the collection.
virtual int GetSize() const =0
Returns the number of entries in the collection.
virtual const TObject * Get() const
Gets the current object in the collection.
virtual StDetectorId DetectorId() const
Returns the STAR ID of the detector.
virtual const TObject * GetObject(int idx) const =0
Gets an object at a specified position in the collection.
virtual const TObject * Get() const
Gets the current object in the collection.
virtual const TObject * operator++()
Increments the iterator, returning the next object in the collection.