00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE 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 GO4EX_XML 00037 }; 00038 00046 class TGo4ExportManager : public TNamed { 00047 public: 00048 00049 TGo4ExportManager(); 00050 00051 TGo4ExportManager(const char* name); 00052 00053 virtual ~TGo4ExportManager(); 00054 00059 void Export(TObject* ob, Go4Export_t format); 00060 00063 void Export(TObject* ob); 00064 00066 void Export(TH1* histo); 00067 00069 void Export(TGraph* graph); 00070 00073 void Export(TFolder* fold); 00074 00077 void Export(TDirectory* dir); 00078 00081 void Export(TCollection* dir); 00082 00083 void SetFilter(Go4Export_t format); 00084 00085 void SetCurrentDir(const char* dir=0); 00086 00087 void SetStartDir(const char* dir=0); 00088 00089 void SetOutFile(const char* filename=0) 00090 { fxOutFile = (filename!=0) ? filename : "Go4Export"; } 00091 00092 void SetOutFileComment(const char* comment=0) 00093 { fxOutFileComment=(comment!=0) ? comment : "Saved from Go4"; } 00094 00095 private: 00096 00101 void ExportASCII(TH1* histo, Bool_t channels=kTRUE); 00102 00104 void ExportASCII(TGraph* graph); 00105 00107 void ExportRadware(TH1* histo); 00108 00110 void ExportRadware(TH2* histo); 00111 00113 void ExportRadware(TGraph* graph); 00114 00116 void ExportRoot(TObject* ob); 00117 00119 void ExportXML(TObject* ob); 00120 00123 TString fxStartDir; 00124 00126 TString fxCurrentDir; 00127 00130 TString fxOutFile; 00131 00134 TString fxOutFileComment; 00135 00137 Go4Export_t fiFilter; 00138 }; 00139 00140 #endif //TGO4EXPORTMANAGER_H 00141 00142 //----------------------------END OF GO4 SOURCE FILE ---------------------