X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSPID.cxx;h=c6eaaaf7e52fc2e57a8909bc092069133d104784;hb=1523328b5c07390158ff8752e3292a6b7a55b1b6;hp=d1bf115ed8ccec7d0897a564b7d60c7c8ae565d2;hpb=d76c31f4f41294d7ae5a31c2c56a682abef0b827;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSPID.cxx b/PHOS/AliPHOSPID.cxx index d1bf115ed8c..c6eaaaf7e52 100644 --- a/PHOS/AliPHOSPID.cxx +++ b/PHOS/AliPHOSPID.cxx @@ -27,13 +27,16 @@ // --- ROOT system --- +#include "TBranch.h" +#include "TClonesArray.h" +#include "TTree.h" // --- Standard library --- // --- AliRoot header files --- #include "AliConfig.h" +#include "AliLog.h" #include "AliPHOSPID.h" -#include "AliPHOSGetter.h" ClassImp(AliPHOSPID) @@ -62,6 +65,8 @@ AliPHOSPID::AliPHOSPID(AliPHOSGeometry *geom): fRecParticles(NULL) { // ctor + fEMCRecPoints = new TObjArray(100) ; + fCPVRecPoints = new TObjArray(100) ; fRecParticles = new TClonesArray("AliPHOSRecParticle",100) ; fRecParticles->SetName("RECPARTICLES"); @@ -92,6 +97,10 @@ AliPHOSPID::~AliPHOSPID() fCPVRecPoints->Delete(); delete fCPVRecPoints; } + if (fRecParticles) { + fRecParticles->Delete(); + delete fRecParticles; + } } //____________________________________________________________________________ @@ -109,8 +118,8 @@ void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments) 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"); @@ -118,7 +127,7 @@ void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments) AliError("can't get the branch with the PHOS CPV clusters !"); return; } - fCPVRecPoints = new TObjArray(100) ; cpvbranch->SetAddress(&fCPVRecPoints); + fCPVRecPoints->Delete(); cpvbranch->GetEntry(0); }