overloaded WriteHistograms
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Feb 2009 18:17:34 +0000 (18:17 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Feb 2009 18:17:34 +0000 (18:17 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.h

index 3f85915..7e8c0c9 100644 (file)
@@ -126,6 +126,22 @@ void AliFlowAnalysisWithLeeYangZeros::WriteHistograms(TString* outputFileName)
 
 //-----------------------------------------------------------------------
 
+void AliFlowAnalysisWithLeeYangZeros::WriteHistograms(TString outputFileName)
+{
+ //store the final results in output .root file
+
+  TFile *output = new TFile(outputFileName.Data(),"RECREATE");
+  if (GetFirstRun()) {
+    output->WriteObject(fHistList, "cobjLYZ1","SingleKey");
+  }
+  else {
+    output->WriteObject(fHistList, "cobjLYZ2","SingleKey");
+  }
+  delete output;
+}
+
+//-----------------------------------------------------------------------
+
 Bool_t AliFlowAnalysisWithLeeYangZeros::Init() 
 {
   //init method 
index 2cf5363..f72928c 100644 (file)
@@ -44,6 +44,7 @@ class AliFlowAnalysisWithLeeYangZeros {
    Bool_t    Make(AliFlowEventSimple* anEvent);        //calculates variables and fills histograms
    Bool_t    Finish();                                 //saves histograms
    void      WriteHistograms(TString* outputFileName); //writes histograms locally
+   void      WriteHistograms(TString outputFileName); //writes histograms locally
    
    Double_t  GetQtheta(AliFlowVector aQ, Double_t aTheta);