X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=PHOS%2FAliPHOSTrackSegmentMaker.cxx;h=3482f19e829e4d198ccf32f7e448c1cebcfaf8a5;hb=02ef9013f65d163d5436db4d9034df8acc40b72e;hp=fc3c480bfc3da7e2bff1df976a8e9c84a5eb5bad;hpb=7fb9892dcfb9bbfcf8f8b33384fd30c94c495ae9;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSTrackSegmentMaker.cxx b/PHOS/AliPHOSTrackSegmentMaker.cxx index fc3c480bfc3..3482f19e829 100644 --- a/PHOS/AliPHOSTrackSegmentMaker.cxx +++ b/PHOS/AliPHOSTrackSegmentMaker.cxx @@ -63,6 +63,8 @@ AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : fCPVRecPoints(0) { // ctor + fEMCRecPoints = new TObjArray(100) ; + fCPVRecPoints = new TObjArray(100) ; } //____________________________________________________________________________ @@ -74,6 +76,8 @@ AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(AliPHOSGeometry *geom): fCPVRecPoints(0) { // ctor + fEMCRecPoints = new TObjArray(100) ; + fCPVRecPoints = new TObjArray(100) ; } //____________________________________________________________________________ @@ -104,18 +108,16 @@ AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker() //____________________________________________________________________________ void AliPHOSTrackSegmentMaker::SetInput(TTree *clustersTree) { - // Read the clusters tree and creates the - // arrays with the EMC and CPV - // clusters. - // and set the corresponding branch addresses + // Read the clusters tree and set addresses to the + // arrays with the EMC and CPV clusters TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP"); if (!emcbranch) { AliError("can't get the branch with the PHOS EMC clusters !"); return; } - fEMCRecPoints = new TObjArray(100) ; emcbranch->SetAddress(&fEMCRecPoints); + fEMCRecPoints->Delete(); emcbranch->GetEntry(0); TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP"); @@ -123,7 +125,7 @@ void AliPHOSTrackSegmentMaker::SetInput(TTree *clustersTree) AliError("can't get the branch with the PHOS CPV clusters !"); return; } - fCPVRecPoints = new TObjArray(100) ; cpvbranch->SetAddress(&fCPVRecPoints); + fCPVRecPoints->Delete(); cpvbranch->GetEntry(0); }