From 8a56597f7d14fd8f244002eae9c1f47f87db37d1 Mon Sep 17 00:00:00 2001 From: kleinb Date: Wed, 12 Jan 2011 10:23:10 +0000 Subject: [PATCH] Fixes for reading from AOD, fetch the branches for each event, reduce printout --- JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx | 6 +++--- JETAN/AliAnalysisTaskJetCluster.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx b/JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx index 63c53bb3160..5318f5c3aa4 100644 --- a/JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx +++ b/JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx @@ -298,7 +298,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/) if(fDebug&&evBkg)Printf("%s:%d Backgroundbranch %s found",(char*)__FILE__,__LINE__,fBackgroundBranch.Data()); } - if(!evBkg){ + if(!evBkg&&(fSubtraction==kArea||fSubtraction==kRhoRecalc)){ if(fDebug){ Printf("%s:%d Backgroundbranch %s not found",(char*)__FILE__,__LINE__,fBackgroundBranch.Data()); PrintAODContents(); @@ -307,7 +307,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/) return; } - if(!bkgClusters){ + if(!bkgClusters&&(fSubtraction==kRhoRecalc)){ if(fDebug){ Printf("%s:%d Background cluster branch %s not found",(char*)__FILE__,__LINE__,bkgClusterName.Data()); PrintAODContents(); @@ -316,7 +316,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserExec(Option_t */*option*/) return; } - if(!bkgClustersRC){ + if(!bkgClustersRC&&(fSubtraction==kRhoRC)){ if(fDebug){ Printf("%s:%d Background cluster RC branch %s not found",(char*)__FILE__,__LINE__,bkgClusterRCName.Data()); PrintAODContents(); diff --git a/JETAN/AliAnalysisTaskJetCluster.cxx b/JETAN/AliAnalysisTaskJetCluster.cxx index 5e67a67fa0c..fc6112685b0 100644 --- a/JETAN/AliAnalysisTaskJetCluster.cxx +++ b/JETAN/AliAnalysisTaskJetCluster.cxx @@ -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 -- 2.31.1