StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtHitCollection.h
1 /***************************************************************************
2  *
3  * $Id: StFgtHitCollection.h,v 2.1 2012/04/16 20:20:49 ullrich Exp $
4  * Author: S. Gliske, Oct 2011
5  *
6  ***************************************************************************
7  *
8  * Description: A collection of StFgtHit classes for StEvent.
9  * Basically a wrapper for an StSPtrVecFgtHit. Note, one instance of
10  * this class corresponds to one disc.
11  *
12  ***************************************************************************
13  *
14  * $Log: StFgtHitCollection.h,v $
15  * Revision 2.1 2012/04/16 20:20:49 ullrich
16  * Initial Revision
17  *
18  *
19  **************************************************************************/
20 
21 #ifndef _ST_FGT_HIT_COLLECTION_H_
22 #define _ST_FGT_HIT_COLLECTION_H_
23 
24 #include "StObject.h"
25 #include "StContainers.h"
26 
27 class StFgtHit;
28 
29 class StFgtHitCollection : public StObject {
30 public:
31  // constructors
32  StFgtHitCollection( short discId = -1 );
33  // StFgtHitCollection( const StFgtHitCollection& other ); ---> use default
34  // StFgtHitCollection& operator=( const StFgtHitCollection& other ); ---> use default
35 
36  // deconstructor
38 
39  // accessors/modifiers for the underlying vector
40  StSPtrVecFgtHit& getHitVec();
41  const StSPtrVecFgtHit& getHitVec() const;
42 
43  size_t getNumHits() const;
44  short getDisc() const;
45  void setDisc( short discId );
46 
47  // Clear
48  void Clear( Option_t *opt = "" );
49 
50 protected:
51  // the data member
52  Short_t mDisc;
53  StSPtrVecFgtHit mHitVec;
54 
55 private:
56  ClassDef(StFgtHitCollection,1);
57 };
58 
59 
60 // inline functions
61 
62 inline StFgtHitCollection::StFgtHitCollection( short discId ) : StObject(), mDisc( discId ) {
63  // nothing else to do
64 };
65 
66 inline StSPtrVecFgtHit& StFgtHitCollection::getHitVec() {
67  return mHitVec;
68 };
69 
70 inline void StFgtHitCollection::setDisc( short discId ) {
71  mDisc = discId;
72 };
73 
74 inline short StFgtHitCollection::getDisc() const {
75  return mDisc;
76 };
77 
78 inline const StSPtrVecFgtHit& StFgtHitCollection::getHitVec() const{
79  return mHitVec;
80 };
81 
82 inline size_t StFgtHitCollection::getNumHits() const {
83  return mHitVec.size();
84 };
85 
86 #endif
87