Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4Analysis/TGo4ExportManager.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4EXPORTMANAGER_H
00017 #define TGO4EXPORTMANAGER_H
00018 
00019 #include "TNamed.h"
00020 #include "TString.h"
00021 
00022 class TH1;
00023 class TH2;
00024 class TCollection;
00025 class TFolder;
00026 class TDirectory;
00027 class TGraph;
00028 
00029 
00030 enum Go4Export_t
00031 {
00032    GO4EX_ASCII,
00033    GO4EX_ASCII_CHANNELS,
00034    GO4EX_RADWARE,
00035    GO4EX_ROOT
00036 };
00037 
00045 class TGo4ExportManager : public TNamed {
00046   public:
00047 
00048     TGo4ExportManager();
00049 
00050     TGo4ExportManager(const Text_t* name);
00051 
00052     virtual ~TGo4ExportManager();
00053 
00058     void Export(TObject* ob, Go4Export_t format);
00059 
00062     void Export(TObject* ob);
00063 
00065     void Export(TH1* histo);
00066 
00068     void Export(TGraph* graph);
00069 
00072     void Export(TFolder* fold);
00073 
00076     void Export(TDirectory* dir);
00077 
00080     void Export(TCollection* dir);
00081 
00082     void SetFilter(Go4Export_t format) { fiFilter=format; }
00083 
00084     void SetCurrentDir(const Text_t* dir=0);
00085 
00086     void SetStartDir(const Text_t* dir=0);
00087 
00088     void SetOutFile(const Text_t* filename=0)
00089         { fxOutFile = (filename!=0) ? filename : "Go4Export"; }
00090 
00091     void SetOutFileComment(const Text_t* comment=0)
00092         { fxOutFileComment=(comment!=0) ?  comment : "Saved from Go4"; }
00093 
00094   private:
00095 
00100     void ExportASCII(TH1* histo, Bool_t channels=kTRUE);
00101 
00103     void ExportASCII(TGraph* graph);
00104 
00106     void ExportRadware(TH1* histo);
00107 
00109     void ExportRadware(TH2* histo);
00110 
00112     void ExportRadware(TGraph* graph);
00113 
00115     void ExportRoot(TObject* ob);
00116 
00119     TString fxStartDir;
00120 
00122     TString fxCurrentDir;
00123 
00126     TString fxOutFile;
00127 
00130     TString fxOutFileComment;
00131 
00133     Go4Export_t fiFilter;
00134 
00135   ClassDef(TGo4ExportManager,1)
00136 };
00137 
00138 #endif //TGO4EXPORTMANAGER_H
00139 
00140 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:49 2005 for Go4-v2.10-5 by doxygen1.2.15