X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSPID.cxx;h=8f403718e023dc8169fe91da11499296b86546e4;hb=3c9441f123110b61cc01fdd191446e7ff63f2b39;hp=f9e1843cbcc75d46a4d8de45e9c23b20b1c033e5;hpb=9a2cdbdf2db07cb8b641793ae824535214a120e1;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSPID.cxx b/PHOS/AliPHOSPID.cxx index f9e1843cbcc..8f403718e02 100644 --- a/PHOS/AliPHOSPID.cxx +++ b/PHOS/AliPHOSPID.cxx @@ -27,14 +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" -#include "AliPHOSQualAssDataMaker.h" ClassImp(AliPHOSPID) @@ -47,7 +49,7 @@ AliPHOSPID::AliPHOSPID(): fCPVRecPoints(NULL), fTrackSegments(NULL), fRecParticles(NULL), - fQADM(0x0) + fEnergyCorrectionOn(kTRUE) { // ctor } @@ -62,14 +64,14 @@ AliPHOSPID::AliPHOSPID(AliPHOSGeometry *geom): fCPVRecPoints(NULL), fTrackSegments(NULL), fRecParticles(NULL), - fQADM(0x0) + fEnergyCorrectionOn(kTRUE) { // ctor + fEMCRecPoints = new TObjArray(100) ; + fCPVRecPoints = new TObjArray(100) ; fRecParticles = new TClonesArray("AliPHOSRecParticle",100) ; fRecParticles->SetName("RECPARTICLES"); - fQADM = new AliPHOSQualAssDataMaker() ; //!Quality Assurance Data Maker - GetQualAssDataMaker()->Init(AliQualAss::kRECPARTICLES) ; } //____________________________________________________________________________ @@ -81,7 +83,7 @@ AliPHOSPID::AliPHOSPID(const AliPHOSPID & pid) : fCPVRecPoints(pid.fCPVRecPoints), fTrackSegments(pid.fTrackSegments), fRecParticles(pid.fRecParticles), - fQADM(pid.fQADM) + fEnergyCorrectionOn(pid.fEnergyCorrectionOn) { // Copy constructor } @@ -98,7 +100,10 @@ AliPHOSPID::~AliPHOSPID() fCPVRecPoints->Delete(); delete fCPVRecPoints; } - delete fQADM ; + if (fRecParticles) { + fRecParticles->Delete(); + delete fRecParticles; + } } //____________________________________________________________________________ @@ -116,8 +121,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"); @@ -125,7 +130,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); }