]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Read aod from OutputHandler in of no aod input
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Aug 2008 11:47:52 +0000 (11:47 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Aug 2008 11:47:52 +0000 (11:47 +0000)
JETAN/AliAnalysisTaskDiJets.cxx

index 92bb34026215a5321a75d125113ca8438fb8c1af..6070e2346485506752144d350881b2227ed4210c 100644 (file)
@@ -65,7 +65,20 @@ void AliAnalysisTaskDiJets::UserExec(Option_t */*option*/)
 //
     fDiJets->Delete();
     AliAODEvent* aod   = dynamic_cast<AliAODEvent*> (InputEvent());
+
+    if(!aod){
+      // We do not have an input AOD, look in the output
+      aod = AODEvent();
+      if(!aod){
+       Printf("%s:%d AODEvent not found in the Output",(char*)__FILE__,__LINE__);
+       return;
+      }    
+    }
+
     TClonesArray* jets = aod->GetJets();
+
+    // N.B. if we take the aod from the output this is always
+    // empty and since it is the same as fDiJets 
     fDiJetsIn = (TClonesArray*) (aod->GetList()->FindObject("Dijets"));
    
     if (fDiJetsIn) {