StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofHitCollection.h
1 /****************************************************************
2  * $Id: StTofHitCollection.h,v 1.2 2015/07/28 22:55:44 smirnovd Exp $
3  *****************************************************************
4  * Author: Wei-Ming Zhang, April 2001
5  * Description: Local TOF hits collection
6  *****************************************************************
7  * $Log: StTofHitCollection.h,v $
8  * Revision 1.2 2015/07/28 22:55:44 smirnovd
9  * Added cstddef C++ header defining size_t type
10  *
11  * Revision 1.1 2003/08/08 00:18:26 geurts
12  * moved from StTofMaker to StTofUtil
13  *
14  *
15  ****************************************************************/
16 #ifndef ST_TOF_HIT_COLLECTION_H
17 #define ST_TOF_HIT_COLLECTION_H
18 
19 #include <cstddef>
20 #include <vector>
21 #ifndef ST_NO_NAMESPACES
22 using std::vector;
23 using std::copy;
24 #endif
25 
26 class StTofHit;
27 
28 #ifndef ST_NO_DEF_TEMPLATE_ARGS
29 typedef vector<StTofHit*> hitVector;
30 #else
31 typedef vector<StTofHit*, allocator<StTofHit*> > hitVector;
32 #endif
33 
35 public:
37  virtual ~StTofHitCollection();
38 
39  bool push_back(StTofHit* hit);
40  size_t size() const;
41  StTofHit* front() const;
42  StTofHit* back() const;
43  StTofHit* getHit(size_t index) const;
44 
45  void clear();
46 
47 private:
48  hitVector mHitVector;
49 };
50 #endif