StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofHitCollection.cxx
1 /****************************************************************
2  * $Id: StBTofHitCollection.cxx,v 1.1 2009/02/02 21:57:09 dongx Exp $
3  *
4  * Author: Xin Dong, Dec 2008
5  *
6  *****************************************************************
7  * Description:
8  * Local Barrel TOF hits collection
9  *
10  *****************************************************************
11  *
12  * $Log: StBTofHitCollection.cxx,v $
13  * Revision 1.1 2009/02/02 21:57:09 dongx
14  * first release
15  *
16  *
17  ****************************************************************/
18 #include "StBTofHitCollection.h"
19 #include "StBTofHit.h"
20 
22 StBTofHitCollection::~StBTofHitCollection(){/* nope */}
23 
24 void StBTofHitCollection::clear() {mHitVector.clear(); }
25 
27  mHitVector.push_back(hit);
28  return true;
29 }
30 
32  return mHitVector.front();
33 }
34 
35 StBTofHit* StBTofHitCollection::getHit(size_t index) const {
36  return mHitVector[index];
37 }
38 
40  return mHitVector.back();
41 }
42 
43 size_t StBTofHitCollection::size() const {
44  return mHitVector.size();
45 }
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.