protections against failures in deleting event content
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Aug 2012 20:36:54 +0000 (20:36 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Aug 2012 20:36:54 +0000 (20:36 +0000)
PWG/EMCAL/AliEmcalEsdTpcTrackTask.cxx
PWG/EMCAL/AliEmcalMCTrackSelector.cxx
PWG/EMCAL/AliEmcalParticleMaker.cxx
PWG/EMCAL/AliEmcalPicoTrackMaker.cxx
PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx
PWGJE/EMCALJetTasks/AliHadCorrTask.cxx
PWGJE/EMCALJetTasks/AliJetModelBaseTask.cxx

index 7e09f2c..f79b287 100644 (file)
@@ -88,6 +88,7 @@ void AliEmcalEsdTpcTrackTask::UserExec(Option_t *)
   }
 
   // add tracks to event if not yet there
+  fTracks->Delete();
   if (!(InputEvent()->FindListObject(fTracksName)))
     InputEvent()->AddObject(fTracks);
 
index 2616568..8a83cc2 100644 (file)
@@ -72,6 +72,7 @@ void AliEmcalMCTrackSelector::UserExec(Option_t *)
   }
 
   // add tracks to event if not yet there
+  fTracksOut->Delete();
   if (!(event->FindListObject(fTracksOutName))) {
     event->AddObject(fTracksOut);
   }
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);
   }
index c00fdd1..121f87c 100644 (file)
@@ -104,6 +104,7 @@ void AliEmcalPicoTrackMaker::UserExec(Option_t *)
   }
 
   // add tracks to event if not yet there
+  fTracksOut->Delete();
   if (!(InputEvent()->FindListObject(fTracksOutName))) {
     InputEvent()->AddObject(fTracksOut);
   }
index e6a362f..212af95 100644 (file)
@@ -397,6 +397,7 @@ Bool_t AliEmcalJetTask::DoInit()
   }
 
   // add jets to event if not yet there
+  fJets->Delete();
   if (!(fEvent->FindListObject(fJetsName)))
     fEvent->AddObject(fJets);
   else {
index 5ace53e..120dce8 100644 (file)
@@ -509,6 +509,7 @@ Bool_t AliHadCorrTask::Run()
   // Run the hadronic correction
 
   // post output in event if not yet present
+  fOutClusters->Delete();
   if (!(InputEvent()->FindListObject(fOutCaloName)))
     InputEvent()->AddObject(fOutClusters);
   
index 97e4f51..bc964af 100644 (file)
@@ -289,6 +289,7 @@ void AliJetModelBaseTask::ExecOnce()
     }
 
     if (fCopyArray) {
+      fOutTracks->Delete();
       if (!(InputEvent()->FindListObject(fOutTracksName)))
        InputEvent()->AddObject(fOutTracks);
     }
@@ -321,6 +322,7 @@ void AliJetModelBaseTask::ExecOnce()
     }
 
     if (fCopyArray) {
+      fOutClusters->Delete();
       if (!(InputEvent()->FindListObject(fOutCaloName)))
        InputEvent()->AddObject(fOutClusters);
     }