StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEtrHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StEtrHitCollection.cxx,v 2.2 2012/03/22 00:08:57 perev Exp $
4  *
5  * Author: Ming Shao, Jan 5, 2012
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StEtrHitCollection.cxx,v $
13  * Revision 2.2 2012/03/22 00:08:57 perev
14  * assert() instead of memory leak added
15  *
16  * Revision 2.1 2012/01/24 03:06:12 perev
17  * Add Etr
18  *
19  *
20  * Revision 1.0 2012/01/05 Ming
21  * Initial Revision
22  *
23  **************************************************************************/
24 #include "StEtrHitCollection.h"
25 #include "StEtrHit.h"
26 
27 static const char rcsid[] = "$Id: StEtrHitCollection.cxx,v 2.2 2012/03/22 00:08:57 perev Exp $";
28 
29 ClassImp(StEtrHitCollection)
30 
31 StEtrHitCollection::StEtrHitCollection() { /* noop */ }
32 
33 StEtrHitCollection::~StEtrHitCollection() { /* noop */ }
34 
35 bool
36 StEtrHitCollection::addHit(StEtrHit* hit)
37 {
38  assert(hit->layer() < mNumberOfLayers);
39  assert(hit->sector() < mNumberOfSectors);
40  mHits.push_back(hit);
41  return kTRUE;
42 }
43 
44 unsigned int
45 StEtrHitCollection::numberOfLayers() const { return mNumberOfLayers; }
46 
47 unsigned int
48 StEtrHitCollection::numberOfSectors() const { return mNumberOfSectors; }
49 
50 unsigned int
51 StEtrHitCollection::numberOfHits() const
52 {
53  return mHits.size();
54 }
55 
56 const StSPtrVecEtrHit&
57 StEtrHitCollection::hits() const { return mHits; }
58 
59 StSPtrVecEtrHit&
60 StEtrHitCollection::hits() { return mHits; }