Correctly add histograms from Ylm functions
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Mar 2009 16:58:00 +0000 (16:58 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Mar 2009 16:58:00 +0000 (16:58 +0000)
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoCorrFctnDirectYlm.cxx
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoModelCorrFctnDirectYlm.cxx

index db0cbb7..25996fe 100644 (file)
@@ -648,6 +648,9 @@ void AliFemtoCorrFctnDirectYlm::Finish()
 void AliFemtoCorrFctnDirectYlm::Write()
 {
   // Write out output histograms
+  if ((!fcovnum) || (!fcovden))
+    PackCovariances();
+
   for (int ilm=0; ilm<fMaxJM; ilm++) {
     fnumsreal[ilm]->Write();
     fdensreal[ilm]->Write();
index 147f6d2..e9e61d2 100644 (file)
@@ -118,8 +118,21 @@ TList* AliFemtoModelCorrFctnDirectYlm::GetOutputList()
   TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
   tOutputList->Clear();
 
-  tOutputList->Add(fCYlmTrue->GetOutputList());
-  tOutputList->Add(fCYlmFake->GetOutputList());
+  TList *tListCfTrue = fCYlmTrue->GetOutputList();
+    
+  TIter nextListCfTrue(tListCfTrue);
+  while (TObject *obj = nextListCfTrue()) {
+    tOutputList->Add(obj);
+  }
+
+  TList *tListCfFake = fCYlmFake->GetOutputList();
+    
+  TIter nextListCfFake(tListCfFake);
+  while (TObject *obj = nextListCfFake()) {
+    tOutputList->Add(obj);
+  }
+//   tOutputList->Add(fCYlmTrue->GetOutputList());
+//   tOutputList->Add(fCYlmFake->GetOutputList());
 
   return tOutputList;
 }