From: saiola Date: Sat, 18 Oct 2014 02:31:20 +0000 (-0400) Subject: Move the code that adds the jet container to the end, to avoid nasty errors when... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=cbbb66b0752e074fc86e3ed9ac1fc5b521159b8a;p=u%2Fmrichter%2FAliRoot.git Move the code that adds the jet container to the end, to avoid nasty errors when something goes wrong --- diff --git a/PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx b/PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx index 587dbbb1b87..31655a5c949 100644 --- a/PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx +++ b/PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx @@ -697,14 +697,6 @@ Bool_t AliEmcalJetTask::DoInit() return 0; } - // add jets to event if not yet there - if (!(fEvent->FindListObject(fJetsName))) - fEvent->AddObject(fJets); - else { - AliError(Form("%s: Object with name %s already in event! Returning", GetName(), fJetsName.Data())); - return 0; - } - if (!(fEvent->FindListObject(fJetsSubName)) && fJetsSub) fEvent->AddObject(fJetsSub); @@ -752,6 +744,14 @@ Bool_t AliEmcalJetTask::DoInit() return 0; } } + + // add jets to event if not yet there + if (!(fEvent->FindListObject(fJetsName))) + fEvent->AddObject(fJets); + else { + AliError(Form("%s: Object with name %s already in event! Returning", GetName(), fJetsName.Data())); + return 0; + } return 1; }