GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Go4 TTree storage. More...
#include <TGo4TreeStore.h>
Public Member Functions | |
TGo4TreeStore () | |
TGo4TreeStore (const char *name, TGo4EventElement *event, Int_t splitlevel=1, Int_t bufsize=64000, const char *filename=nullptr, Int_t compression=5) | |
TGo4TreeStore (TGo4TreeStoreParameter *par, TGo4EventElement *event) | |
virtual | ~TGo4TreeStore () |
void | SetCompression (Int_t comp) |
Set the file compression level. | |
virtual Int_t | Store (TFolder *fold) |
Expose all Store methods to avoid compiler warnings, A.Neiser. | |
virtual Int_t | Store (TGo4Condition *conny) |
Expose all Store methods to avoid compiler warnings, A.Neiser. | |
Int_t | Store (TGo4EventElement *event) override |
Stores eventelement event into the storage implementation. | |
virtual Int_t | Store (TGo4Fitter *fitter) |
Expose all Store methods to avoid compiler warnings, A.Neiser. | |
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! | |
virtual TTree * | GetTree () |
Access to a tree that might belong to this storage implementation. | |
Static Public Attributes | |
static const char * | fgcFILESUF = ".root" |
Standard suffix for file name. | |
Private Attributes | |
TString | fcEventClass |
Class name of the event associated with this store. | |
Int_t | fiBufsize {0} |
buffer size for tree branch. | |
Int_t | fiSplit {0} |
TBranch splitlevel. | |
TBranch * | fxBranch {nullptr} |
The branch representing our store. | |
TGo4EventCalibration * | fxCalibration {nullptr} |
Points to calibration structure to be filled into branch. | |
TGo4EventElement * | fxEvent {nullptr} |
Points to event structure to be filled into branch. | |
TFile * | fxFile {nullptr} |
Optional file where our branches are located. | |
TGo4MainTree * | fxSingletonTree {nullptr} |
Reference to external tree singleton wrapper instance. | |
TTree * | fxTree {nullptr} |
Reference to the external main tree. | |
Additional Inherited Members | |
![]() | |
enum | { fguTXTLEN = 256 } |
text length More... | |
Go4 TTree storage.
Storage instance using the central main go4 tree which is accessible as singleton. Each treestore instance adds at least one new branch to that tree and fills it with the data at the event pointer. Branch associated with this tree store may be written to the main tree file, or be located in another file which is specified by the filename parameter of ctor.
Definition at line 41 of file TGo4TreeStore.h.
TGo4TreeStore::TGo4TreeStore | ( | const char * | name, |
TGo4EventElement * | event, | ||
Int_t | splitlevel = 1, | ||
Int_t | bufsize = 64000, | ||
const char * | filename = nullptr, | ||
Int_t | compression = 5 ) |
Definition at line 28 of file TGo4TreeStore.cxx.
References TGo4EventStore::TGo4EventStore(), TGo4Log::Debug(), fcEventClass, fgcFILESUF, fiBufsize, fiSplit, fxBranch, fxEvent, fxFile, fxSingletonTree, fxTree, GO4TRACE, TGo4Log::Info(), and TGo4MainTree::Instance().
TGo4TreeStore::TGo4TreeStore | ( | ) |
Definition at line 110 of file TGo4TreeStore.cxx.
References TGo4EventStore::TGo4EventStore(), fiBufsize, fiSplit, and GO4TRACE.
TGo4TreeStore::TGo4TreeStore | ( | TGo4TreeStoreParameter * | par, |
TGo4EventElement * | event ) |
Definition at line 70 of file TGo4TreeStore.cxx.
References TGo4EventStore::TGo4EventStore(), TGo4Log::Debug(), fcEventClass, fgcFILESUF, fiBufsize, TGo4TreeStoreParameter::fiCompression, fiSplit, fxBranch, TGo4TreeStoreParameter::fxBranchFile, fxEvent, fxFile, fxSingletonTree, fxTree, GO4TRACE, TGo4Log::Info(), and TGo4MainTree::Instance().
|
virtual |
Definition at line 116 of file TGo4TreeStore.cxx.
References GO4TRACE.
void TGo4TreeStore::SetCompression | ( | Int_t | comp | ) |
Set the file compression level.
May be changed on the fly.
Definition at line 162 of file TGo4TreeStore.cxx.
|
virtual |
Expose all Store methods to avoid compiler warnings, A.Neiser.
Reimplemented from TGo4EventStore.
Definition at line 63 of file TGo4EventStore.cxx.
|
virtual |
Expose all Store methods to avoid compiler warnings, A.Neiser.
Reimplemented from TGo4EventStore.
Definition at line 55 of file TGo4EventStore.cxx.
|
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 122 of file TGo4TreeStore.cxx.
References TGo4Log::Debug(), fcEventClass, fxBranch, fxEvent, and GO4TRACE.
|
virtual |
Expose all Store methods to avoid compiler warnings, A.Neiser.
Reimplemented from TGo4EventStore.
Definition at line 59 of file TGo4EventStore.cxx.
|
overridevirtual |
Saves a calibration object correlated with the current event into the storage.
This method is optional, i.e. it needs not to be implemented for all subclasses.
Reimplemented from TGo4EventStore.
Definition at line 148 of file TGo4TreeStore.cxx.
References fxSingletonTree, and GO4TRACE.
|
private |
Class name of the event associated with this store.
Definition at line 98 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().
|
static |
Standard suffix for file name.
Definition at line 72 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), and TGo4TreeStore().
|
private |
buffer size for tree branch.
Definition at line 104 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and TGo4TreeStore().
|
private |
TBranch splitlevel.
Definition at line 101 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and TGo4TreeStore().
|
private |
The branch representing our store.
Definition at line 89 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().
|
private |
Points to calibration structure to be filled into branch.
Definition at line 95 of file TGo4TreeStore.h.
|
private |
Points to event structure to be filled into branch.
Definition at line 92 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().
|
private |
Optional file where our branches are located.
By default, branches are written to the same file as the main tree.
Definition at line 78 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and SetCompression().
|
private |
Reference to external tree singleton wrapper instance.
Is initialized once at the start and used to access the singleton member functions.
Definition at line 83 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().
|
private |
Reference to the external main tree.
Definition at line 86 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore(), and TGo4TreeStore().