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 3f85915ebeb5d55c93b961add236e6b8def0c450..7e8c0c9cb710e6d1c787c39b08ea038461db916b 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 2cf53635b9d2d8d3d87ae746cd6f4da1f8b6dbf0..f72928c4e485e156141e7c845965fe9589401551 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);