]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Move the code that adds the jet container to the end, to avoid nasty errors when...
authorsaiola <salvatore.aiola@cern.ch>
Sat, 18 Oct 2014 02:31:20 +0000 (22:31 -0400)
committersaiola <salvatore.aiola@cern.ch>
Sat, 18 Oct 2014 02:31:20 +0000 (22:31 -0400)
PWGJE/EMCALJetTasks/AliEmcalJetTask.cxx

index 587dbbb1b8716a902d34ed47fb364c81447c30ed..31655a5c949f34a30fc5af6a3f7e17d78bf22fe4 100644 (file)
@@ -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;
 }