Fixes for reading from AOD, fetch the branches for each event, reduce printout
[u/mrichter/AliRoot.git] / JETAN / AliAnalysisTaskJetCluster.cxx
index 5e67a67fa0cf47a2de89bb65049b6a270625faea..fc6112685b02cf57708ba2257a6ab2cd25833d2a 100644 (file)
@@ -668,7 +668,7 @@ void AliAnalysisTaskJetCluster::UserExec(Option_t */*option*/)
   AliAODJetEventBackground* externalBackground = 0;
   if(!externalBackground&&fBackgroundBranch.Length()){
     externalBackground =  (AliAODJetEventBackground*)(AODEvent()->FindListObject(fBackgroundBranch.Data()));
-    Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
+    if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
   }
   //
   // Execute analysis for current event