GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Event store which fills entries to an own root TTree in a TFile. More...
#include <TGo4FileStore.h>
Public Member Functions | |
TGo4FileStore () | |
TGo4FileStore (const char *name, Int_t splitlevel=1, Int_t compression=1, Bool_t overwrite=kFALSE, Int_t autosavesize=10000, Int_t bufsize=64000) | |
TGo4FileStore (TGo4FileStoreParameter *par) | |
virtual | ~TGo4FileStore () |
TTree * | GetTree () override |
Access to the Tree structure, for framework. | |
void | SetAutoSave (Int_t interval) |
Set the tree autosave interval. | |
void | SetCompression (Int_t comp) |
Set the file compression level. | |
Int_t | Store (TFolder *fold) override |
Saves a complete objects folder correlated with the current event into the storage. | |
Int_t | Store (TGo4Condition *conny) override |
Saves a condition correlated with the current event into the storage. | |
Int_t | Store (TGo4EventElement *event) override |
Stores eventelement event into the storage implementation. | |
Int_t | Store (TGo4Fitter *fitter) override |
Saves a fitter correlated with the current event into the storage. | |
Int_t | Store (TGo4Parameter *cali) override |
Saves a calibration object correlated with the current event into the storage. | |
![]() | |
TGo4EventStore () | |
TGo4EventStore (const char *name) | |
virtual | ~TGo4EventStore () |
void | Clear (Option_t *opt="") override |
We overwrite the default TNamed::Clear that would erase our name and title! | |
Static Public Member Functions | |
static Long64_t | GetMaxTreeSize () |
static void | SetMaxTreeSize (Long64_t sz) |
Static Public Attributes | |
static const char * | fgcEVBRANCHNAME = "Go4EventBranch." |
Standard go4 name of the branch used in all treestore and treesource implementations. | |
static const char * | fgcFILESUF = ".root" |
Standard suffix for file name. | |
static const char * | fgcTREESUF = "xTree" |
Standard go4 suffix for tree name. | |
static Long64_t | fgiFILESPLITSIZE = 1900000000 |
size in bytes for root tree-filesplit mechanism. | |
Private Member Functions | |
void | WriteToStore (TNamed *ob) |
used by all Store methods to write with referencing event number in name | |
Private Attributes | |
Bool_t | fbBranchExists {kFALSE} |
True if branch already exists. | |
Int_t | fiBufsize {0} |
buffer size for tree branch. | |
Int_t | fiFillCount {0} |
counter of filled events. | |
Int_t | fiSplit {0} |
TBranch splitlevel. | |
TGo4EventElement * | fxEvent {nullptr} |
Points to event structure to be filled into branch. | |
TFile * | fxFile {nullptr} |
TTree * | fxTree {nullptr} |
Additional Inherited Members | |
![]() | |
enum | { fguTXTLEN = 256 } |
text length More... | |
Event store which fills entries to an own root TTree in a TFile.
In contrast to TreeStore, we do not use the main go4 tree, but an independent one which need not correspond with the entry indices of all previous events. Disadvantage: difficult to correlate to input events; advantage: one entry of this tree may be composed from several subsequent input event entries...
Definition at line 38 of file TGo4FileStore.h.
TGo4FileStore::TGo4FileStore | ( | ) |
Definition at line 33 of file TGo4FileStore.cxx.
References TGo4EventStore::TGo4EventStore(), fbBranchExists, fgiFILESPLITSIZE, fiBufsize, fiFillCount, fiSplit, fxEvent, fxFile, fxTree, and GO4TRACE.
TGo4FileStore::TGo4FileStore | ( | const char * | name, |
Int_t | splitlevel = 1, | ||
Int_t | compression = 1, | ||
Bool_t | overwrite = kFALSE, | ||
Int_t | autosavesize = 10000, | ||
Int_t | bufsize = 64000 ) |
Definition at line 49 of file TGo4FileStore.cxx.
References TGo4EventStore::TGo4EventStore(), TGo4Log::Debug(), fbBranchExists, fgcFILESUF, fgcTREESUF, fgiFILESPLITSIZE, fiBufsize, fiFillCount, fiSplit, fxEvent, fxFile, fxTree, GO4TRACE, and TGo4Log::Info().
TGo4FileStore::TGo4FileStore | ( | TGo4FileStoreParameter * | par | ) |
Definition at line 99 of file TGo4FileStore.cxx.
References TGo4EventStore::TGo4EventStore(), TGo4Log::Debug(), TGo4Log::Error(), fbBranchExists, fgcFILESUF, fgcTREESUF, fgiFILESPLITSIZE, fiBufsize, fiFillCount, fiSplit, fxEvent, fxFile, fxTree, TGo4FileStoreParameter::GetAutosaveSize(), TGo4FileStoreParameter::GetBufsize(), TGo4FileStoreParameter::GetCompression(), TGo4FileStoreParameter::GetSplitlevel(), GO4TRACE, TGo4Log::Info(), and TGo4FileStoreParameter::IsOverwriteMode().
|
virtual |
Definition at line 154 of file TGo4FileStore.cxx.
|
static |
Definition at line 260 of file TGo4FileStore.cxx.
References fgiFILESPLITSIZE.
|
inlineoverridevirtual |
Access to the Tree structure, for framework.
Reimplemented from TGo4EventStore.
Definition at line 95 of file TGo4FileStore.h.
References fxTree.
void TGo4FileStore::SetAutoSave | ( | Int_t | interval | ) |
Set the tree autosave interval.
May be changed on the fly. for new ROOT versions: interval>0 means number of entries, interval<0: number of bytes
Definition at line 167 of file TGo4FileStore.cxx.
void TGo4FileStore::SetCompression | ( | Int_t | comp | ) |
Set the file compression level.
May be changed on the fly.
Definition at line 173 of file TGo4FileStore.cxx.
|
static |
Definition at line 255 of file TGo4FileStore.cxx.
References fgiFILESPLITSIZE.
Referenced by main().
|
overridevirtual |
Saves a complete objects folder correlated with the current event into the storage.
Reimplemented from TGo4EventStore.
Definition at line 233 of file TGo4FileStore.cxx.
References WriteToStore().
|
overridevirtual |
Saves a condition correlated with the current event into the storage.
Reimplemented from TGo4EventStore.
Definition at line 221 of file TGo4FileStore.cxx.
References WriteToStore().
|
overridevirtual |
Stores eventelement event into the storage implementation.
May be a file, a root tree, a socket to a viewer...
Implements TGo4EventStore.
Definition at line 179 of file TGo4FileStore.cxx.
References TGo4Log::Debug(), fbBranchExists, fgcEVBRANCHNAME, fiBufsize, fiFillCount, fiSplit, fxEvent, fxTree, and GO4TRACE.
|
overridevirtual |
Saves a fitter correlated with the current event into the storage.
Reimplemented from TGo4EventStore.
Definition at line 227 of file TGo4FileStore.cxx.
References WriteToStore().
|
overridevirtual |
Saves a calibration object correlated with the current event into the storage.
Reimplemented from TGo4EventStore.
Definition at line 215 of file TGo4FileStore.cxx.
References WriteToStore().
|
private |
used by all Store methods to write with referencing event number in name
Definition at line 239 of file TGo4FileStore.cxx.
References fiFillCount, fxFile, and fxTree.
|
private |
True if branch already exists.
Used for automatic creation of new event branch within Store method.
Definition at line 108 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), and Store().
|
static |
Standard go4 name of the branch used in all treestore and treesource implementations.
Definition at line 83 of file TGo4FileStore.h.
Referenced by Store().
|
static |
Standard suffix for file name.
Definition at line 86 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), and TGo4FileSource::ProducesFilesList().
|
static |
Standard go4 suffix for tree name.
Definition at line 89 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), and TGo4FileStore().
|
static |
size in bytes for root tree-filesplit mechanism.
Definition at line 92 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), GetMaxTreeSize(), and SetMaxTreeSize().
|
private |
buffer size for tree branch.
Definition at line 117 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), and Store().
|
private |
counter of filled events.
Definition at line 120 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), Store(), and WriteToStore().
|
private |
TBranch splitlevel.
Definition at line 114 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), and Store().
|
private |
Points to event structure to be filled into branch.
Definition at line 111 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), and Store().
|
private |
Definition at line 102 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), ~TGo4FileStore(), SetCompression(), and WriteToStore().
|
private |
Definition at line 104 of file TGo4FileStore.h.
Referenced by TGo4FileStore(), TGo4FileStore(), TGo4FileStore(), ~TGo4FileStore(), GetTree(), SetAutoSave(), Store(), and WriteToStore().