]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSPID.cxx
Add -Wconversion to Mac warnings
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPID.cxx
index 95aa0728807b34174af24ace286050f8ee3fbf01..c6eaaaf7e52fc2e57a8909bc092069133d104784 100644 (file)
@@ -65,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");
 
@@ -95,6 +97,10 @@ AliPHOSPID::~AliPHOSPID()
     fCPVRecPoints->Delete();
     delete fCPVRecPoints;
   }
+  if (fRecParticles) {
+    fRecParticles->Delete();
+    delete fRecParticles;
+  }
 }
 
 //____________________________________________________________________________
@@ -112,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");
@@ -121,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);
 }