]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 054a1ff0ccaf26c55dbd6e3993baec7b9a5d3c55..b9749a163e414bfdd57a987526b13e0a4e739384 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 5c0ab5aa3ef869e3e7180122b11901061aeac358..6b6069c3e6ccccc9cbecb98a5803461699874724 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 9f95aacf32d47dfcc8d9964541272a9e1c005535..6b075dd85c57fffbf41b99ae6328eda0ff0d5396 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 b87946b83764cafac67df690358c1b87d421740b..2927d035a6e296a0f436ffd5e5a5d7796128a67d 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 3ab0377306b182ddfea943eb5fa41ddc1a3a970f..74408a3ee5a54d41f78827e3dd5f63497d7c3e92 100644 (file)
@@ -110,6 +110,17 @@ void AliFlowAnalysisWithLYZEventPlane::WriteHistograms(TString* outputFileName)
   delete output;
 }
 
+//-----------------------------------------------------------------------
+
+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() {
 
index 29d9eed214a31e9f9ac47f24e136bc85832745e0..c88af5f95d9889d6e610c32f58da35f6fb139d58 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 d04dce5374574d6d588a837ecc3773238a3c2ff2..d870c611ad2206121728f7f955a6ad6e01ce4f22 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 42704aa9921748dcc5d24bd80e9cb656f10e87c0..0f997c76b1b2203e6605734296a05aca8e5f02e8 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 98899ffa6935a08011a887afb45667148df0f899..76e155675450a06c5d78292d31f03160dc72f3d1 100644 (file)
@@ -86,6 +86,16 @@ void AliFlowAnalysisWithMCEventPlane::WriteHistograms(TString* outputFileName)
  delete output;
 }
 
+//-----------------------------------------------------------------------
+
+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() {
 
index 8f3c957fe5b0049e5dc516abfdd54f5241c1eab2..91a5860c6b513fb8429df3c53778c9e7a55a72e2 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 1485c21e73c80628e471fcf92cf6190cd23add05..fe4bab27f50283140b96e7cd5c77dfb21c2838d2 100644 (file)
@@ -74,6 +74,17 @@ void AliFlowAnalysisWithScalarProduct::WriteHistograms(TString* outputFileName)
   delete output;
 }
 
+//-----------------------------------------------------------------------
+
+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() {
 
index 12cb7423d8a93f616178295c0b4d38834f43a107..1d886d373e73bf102cc78bc56c22478c503aaa6e 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 ; }