GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4ExportManager.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4EXPORTMANAGER_H
15 #define TGO4EXPORTMANAGER_H
16 
17 #include "TNamed.h"
18 #include "TString.h"
19 
20 class TH1;
21 class TH2;
22 class TCollection;
23 class TFolder;
24 class TDirectory;
25 class TGraph;
26 
27 
29 {
35 };
36 
44 class TGo4ExportManager : public TNamed {
45  public:
46 
48 
49  TGo4ExportManager(const char *name);
50 
51  virtual ~TGo4ExportManager();
52 
57  void Export(TObject *ob, Go4Export_t format);
58 
61  void Export(TObject *ob);
62 
64  void Export(TH1 *histo);
65 
67  void Export(TGraph *graph);
68 
71  void Export(TFolder *fold);
72 
75  void Export(TDirectory *dir);
76 
79  void Export(TCollection *dir);
80 
81  void SetFilter(Go4Export_t format);
82 
83  void SetCurrentDir(const char *dir = nullptr);
84 
85  void SetStartDir(const char *dir = nullptr);
86 
87  void SetOutFile(const char *filename = nullptr)
88  { fxOutFile = filename ? filename : "Go4Export"; }
89 
90  void SetOutFileComment(const char *comment = nullptr)
91  { fxOutFileComment= comment ? comment : "Saved from Go4"; }
92 
93  private:
94 
99  void ExportASCII(TH1 *histo, Bool_t channels=kTRUE);
100 
102  void ExportASCII(TGraph *graph);
103 
105  void ExportRadware(TH1 *histo);
106 
108  void ExportRadware(TH2 *histo);
109 
111  void ExportRadware(TGraph *graph);
112 
114  void ExportRoot(TObject *ob);
115 
117  void ExportXML(TObject *ob);
118 
121  TString fxStartDir;
122 
124  TString fxCurrentDir;
125 
128  TString fxOutFile;
129 
133 
136 };
137 
138 #endif //TGO4EXPORTMANAGER_H
void SetOutFileComment(const char *comment=nullptr)
void SetOutFile(const char *filename=nullptr)
void ExportASCII(TH1 *histo, Bool_t channels=kTRUE)
void ExportXML(TObject *ob)
void ExportRadware(TH1 *histo)
void SetCurrentDir(const char *dir=nullptr)
void ExportRoot(TObject *ob)
void SetFilter(Go4Export_t format)
void SetStartDir(const char *dir=nullptr)
void Export(TObject *ob, Go4Export_t format)
Go4Export_t