GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4TreeStore.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 TGO4TREESTORE_H
15 #define TGO4TREESTORE_H
16 
17 #include "TGo4EventStore.h"
18 
19 class TFile;
20 class TTree;
21 class TBranch;
22 class TGo4MainTree;
23 class TGo4EventElement;
24 class TGo4Parameter;
27 
39 class TGo4TreeStore : public TGo4EventStore {
40  public:
41 
42  TGo4TreeStore(const char *name,
43  TGo4EventElement *event,
44  Int_t splitlevel = 1,
45  Int_t bufsize = 64000,
46  const char *filename = nullptr,
47  Int_t compression = 5);
48 
49  TGo4TreeStore();
50 
52 
53  virtual ~TGo4TreeStore();
54 
57 
60  Int_t Store(TGo4EventElement *event) override;
61 
63  void SetCompression(Int_t comp);
64 
67  Int_t Store(TGo4Parameter *cali) override;
68 
70  static const char *fgcFILESUF;
71 
72  private:
73 
76  TFile *fxFile{nullptr};
77 
82 
84  TTree *fxTree{nullptr};
85 
87  TBranch *fxBranch{nullptr};
88 
91 
94 
96  TString fcEventClass;
97 
99  Int_t fiSplit{0};
100 
102  Int_t fiBufsize{0};
103 
104  ClassDefOverride(TGo4TreeStore,1)
105 };
106 
107 #endif //TGO4TREESTORE_H
Int_t Store(TGo4EventElement *event) override
TGo4EventCalibration * fxCalibration
Definition: TGo4TreeStore.h:93
virtual Int_t Store(TGo4EventElement *event)=0
TGo4MainTree * fxSingletonTree
Definition: TGo4TreeStore.h:81
TFile * fxFile
Definition: TGo4TreeStore.h:76
TTree * fxTree
Definition: TGo4TreeStore.h:84
void SetCompression(Int_t comp)
static const char * fgcFILESUF
Definition: TGo4TreeStore.h:70
TString fcEventClass
Definition: TGo4TreeStore.h:96
TBranch * fxBranch
Definition: TGo4TreeStore.h:87
TGo4EventElement * fxEvent
Definition: TGo4TreeStore.h:90
virtual ~TGo4TreeStore()