#include <TGo4TreeStore.h>
Public Member Functions | |
TGo4TreeStore (const char *name, TGo4EventElement *event, Int_t splitlevel=1, Int_t bufsize=64000, const char *filename=0, Int_t compression=5) | |
TGo4TreeStore () | |
TGo4TreeStore (TGo4TreeStoreParameter *par, TGo4EventElement *event) | |
virtual | ~TGo4TreeStore () |
virtual Int_t | Store (TGo4EventElement *event) |
void | SetCompression (Int_t comp) |
virtual Int_t | Store (TGo4Parameter *cali) |
Static Public Attributes | |
static const char * | fgcFILESUF = ".root" |
Private Attributes | |
TFile * | fxFile |
TGo4MainTree * | fxSingletonTree |
TTree * | fxTree |
TBranch * | fxBranch |
TGo4EventElement * | fxEvent |
TGo4EventCalibration * | fxCalibration |
TString | fcEventClass |
Int_t | fiSplit |
Int_t | fiBufsize |
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 39 of file TGo4TreeStore.h.
TGo4TreeStore::TGo4TreeStore | ( | const char * | name, | |
TGo4EventElement * | event, | |||
Int_t | splitlevel = 1 , |
|||
Int_t | bufsize = 64000 , |
|||
const char * | filename = 0 , |
|||
Int_t | compression = 5 | |||
) |
Definition at line 28 of file TGo4TreeStore.cxx.
References TGo4Log::Debug(), fcEventClass, fgcFILESUF, fiBufsize, fiSplit, fxBranch, fxEvent, fxFile, fxSingletonTree, fxTree, TGo4MainTree::GetTree(), GO4TRACE, TGo4Log::Info(), and TGo4MainTree::Instance().
TGo4TreeStore::TGo4TreeStore | ( | ) |
Definition at line 112 of file TGo4TreeStore.cxx.
References GO4TRACE.
TGo4TreeStore::TGo4TreeStore | ( | TGo4TreeStoreParameter * | par, | |
TGo4EventElement * | event | |||
) |
Definition at line 70 of file TGo4TreeStore.cxx.
References TGo4Log::Debug(), fcEventClass, fgcFILESUF, fiBufsize, TGo4TreeStoreParameter::fiCompression, fiSplit, fxBranch, TGo4TreeStoreParameter::fxBranchFile, fxEvent, fxFile, fxSingletonTree, fxTree, GO4TRACE, TGo4Log::Info(), and TGo4MainTree::Instance().
TGo4TreeStore::~TGo4TreeStore | ( | ) | [virtual] |
Definition at line 121 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 169 of file TGo4TreeStore.cxx.
Int_t TGo4TreeStore::Store | ( | TGo4Parameter * | cali | ) | [virtual] |
Saves a calibration object correllated 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 155 of file TGo4TreeStore.cxx.
References TGo4MainTree::fxFile, fxSingletonTree, TGo4MainTree::GetCurrentIndex(), and GO4TRACE.
Int_t TGo4TreeStore::Store | ( | TGo4EventElement * | event | ) | [virtual] |
Stores eventelement event into the storage implementation. May be a file, a root tree, a socket to a viewer...
Implements TGo4EventStore.
Definition at line 129 of file TGo4TreeStore.cxx.
References TGo4EventElement::Clear(), TGo4Log::Debug(), fcEventClass, fxBranch, fxEvent, GO4TRACE, and TGo4EventElement::SetValid().
TString TGo4TreeStore::fcEventClass [private] |
Class name of the event associated with this store.
Definition at line 93 of file TGo4TreeStore.h.
Referenced by Store(), and TGo4TreeStore().
const char * TGo4TreeStore::fgcFILESUF = ".root" [static] |
Standard suffix for file name
Definition at line 67 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore().
Int_t TGo4TreeStore::fiBufsize [private] |
buffer size for tree branch.
Definition at line 99 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore().
Int_t TGo4TreeStore::fiSplit [private] |
TBranch* TGo4TreeStore::fxBranch [private] |
The branch representing our store.
Definition at line 84 of file TGo4TreeStore.h.
Referenced by Store(), and TGo4TreeStore().
TGo4EventCalibration* TGo4TreeStore::fxCalibration [private] |
Points to calibration structure to be filled into branch.
Definition at line 90 of file TGo4TreeStore.h.
TGo4EventElement* TGo4TreeStore::fxEvent [private] |
Points to event structure to be filled into branch.
Definition at line 87 of file TGo4TreeStore.h.
Referenced by Store(), and TGo4TreeStore().
TFile* TGo4TreeStore::fxFile [private] |
Optional file where our branches are located. By default, branches are written to the same file as the main tree.
Definition at line 73 of file TGo4TreeStore.h.
Referenced by SetCompression(), and TGo4TreeStore().
TGo4MainTree* TGo4TreeStore::fxSingletonTree [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 78 of file TGo4TreeStore.h.
Referenced by Store(), and TGo4TreeStore().
TTree* TGo4TreeStore::fxTree [private] |
Reference to the external main tree.
Definition at line 81 of file TGo4TreeStore.h.
Referenced by TGo4TreeStore().