Add histos from all analyses to the output
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Mar 2009 16:58:54 +0000 (16:58 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Mar 2009 16:58:54 +0000 (16:58 +0000)
PWG2/FEMTOSCOPY/AliFemto/AliAnalysisTaskFemto.cxx

index 8148de1..ab6e306 100644 (file)
@@ -98,6 +98,20 @@ void AliAnalysisTaskFemto::CreateOutputObjects() {
   printf("Creating Femto Analysis objects\n");\r
 \r
   SetFemtoManager(ConfigFemtoAnalysis());\r
+\r
+  TList *tOL;\r
+  fOutputList = fManager->Analysis(0)->GetOutputList();\r
+\r
+  for (unsigned int ian = 1; ian<fManager->AnalysisCollection()->size(); ian++) {\r
+    tOL = fManager->Analysis(ian)->GetOutputList();\r
+\r
+    TIter nextListCf(tOL);\r
+    while (TObject *obj = nextListCf()) {\r
+      fOutputList->Add(obj);\r
+    }\r
+\r
+    delete tOL;\r
+  }\r
 }\r
 \r
 //________________________________________________________________________\r
@@ -160,8 +174,8 @@ void AliAnalysisTaskFemto::Exec(Option_t *) {
          fManager->ProcessEvent();\r
        }\r
     } \r
+\r
     // Post the output histogram list\r
-    fOutputList = fManager->Analysis(0)->GetOutputList();\r
     PostData(0, fOutputList);\r
   }\r
   \r
@@ -186,7 +200,8 @@ void AliAnalysisTaskFemto::Exec(Option_t *) {
        }\r
       }\r
     } \r
-    fOutputList = fManager->Analysis(0)->GetOutputList();\r
+\r
+    // Post the output histogram list\r
     PostData(0, fOutputList);\r
   }\r
 }      \r