00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "StRpsCollection.h"
00021 #include "StRpsPlane.h"
00022
00023 static const char rcsid[] = "$Id: StRpsCollection.cxx,v 2.2 2010/02/04 18:16:09 ullrich Exp $";
00024
00025 ClassImp(StRpsCollection)
00026
00027 StRpsCollection::StRpsCollection()
00028 {
00029
00030
00031
00032 for (unsigned int i=0; i<mNumberOfRomanPots; i++) {
00033 mRomanPots[i].setRomanPotId(static_cast<unsigned char>(i));
00034 for (unsigned int j=0; j<mRomanPots[i].numberOfPlanes(); j++) {
00035 mRomanPots[i].plane(j)->setPlaneId(static_cast<unsigned char>(j));
00036 mRomanPots[i].plane(j)->setRomanPotId(static_cast<unsigned char>(i));
00037 }
00038 }
00039 mSiliconBunch = 0;
00040 }
00041
00042 StRpsCollection::~StRpsCollection() { }
00043
00044 unsigned int
00045 StRpsCollection::numberOfRomanPots() const
00046 {
00047 return mNumberOfRomanPots;
00048 }
00049
00050 const StRpsRomanPot*
00051 StRpsCollection::romanPot(unsigned int i) const
00052 {
00053 if (i < mNumberOfRomanPots)
00054 return &mRomanPots[i];
00055 else
00056 return 0;
00057 }
00058
00059 StRpsRomanPot*
00060 StRpsCollection::romanPot(unsigned int i)
00061 {
00062 if (i < mNumberOfRomanPots)
00063 return &mRomanPots[i];
00064 else
00065 return 0;
00066 }
00067
00068 StPtrVecRpsCluster
00069 StRpsCollection::clusters() const
00070 {
00071 StPtrVecRpsCluster vec;
00072 for (unsigned int i=0; i<mNumberOfRomanPots; i++) {
00073 const StRpsRomanPot *seq = &mRomanPots[i];
00074 for (unsigned int j=0; j<seq->numberOfPlanes(); j++) {
00075 const StRpsPlane *plane = seq->plane(j);
00076 for (unsigned int k=0; k<plane->numberOfClusters(); k++)
00077 vec.push_back(plane->cluster(k));
00078 }
00079 }
00080 return vec;
00081 }
00082
00083 unsigned char
00084 StRpsCollection::siliconBunch() const
00085 {
00086 return mSiliconBunch;
00087 }
00088
00089
00090 void
00091 StRpsCollection::setSiliconBunch(unsigned char val)
00092 {
00093 mSiliconBunch = val;
00094 }