protections against failures in deleting event content
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalParticleMaker.cxx
index 6f3b960..f970146 100644 (file)
@@ -62,9 +62,11 @@ Bool_t AliEmcalParticleMaker::Run()
   // Create th emcal particles
 
   // add tracks to event if not yet there
+  fTracksOut->Delete();
   if (!(InputEvent()->FindListObject(fTracksOutName))) {
     InputEvent()->AddObject(fTracksOut);
   }
+  fCaloClustersOut->Delete();
   if (!(InputEvent()->FindListObject(fCaloOutName))) {
     InputEvent()->AddObject(fCaloClustersOut);
   }