StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGmtCollection.cxx
1 
12 // Load header of the GMT collection
13 #include "StGmtCollection.h"
14 
15 //________________
17  // Set the module field for some of the collections
18  for( int i=0; i<kGmtNumModules; ++i ) {
19  mStripCollection[i].setModule( i );
20  mHitCollection[i].setModule( i );
21  }
22 }
23 
24 //________________
26  /* empty */
27 }
28 
29 //__________
30 void StGmtCollection::Clear( Option_t *opt ) {
31  for( int i=0; i<kGmtNumModules; ++i ){
32  mStripCollection[i].Clear( opt );
33  mHitCollection[i].Clear( opt );
34  }
35  mPointCollection.Clear( opt );
36 }
37 
38 //________________
40  size_t n = 0;
41  for( const StGmtStripCollection* ptr = &mStripCollection[0];
42  ptr != &mStripCollection[kGmtNumModules]; ++ptr ) {
43  n += ptr->getNumStrips();
44  }
45  return n;
46 }
47 
48 //________________
50  size_t n = 0;
51  for( const StGmtHitCollection* ptr = &mHitCollection[0];
52  ptr != &mHitCollection[kGmtNumModules]; ++ptr ) {
53  n += ptr->getNumHits();
54  }
55  return n;
56 }
void Clear(Option_t *opts="")
Clear method.
StGmtStripCollection mStripCollection[kGmtNumModules]
GMT strip collections for all modules.
size_t getNumStrips() const
Number total number of strips.
void setModule(short moduleId)
Set module number.
Holds collection of GMT hits in the module.
~StGmtCollection()
Destructor.
size_t getNumHits() const
Number total number of hits.
StGmtCollection()
Constructor.
void Clear(Option_t *opt="")
Clear.
void Clear(Option_t *opt="")
Clear.
StGmtHitCollection mHitCollection[kGmtNumModules]
GMT hit collections for all modules.
StGmtPointCollection mPointCollection
GMT point collection.