GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FileStore.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 TGO4FILESTORE_H
15#define TGO4FILESTORE_H
16
17#include "TGo4EventStore.h"
18
19class TFile;
20class TTree;
21
25
39 public:
40
42
43 TGo4FileStore(const char *name,
44 Int_t splitlevel = 1,
45 Int_t compression = 1,
46 Bool_t overwrite = kFALSE,
47 Int_t autosavesize = 10000, // positive: entries, negative: bytes
48 Int_t bufsize = 64000);
49
51
52 virtual ~TGo4FileStore();
53
56 Int_t Store(TGo4EventElement *event) override;
57
59 Int_t Store(TGo4Parameter *cali) override;
60
62 Int_t Store(TGo4Condition *conny) override;
63
65 Int_t Store(TGo4Fitter *fitter) override;
66
68 Int_t Store(TFolder *fold) override;
69
71 void SetCompression(Int_t comp);
72
75 void SetAutoSave(Int_t interval);
76
77 static void SetMaxTreeSize(Long64_t sz);
78
79 static Long64_t GetMaxTreeSize();
80
83 static const char *fgcEVBRANCHNAME;
84
86 static const char *fgcFILESUF;
87
89 static const char *fgcTREESUF;
90
92 static Long64_t fgiFILESPLITSIZE;
93
95 TTree *GetTree() override { return fxTree; }
96
97 private:
98
100 void WriteToStore(TNamed *ob);
101
102 TFile *fxFile{nullptr};
103
104 TTree *fxTree{nullptr};
105
108 Bool_t fbBranchExists{kFALSE};
109
112
114 Int_t fiSplit{0};
115
117 Int_t fiBufsize{0};
118
120 Int_t fiFillCount{0};
121
122 ClassDefOverride(TGo4FileStore,1)
123};
124
125#endif //TGO4FILESTORE_H
Go4 condition class.
Data object for calibration of the input event.
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
Event store which fills entries to an own root TTree in a TFile.
TGo4EventElement * fxEvent
Points to event structure to be filled into branch.
void WriteToStore(TNamed *ob)
used by all Store methods to write with referencing event number in name
Int_t fiFillCount
counter of filled events.
virtual ~TGo4FileStore()
static Long64_t GetMaxTreeSize()
Int_t Store(TGo4EventElement *event) override
Stores eventelement event into the storage implementation.
static void SetMaxTreeSize(Long64_t sz)
void SetAutoSave(Int_t interval)
Set the tree autosave interval.
TTree * GetTree() override
Access to the Tree structure, for framework.
static const char * fgcFILESUF
Standard suffix for file name.
Int_t fiSplit
TBranch splitlevel.
Bool_t fbBranchExists
True if branch already exists.
void SetCompression(Int_t comp)
Set the file compression level.
static const char * fgcEVBRANCHNAME
Standard go4 name of the branch used in all treestore and treesource implementations.
static const char * fgcTREESUF
Standard go4 suffix for tree name.
Int_t fiBufsize
buffer size for tree branch.
static Long64_t fgiFILESPLITSIZE
size in bytes for root tree-filesplit mechanism.
Central class of Go4Fit package.
Definition TGo4Fitter.h:38
Base class for all parameter aggregations, e.g.