GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
|
#include <TGo4MainTree.h>
Public Member Functions | |
virtual | ~TGo4MainTree () |
Int_t | GetCurrentIndex () const |
Int_t | IncCurrentIndex () |
void | SetCurrentIndex (Int_t number=0) |
Int_t | GetMaxIndex () |
void | SetAutoSave (Int_t bytesinterval) |
void | Update () |
virtual Int_t | Write (const char *dummy=0, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *dummy=0, Int_t option=0, Int_t bufsize=0) const |
Static Public Member Functions | |
static TGo4MainTree * | Instance () |
static Bool_t | Exists () |
Static Public Attributes | |
static const char * | fgcTREENAME = "Main" |
static const char * | fgcFILENAME = "Go4MainTree.root" |
static const Int_t | fgiCOMPRESS = 5 |
static const Int_t | fgiAUTOSAVESIZE = 10000000 |
Protected Member Functions | |
TTree * | GetTree () |
TGo4MainTree () | |
Private Attributes | |
TFile * | fxFile |
TTree * | fxTree |
Int_t | fiMaxIndex |
Int_t | fiCurrentIndex |
Static Private Attributes | |
static TGo4MainTree * | fxInstance = 0 |
Friends | |
class | TGo4TreeSource |
class | TGo4TreeStore |
Singleton containing and managing the main tree of the go4 analysis. All analysis steps may get and save their events as branches of this tree. The treesource and treestore instances are managing just one branch of this tree for each of their subevents. Branches of this tree might be saved into different root files.
Definition at line 32 of file TGo4MainTree.h.
|
protected |
Definition at line 31 of file TGo4MainTree.cxx.
References TGo4Log::Debug(), fgcFILENAME, fgcTREENAME, fgiAUTOSAVESIZE, fgiCOMPRESS, fiMaxIndex, fxFile, fxTree, GO4TRACE, and TGo4Log::Info().
Referenced by Instance().
|
virtual |
Definition at line 53 of file TGo4MainTree.cxx.
|
inlinestatic |
True if instance of tree already exists. Used by framework to check if MainTree was created by any treestore/source instance, before the instance is requested. Otherwise framework would create maintree without need.
Definition at line 64 of file TGo4MainTree.h.
References fxInstance.
Referenced by TGo4AnalysisStepManager::AutoSave(), and TGo4AnalysisStepManager::ProcessAnalysisSteps().
|
inline |
Definition at line 66 of file TGo4MainTree.h.
References fiCurrentIndex.
Referenced by TGo4TreeSource::BuildEvent(), TGo4TreeStore::Store(), Update(), and TGo4TreeSource::~TGo4TreeSource().
Int_t TGo4MainTree::GetMaxIndex | ( | ) |
Definition at line 112 of file TGo4MainTree.cxx.
References fiMaxIndex, and fxTree.
Referenced by Update(), and TGo4TreeSource::~TGo4TreeSource().
|
inlineprotected |
Access to the tree. For friends only, i.e TreeSource and TreeStore.
Definition at line 39 of file TGo4MainTree.h.
References fxTree.
Referenced by TGo4TreeSource::Open(), and TGo4TreeStore::TGo4TreeStore().
|
inline |
Increments current index in the main tree by one. Returns the value of the index after incrementation. To be used by event loop controlling framework.
Definition at line 71 of file TGo4MainTree.h.
References fiCurrentIndex.
Referenced by Update().
|
static |
Definition at line 62 of file TGo4MainTree.cxx.
References fxInstance, GO4TRACE, and TGo4MainTree().
Referenced by TGo4AnalysisStepManager::AutoSave(), TGo4TreeSource::Open(), TGo4AnalysisStepManager::ProcessAnalysisSteps(), SetAutoSave(), and TGo4TreeStore::TGo4TreeStore().
void TGo4MainTree::SetAutoSave | ( | Int_t | bytesinterval | ) |
Set the tree autosave byte interval. May be changed on the fly.
Definition at line 73 of file TGo4MainTree.cxx.
References fxTree, GO4TRACE, and Instance().
|
inline |
Definition at line 73 of file TGo4MainTree.h.
References fiCurrentIndex.
void TGo4MainTree::Update | ( | ) |
Update the tree entry information without processing any branch. i.e. increment the entry counter with all branches disabled. To be called by framework once within the event loop.
Definition at line 96 of file TGo4MainTree.cxx.
References fxTree, GetCurrentIndex(), GetMaxIndex(), GO4TRACE, and IncCurrentIndex().
Referenced by TGo4AnalysisStepManager::ProcessAnalysisSteps().
|
virtual |
Write tree content to file.
Definition at line 80 of file TGo4MainTree.cxx.
References fxFile, fxTree, and GO4TRACE.
Referenced by TGo4AnalysisStepManager::AutoSave(), and ~TGo4MainTree().
|
virtual |
Definition at line 88 of file TGo4MainTree.cxx.
|
friend |
Definition at line 33 of file TGo4MainTree.h.
|
friend |
Definition at line 34 of file TGo4MainTree.h.
|
static |
Standard suffix for file name
Definition at line 51 of file TGo4MainTree.h.
Referenced by TGo4MainTree().
|
static |
Standard go4 name of the main tree
Definition at line 48 of file TGo4MainTree.h.
Referenced by TGo4MainTree().
|
static |
Default tree autosave size
Definition at line 57 of file TGo4MainTree.h.
Referenced by TGo4MainTree().
|
static |
Default compression level
Definition at line 54 of file TGo4MainTree.h.
Referenced by TGo4MainTree().
|
private |
Index number of the current event.
Definition at line 102 of file TGo4MainTree.h.
Referenced by GetCurrentIndex(), IncCurrentIndex(), and SetCurrentIndex().
|
private |
Number of events stored in the Tree. Used to check if the complete tree is already read.
Definition at line 99 of file TGo4MainTree.h.
Referenced by GetMaxIndex(), and TGo4MainTree().
|
private |
Definition at line 93 of file TGo4MainTree.h.
Referenced by TGo4TreeStore::Store(), TGo4MainTree(), Write(), and ~TGo4MainTree().
|
staticprivate |
Definition at line 91 of file TGo4MainTree.h.
Referenced by Exists(), and Instance().
|
private |
Definition at line 95 of file TGo4MainTree.h.
Referenced by GetMaxIndex(), GetTree(), SetAutoSave(), TGo4MainTree(), Update(), and Write().