]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
some protection
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Aug 2008 14:38:05 +0000 (14:38 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Aug 2008 14:38:05 +0000 (14:38 +0000)
PWG2/FLOW/AliFlowAnalysisWithScalarProduct.cxx
PWG2/FLOW/AliFlowCommonHist.cxx

index a952df60454a76a2eecbade8c0a44de9b6834365..0ef1ae62bc2628b3e10f1d4d3e67f71805640d40 100644 (file)
@@ -81,7 +81,7 @@ void AliFlowAnalysisWithScalarProduct::Init() {
   fCommonHists = new AliFlowCommonHist("SP");
   //  fHistList->Add(fCommonHists->GetHistList());
 
-  //  fHistList->Add(fCommonHists);
+  fHistList->Add(fCommonHists);
   // commented for test writing full object
   fHistList->Add(fCommonHists->GetHistMultOrig());
   fHistList->Add(fCommonHists->GetHistMultInt());
index e92f95fb433cd56a66180eb1b0d5e332bcdb4fdc..9e1c6ed74da552184cbb5e2818fafb98813abdd3 100644 (file)
@@ -331,9 +331,14 @@ void AliFlowCommonHist::Print(Option_t *option) const
   //             ===============================================
   //   printf( "TH1.Print Name  = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
   printf( "Class.Print Name = %s, Histogram list:\n",GetName());
-  
-  fHistList->Print(option);
-  
+
+  if (fHistList) {  
+    fHistList->Print(option);
+  }
+  else
+    {
+      printf( "Empty histogram list \n");
+    }
 }