GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FileStore.h
Go to the documentation of this file.
1 // $Id: TGo4FileStore.h 2627 2019-10-01 08:02:45Z linev $
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 TGO4FILESTORE_H
15 #define TGO4FILESTORE_H
16 
17 #include "TGo4EventStore.h"
18 
19 class TFile;
20 class TTree;
21 
23 class TGo4EventElement;
25 
36 class TGo4FileStore : public TGo4EventStore {
37  public:
38 
39  TGo4FileStore();
40 
41  TGo4FileStore(const char* name,
42  Int_t splitlevel=1,
43  Int_t compression=1,
44  Bool_t overwrite=kFALSE,
45  Int_t autosavesize=10000, // positive: entries, negative: bytes
46  Int_t bufsize=64000);
47 
49 
50  virtual ~TGo4FileStore();
51 
54  virtual Int_t Store(TGo4EventElement* event);
55 
57  virtual Int_t Store(TGo4Parameter* cali);
58 
60  virtual Int_t Store(TGo4Condition* conny);
61 
63  virtual Int_t Store(TGo4Fitter* fitter);
64 
66  virtual Int_t Store(TFolder* fold);
67 
69  void SetCompression(Int_t comp);
70 
73  void SetAutoSave(Int_t interval);
74 
75  static void SetMaxTreeSize(Long64_t sz);
76 
77  static Long64_t GetMaxTreeSize();
78 
81  static const char* fgcEVBRANCHNAME;
82 
84  static const char* fgcFILESUF;
85 
87  static const char* fgcTREESUF;
88 
90  static Long64_t fgiFILESPLITSIZE;
91 
93  virtual TTree* GetTree() { return fxTree; }
94 
95  private:
96 
98  void WriteToStore(TNamed* ob);
99 
100  TFile* fxFile;
101 
102  TTree * fxTree;
103 
107 
110 
112  Int_t fiSplit;
113 
115  Int_t fiBufsize;
116 
118  Int_t fiFillCount;
119 
120  ClassDef(TGo4FileStore,1)
121 };
122 
123 #endif //TGO4FILESTORE_H
static Long64_t fgiFILESPLITSIZE
Definition: TGo4FileStore.h:90
virtual TTree * GetTree()
Definition: TGo4FileStore.h:93
virtual ~TGo4FileStore()
void WriteToStore(TNamed *ob)
static void SetMaxTreeSize(Long64_t sz)
void SetCompression(Int_t comp)
Bool_t fbBranchExists
TGo4EventElement * fxEvent
void SetAutoSave(Int_t interval)
virtual Int_t Store(TGo4EventElement *event)
static const char * fgcTREESUF
Definition: TGo4FileStore.h:87
static const char * fgcFILESUF
Definition: TGo4FileStore.h:84
static Long64_t GetMaxTreeSize()
static const char * fgcEVBRANCHNAME
Definition: TGo4FileStore.h:81