StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofHitCollection.h
1 /****************************************************************
2  * $Id: StBTofHitCollection.h,v 1.5 2017/10/20 17:50:33 smirnovd Exp $
3  *****************************************************************
4  * Author: Xin Dong, Dec 2008
5  * Description: Local Barrel TOF hits collection
6  *****************************************************************
7  * $Log: StBTofHitCollection.h,v $
8  * Revision 1.5 2017/10/20 17:50:33 smirnovd
9  * Squashed commit of the following:
10  *
11  * StBTof: Remove outdated ClassImp macro
12  *
13  * Prefer explicit namespace for std:: names in header files
14  *
15  * Removed unnecessary specification of default std::allocator
16  *
17  * Frank signed-off
18  *
19  * Revision 1.4 2015/07/28 23:03:05 smirnovd
20  * Removed headers included twice by mistake while merging
21  *
22  * Revision 1.3 2015/07/28 22:55:43 smirnovd
23  * Added cstddef C++ header defining size_t type
24  *
25  * Revision 1.2 2015/07/28 14:45:55 jeromel
26  * Ill-defined size_t ambiguity removed by adding cstddef
27  *
28  * Revision 1.1 2009/02/02 21:57:10 dongx
29  * first release
30  *
31  *
32  ****************************************************************/
33 #ifndef ST_BTOF_HIT_COLLECTION_H
34 #define ST_BTOF_HIT_COLLECTION_H
35 
36 #include <cstddef>
37 #include <vector>
38 
39 class StBTofHit;
40 
41 typedef std::vector<StBTofHit*> hitVector;
42 
48 public:
51  virtual ~StBTofHitCollection();
52 
54  bool push_back(StBTofHit* hit);
56  size_t size() const;
58  StBTofHit* front() const;
60  StBTofHit* back() const;
62  StBTofHit* getHit(size_t index) const;
63 
64  void clear();
65 
66 private:
68  hitVector mHitVector;
69 };
70 #endif
StBTofHit * front() const
Returns the first element of the vector.
StBTofHitCollection()
Default constructor.
StBTofHit * back() const
Returns the last element of the vector.
bool push_back(StBTofHit *hit)
Add a StBTofHit into the vector.
size_t size() const
Returns the size of the collection vector.
StBTofHit * getHit(size_t index) const
Returns a BTofRawHit at index in the vector.