32 #include "StEmcCollection.h"
33 #include "StEmcDetector.h"
37 static const
char rcsid[] = "$Id:
StEmcCollection.cxx,v 2.6 2004/03/26 21:54:15 ullrich Exp $";
40 for(
int i=0; i<8; i++) mDetector[i] = 0;
45 StEmcCollection::~StEmcCollection(){
46 for(
int i=0; i<8; i++)
49 if(mBemcRawData)
delete mBemcRawData;
50 if(mEemcRawData)
delete mEemcRawData;
54 StEmcCollection::detector(StDetectorId
id)
const
56 if(
id >= kBarrelEmcTowerId &&
id <= kEndcapSmdVStripId)
57 return mDetector[
id-kBarrelEmcTowerId];
63 StEmcCollection::detector(StDetectorId
id)
65 if(
id >= kBarrelEmcTowerId &&
id <= kEndcapSmdVStripId)
66 return mDetector[
id-kBarrelEmcTowerId];
75 unsigned int id = val->detectorId();
76 if (
id >= kBarrelEmcTowerId &&
id <= kEndcapSmdVStripId) {
77 if (mDetector[
id-kBarrelEmcTowerId])
delete mDetector[
id-kBarrelEmcTowerId];
78 mDetector[
id-kBarrelEmcTowerId] = val;
83 const StSPtrVecEmcPoint&
84 StEmcCollection::barrelPoints()
const {
return mBarrel; }
87 StEmcCollection::barrelPoints() {
return mBarrel; }
89 const StSPtrVecEmcPoint&
90 StEmcCollection::endcapPoints()
const {
return mEndcap; }
93 StEmcCollection::endcapPoints() {
return mEndcap; }
96 StEmcCollection::addBarrelPoint(
const StEmcPoint* p){mBarrel.push_back(p);}
99 StEmcCollection::addEndcapPoint(
const StEmcPoint* p){mEndcap.push_back(p);}
102 StEmcCollection::bemcRawData() {
return mBemcRawData;}
105 StEmcCollection::eemcRawData() {
return mEemcRawData;}
107 void StEmcCollection::setBemcRawData(
StEmcRawData*
data) { mBemcRawData = data;}
108 void StEmcCollection::setEemcRawData(
StEmcRawData*
data) { mEemcRawData = data;}