50 #include "St_DataSetIter.h"
51 #include "TObjectSet.h"
52 #include "StSequence.hh"
54 #include "StMessMgr.h"
56 #include "StSvtClassLibrary/StSvtHybridCollection.hh"
57 #include "StSvtClassLibrary/StSvtHybridData.hh"
58 #include "StSvtClassLibrary/StSvtData.hh"
59 #include "StSvtHybridCluster.hh"
60 #include "StSvtClusterMaker.h"
61 #include "StDbUtilities/St_svtRDOstrippedC.h"
66 StSvtClusterMaker::StSvtClusterMaker(
const char *name) :
StMaker(name)
70 mHybridCluster = NULL;
73 mClusterFinder = NULL;
76 StSvtClusterMaker::~StSvtClusterMaker()
79 delete mClusterFinder;
83 Int_t StSvtClusterMaker::Init(){
86 if (Debug()) gMessMgr->Debug() <<
"In StSvtClusterMaker::Init() ..." <<
89 if( GetSvtRawData()) gMessMgr->Warning() <<
"No SVT Raw data..." << endm;
94 return StMaker::Init();
99 Int_t StSvtClusterMaker::GetSvtRawData(){
101 St_DataSet *dataSet = GetDataSet(
"StSvtData");
106 if( !mSvtEvent)
return kStWarn;
113 Int_t StSvtClusterMaker::SetSvtCluster()
117 AddConst(mClusterSet);
118 SetOutput(mClusterSet);
132 if (Debug()) gMessMgr->Debug() <<
"In StSvtClusterMaker::Make() ..." <<
135 if( GetSvtRawData()) {
136 gMessMgr->Warning() <<
" Problem with SVt raw in ClusterMaker" << endm;
146 Int_t StSvtClusterMaker::SetHybridClusters()
150 for(
int barrel = 1;barrel <= mSvtEvent->getNumberOfBarrels();barrel++) {
152 for (
int ladder = 1;ladder <= mSvtEvent->getNumberOfLadders(barrel);ladder++) {
154 for (
int wafer = 1;wafer <= mSvtEvent->getNumberOfWafers(barrel);wafer++) {
157 if (St_svtRDOstrippedC::instance()->svtRDOstrippedStatus(barrel,ladder,wafer))
continue;
159 for (
int hybrid = 1;hybrid <=mSvtEvent->getNumberOfHybrids();hybrid++){
162 index = mSvtEvent->getHybridIndex(barrel,ladder,wafer,hybrid);
163 if(index < 0)
continue;
167 if( !mHybridData)
continue;
169 mClusterFinder->setHybridPointer(mHybridData);
170 mClusterFinder->SetHybIndex(index);
171 mClusterFinder->ClusterFinder();
176 delete mHybridCluster;
177 mClusterColl->at(index)=0;
182 mHybridCluster->setCluster(mClusterFinder);
183 mClusterColl->put_at(mHybridCluster,index);
184 mClusterFinder->ResetContainers();
199 if (Debug()) gMessMgr->Debug() <<
"In StSvtClusterMaker::Finish() ..." <<
206 Int_t StSvtClusterMaker::Reset(){
208 if (Debug()) gMessMgr->Debug() <<
"In StSvtClusterMaker::reset() ..." <<
213 delete mClusterFinder;
215 mHybridCluster = NULL;
217 mClusterFinder = NULL;
222 void StSvtClusterMaker::Clear(
const char *)
225 int n = mClusterColl->size();
226 mClusterColl->clear();
227 mClusterColl->resize(n);
virtual void Clear(Option_t *option="")
User defined functions.
virtual void SetObject(TObject *obj)
The depricated method (left here for the sake of the backward compatibility)
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
virtual const char * GetName() const
special overload