]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding PostData in UserCreateOutputObjects()
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Feb 2011 13:19:51 +0000 (13:19 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Feb 2011 13:19:51 +0000 (13:19 +0000)
JETAN/AliAnalysisTaskJetBackgroundSubtract.cxx
JETAN/AliAnalysisTaskJetCluster.cxx

index 5c94c15f0285ac8f63adb5b15c760eb3197f7b25..89c61289c7c884a58286e61cf439bd6adbfd7af4 100644 (file)
@@ -168,6 +168,9 @@ void AliAnalysisTaskJetBackgroundSubtract::UserCreateOutputObjects()
   // Connect the AOD
 
   if (fDebug > 1) printf("AnalysisTaskJetBackgroundSubtract::UserCreateOutputObjects() \n");
+
+
+
   if(fNonStdFile.Length()!=0){
     
     // case that we have an AOD extension we need to fetch the jets from the extended output
@@ -211,6 +214,7 @@ void AliAnalysisTaskJetBackgroundSubtract::UserCreateOutputObjects()
 
   if(!fHistList)fHistList = new TList();
   fHistList->SetOwner();
+  PostData(1, fHistList); // post data in any case once
 
   for(int iJB = 0;iJB<fJBArray->GetEntries();iJB++){
     TObjString *ostr = (TObjString*)fJBArray->At(iJB);
index 28ed8027c3ebabdc9d979559faace08039865c40..a482d717dc4279c869dbb5b4fa50f21835dfe91f 100644 (file)
@@ -381,7 +381,8 @@ void AliAnalysisTaskJetCluster::UserCreateOutputObjects()
 
   if(!fHistList)fHistList = new TList();
   fHistList->SetOwner();
-  
+  PostData(1, fHistList); // post data in any case once
+
   Bool_t oldStatus = TH1::AddDirectoryStatus();
   TH1::AddDirectory(kFALSE);
 
@@ -651,6 +652,7 @@ void AliAnalysisTaskJetCluster::UserExec(Option_t */*option*/)
   AliAODJetEventBackground* externalBackground = 0;
   if(!externalBackground&&fBackgroundBranch.Length()){
     externalBackground =  (AliAODJetEventBackground*)(AODEvent()->FindListObject(fBackgroundBranch.Data()));
+    if((!externalBackground)&&fAODExtension)externalBackground = (AliAODJetEventBackground*)(fAODExtension->GetAOD()->FindListObject(fBackgroundBranch.Data()));
     if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
   }
   //