overloaded write method
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jan 2009 14:18:09 +0000 (14:18 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jan 2009 14:18:09 +0000 (14:18 +0000)
12 files changed:
PWG2/FLOW/AliFittingQDistribution.cxx
PWG2/FLOW/AliFittingQDistribution.h
PWG2/FLOW/AliFlowAnalysisWithCumulants.cxx
PWG2/FLOW/AliFlowAnalysisWithCumulants.h
PWG2/FLOW/AliFlowAnalysisWithLYZEventPlane.cxx
PWG2/FLOW/AliFlowAnalysisWithLYZEventPlane.h
PWG2/FLOW/AliFlowAnalysisWithLeeYangZeros.cxx
PWG2/FLOW/AliFlowAnalysisWithLeeYangZeros.h
PWG2/FLOW/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowAnalysisWithScalarProduct.cxx
PWG2/FLOW/AliFlowAnalysisWithScalarProduct.h

index 054a1ff..b9749a1 100644 (file)
@@ -179,6 +179,16 @@ void AliFittingQDistribution::WriteHistograms(TString* outputFileName)
 
 //================================================================================================================
 
+void AliFittingQDistribution::WriteHistograms(TString outputFileName)
+{
+ //store the final results in output .root file
+ TFile *output = new TFile(outputFileName.Data(),"RECREATE");
+ output->WriteObject(fHistList, "cobjFQD","SingleKey");
+ delete output;
+}
+
+//================================================================================================================
+
 
 
 
index 5c0ab5a..6b6069c 100644 (file)
@@ -41,6 +41,7 @@ class AliFittingQDistribution{
   virtual void Make(AliFlowEventSimple* anEvent);
   virtual void Finish();
   virtual void WriteHistograms(TString* outputFileName);
+  virtual void WriteHistograms(TString outputFileName);
 
 //----------------------------------------------------------------------------------------------------------------
 //                                            setters and getters                                                 
index 9f95aac..6b075dd 100644 (file)
@@ -827,6 +827,18 @@ void AliFlowAnalysisWithCumulants::WriteHistograms(TString* outputFileName)
 
 //================================================================================================================
 
+//================================================================================================================
+
+void AliFlowAnalysisWithCumulants::WriteHistograms(TString outputFileName)
+{
+ //store the final results in output .root file
+ TFile *output = new TFile(outputFileName.Data(),"RECREATE");
+ output->WriteObject(fHistList, "cobjGFC","SingleKey");
+ delete output;
+}
+
+//================================================================================================================
+
 
 
 
index b87946b..2927d03 100644 (file)
@@ -43,6 +43,7 @@ class AliFlowAnalysisWithCumulants{
   virtual void Make(AliFlowEventSimple* anEvent);
   virtual void Finish();
   virtual void WriteHistograms(TString* outputFileName);
+  virtual void WriteHistograms(TString outputFileName);
   
 //----------------------------------------------------------------------------------------------------------------
 //                                            setters and getters                                     fBinWidth            
index 3ab0377..74408a3 100644 (file)
@@ -111,6 +111,17 @@ void AliFlowAnalysisWithLYZEventPlane::WriteHistograms(TString* outputFileName)
 }
 
 //-----------------------------------------------------------------------
+
+void AliFlowAnalysisWithLYZEventPlane::WriteHistograms(TString outputFileName)
+{
+ //store the final results in output .root file
+
+  TFile *output = new TFile(outputFileName.Data(),"RECREATE");
+  output->WriteObject(fHistList, "cobjLYZEP","SingleKey");
+  delete output;
+}
+
+//-----------------------------------------------------------------------
 void AliFlowAnalysisWithLYZEventPlane::Init() {
 
   //Initialise all histograms
index 29d9eed..c88af5f 100644 (file)
@@ -36,6 +36,7 @@ class AliFlowAnalysisWithLYZEventPlane {
   virtual void   Make(AliFlowEventSimple* fEvent, AliFlowLYZEventPlane* fLYZEP);
   virtual void   Finish();
   void           WriteHistograms(TString* outputFileName);
+  void           WriteHistograms(TString outputFileName);
 
   void      SetEventNumber(Int_t n)      { this->fEventNumber = n; }
   Int_t     GetEventNumber() const       { return this->fEventNumber; }
index d04dce5..d870c61 100644 (file)
@@ -123,6 +123,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 42704aa..0f997c7 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*);            //writes histograms
+   void      WriteHistograms(TString);             //writes histograms
    
    Double_t  GetQtheta(AliFlowVector aQ, Double_t aTheta);
 
index 98899ff..76e1556 100644 (file)
@@ -87,6 +87,16 @@ void AliFlowAnalysisWithMCEventPlane::WriteHistograms(TString* outputFileName)
 }
 
 //-----------------------------------------------------------------------
+
+void AliFlowAnalysisWithMCEventPlane::WriteHistograms(TString outputFileName)
+{
+ //store the final results in output .root file
+ TFile *output = new TFile(outputFileName.Data(),"RECREATE");
+ output->WriteObject(fHistList, "cobjMCEP","SingleKey");
+ delete output;
+}
+
+//-----------------------------------------------------------------------
 void AliFlowAnalysisWithMCEventPlane::Init() {
 
   //Define all histograms
index 8f3c957..91a5860 100644 (file)
@@ -40,6 +40,7 @@ class AliFlowAnalysisWithMCEventPlane {
    virtual  ~AliFlowAnalysisWithMCEventPlane();  //destructor
  
    void      WriteHistograms(TString* outputFileName);
+   void      WriteHistograms(TString outputFileName);
    void      Init();                             //defines variables and histograms
    void      Make(AliFlowEventSimple* anEvent, Double_t aRP);   //calculates variables and fills histograms
    void      Finish();                           //saves histograms
index 1485c21..fe4bab2 100644 (file)
@@ -75,6 +75,17 @@ void AliFlowAnalysisWithScalarProduct::WriteHistograms(TString* outputFileName)
 }
 
 //-----------------------------------------------------------------------
+
+void AliFlowAnalysisWithScalarProduct::WriteHistograms(TString outputFileName)
+{
+ //store the final results in output .root file
+
+  TFile *output = new TFile(outputFileName.Data(),"RECREATE");
+  output->WriteObject(fHistList, "cobjSP","SingleKey");
+  delete output;
+}
+
+//-----------------------------------------------------------------------
 void AliFlowAnalysisWithScalarProduct::Init() {
 
   //Define all histograms
index 12cb742..1d886d3 100644 (file)
@@ -37,6 +37,7 @@ class AliFlowAnalysisWithScalarProduct {
    void    Make(AliFlowEventSimple* anEvent);        //calculates variables and fills histograms
    void    Finish();                                 //saves histograms
    void    WriteHistograms(TString* outputFileName); //writes histograms locally
+   void    WriteHistograms(TString outputFileName); //writes histograms locally
 
    void      SetDebug(Bool_t kt)            { this->fDebug = kt ; }
    Bool_t    GetDebug() const               { return this->fDebug ; }