StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofRawHitCollection.h
1 /****************************************************************
2  * $Id: StBTofRawHitCollection.h,v 1.5 2017/10/20 17:50:33 smirnovd Exp $
3  *****************************************************************
4  * Author: Xin Dong
5  * Description: Local TOF raw hit collection
6  *****************************************************************
7  * $Log: StBTofRawHitCollection.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:21 dongx
29  * first release
30  *
31  *
32  ****************************************************************/
33 #ifndef ST_BTOF_RAWHIT_COLLECTION_H
34 #define ST_BTOF_RAWHIT_COLLECTION_H
35 
36 #include <cstddef>
37 #include <vector>
38 
39 //#include "StBTofRawHit.h"
40 class StBTofRawHit;
41 
42 typedef std::vector<StBTofRawHit*> rawHitVector;
43 
49 public:
52  virtual ~StBTofRawHitCollection();
53 
55  bool push_back(StBTofRawHit* hit);
57  size_t size() const;
59  StBTofRawHit* front() const;
61  StBTofRawHit* back() const;
63  StBTofRawHit* getRawHit(size_t index) const;
64  void clear();
65 
66 private:
68  rawHitVector mHitVector;
69 };
70 #endif
size_t size() const
Returns the size of the collection vector.
StBTofRawHitCollection()
Default constructor.
StBTofRawHit * getRawHit(size_t index) const
Returns a BTofRawHit at index in the vector.
StBTofRawHit * front() const
Returns the first element of the vector.
StBTofRawHit * back() const
Returns the last element of the vector.
bool push_back(StBTofRawHit *hit)
Add a StBTofRawHit into the vector.