1 #include "StEvent/StFstConsts.h"
2 #include "StFstUtil/StFstCollection.h"
5 StFstCollection::StFstCollection() :
StObject()
8 for (
int i = 0; i < kFstNumWedges; ++i ) {
9 mRawHitCollection[i].setWedge( i );
10 mClusterCollection[i].setWedge( i );
13 mNumTimeBins = kFstNumTimeBins;
17 StFstCollection::~StFstCollection()
19 for (
int i = 0; i < kFstNumWedges; ++i ) {
20 mRawHitCollection[i].Clear(
"");
21 mClusterCollection[i].Clear(
"");
25 unsigned char StFstCollection::getNumTimeBins()
const
30 void StFstCollection::setNumTimeBins(
unsigned char nTimeBins)
32 mNumTimeBins = nTimeBins;
37 return ((wedge >= 0 && wedge < kFstNumWedges) ? &mRawHitCollection[wedge] : 0 );
42 return ((wedge >= 0 && wedge < kFstNumWedges) ? &mRawHitCollection[wedge] : 0 );
47 return ((wedge >= 0 && wedge < kFstNumWedges) ? &mClusterCollection[wedge] : 0 );
52 return ((wedge >= 0 && wedge < kFstNumWedges) ? &mClusterCollection[wedge] : 0 );
56 size_t StFstCollection::getNumRawHits()
const
60 for (
const StFstRawHitCollection *ptr = &mRawHitCollection[0]; ptr != &mRawHitCollection[kFstNumWedges]; ++ptr )
61 n += ptr->getNumRawHits();
67 size_t StFstCollection::getNumRawHits(
int wedge )
const
69 return ((wedge >= 0 && wedge < kFstNumWedges) ? mRawHitCollection[wedge].getNumRawHits() : 0 );
73 size_t StFstCollection::getNumClusters()
const
77 for (
const StFstClusterCollection *ptr = &mClusterCollection[0]; ptr != &mClusterCollection[kFstNumWedges]; ++ptr )
78 n += ptr->getNumClusters();
84 size_t StFstCollection::getNumClusters(
int wedge )
const
86 return ((wedge >= 0 && wedge < kFstNumWedges) ? mClusterCollection[wedge].getNumClusters() : 0 );