GSI Object Oriented Online Offline (Go4) GO4-6.4.5
Loading...
Searching...
No Matches
TGo4MainTree Class Reference

Singleton containing and managing the main tree of the go4 analysis. More...

#include <TGo4MainTree.h>

Inheritance diagram for TGo4MainTree:

Public Member Functions

virtual ~TGo4MainTree ()
virtual ~TGo4MainTree ()
Int_t GetCurrentIndex () const
Int_t GetCurrentIndex () const
Int_t GetMaxIndex ()
Int_t GetMaxIndex ()
Int_t IncCurrentIndex ()
 Increments current index in the main tree by one.
Int_t IncCurrentIndex ()
 Increments current index in the main tree by one.
void SetAutoSave (Int_t bytesinterval)
 Set the tree autosave byte interval.
void SetAutoSave (Int_t bytesinterval)
 Set the tree autosave byte interval.
void SetCurrentIndex (Int_t number=0)
void SetCurrentIndex (Int_t number=0)
void Update ()
 Update the tree entry information without processing any branch.
void Update ()
 Update the tree entry information without processing any branch.
Int_t Write (const char *dummy=nullptr, Int_t option=0, Int_t bufsize=0) const override
Int_t Write (const char *dummy=nullptr, Int_t option=0, Int_t bufsize=0) const override
Int_t Write (const char *dummy=nullptr, Int_t option=0, Int_t bufsize=0) override
 Write tree content to file.
Int_t Write (const char *dummy=nullptr, Int_t option=0, Int_t bufsize=0) override
 Write tree content to file.

Static Public Member Functions

static Bool_t Exists ()
 True if instance of tree already exists.
static Bool_t Exists ()
 True if instance of tree already exists.
static TGo4MainTreeInstance ()
static TGo4MainTreeInstance ()

Static Public Attributes

static const char * fgcFILENAME = "Go4MainTree.root"
 Standard suffix for file name.
static const char * fgcTREENAME = "Main"
 Standard go4 name of the main tree.
static const Int_t fgiAUTOSAVESIZE = 10000000
 Default tree autosave size.
static const Int_t fgiCOMPRESS = 5
 Default compression level.

Protected Member Functions

 TGo4MainTree ()
 TGo4MainTree ()
TTree * GetTree () const
 Access to the tree.
TTree * GetTree () const
 Access to the tree.

Private Attributes

Int_t fiCurrentIndex {0}
 Index number of the current event.
Int_t fiMaxIndex {0}
 Number of events stored in the Tree.
TFile * fxFile {nullptr}
TTree * fxTree {nullptr}

Static Private Attributes

static TGo4MainTreefxInstance = nullptr

Friends

class TGo4TreeSource
class TGo4TreeStore

Detailed Description

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.

Author
J. Adamczewski
Since
16-feb-2001

Definition at line 33 of file TGo4MainTree.h.

Constructor & Destructor Documentation

◆ TGo4MainTree() [1/2]

TGo4MainTree::TGo4MainTree ( )
protected

◆ ~TGo4MainTree() [1/2]

TGo4MainTree::~TGo4MainTree ( )
virtual

Definition at line 51 of file TGo4MainTree.cxx.

References fxFile, GO4TRACE, and Write().

◆ TGo4MainTree() [2/2]

TGo4MainTree::TGo4MainTree ( )
protected

◆ ~TGo4MainTree() [2/2]

virtual TGo4MainTree::~TGo4MainTree ( )
virtual

Member Function Documentation

◆ Exists() [1/2]

Bool_t TGo4MainTree::Exists ( )
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 65 of file TGo4MainTree.h.

References fxInstance.

Referenced by TGo4AnalysisStepManager::AutoSave(), and TGo4AnalysisStepManager::ProcessAnalysisSteps().

◆ Exists() [2/2]

Bool_t TGo4MainTree::Exists ( )
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 65 of file TGo4MainTree.h.

References fxInstance.

◆ GetCurrentIndex() [1/2]

Int_t TGo4MainTree::GetCurrentIndex ( ) const
inline

Definition at line 67 of file TGo4MainTree.h.

References fiCurrentIndex.

Referenced by Update().

◆ GetCurrentIndex() [2/2]

Int_t TGo4MainTree::GetCurrentIndex ( ) const
inline

Definition at line 67 of file TGo4MainTree.h.

References fiCurrentIndex.

◆ GetMaxIndex() [1/2]

Int_t TGo4MainTree::GetMaxIndex ( )

Definition at line 102 of file TGo4MainTree.cxx.

References fiMaxIndex, and fxTree.

Referenced by Update().

◆ GetMaxIndex() [2/2]

Int_t TGo4MainTree::GetMaxIndex ( )

◆ GetTree() [1/2]

TTree * TGo4MainTree::GetTree ( ) const
inlineprotected

Access to the tree.

For friends only, i.e TreeSource and TreeStore.

Definition at line 40 of file TGo4MainTree.h.

References fxTree.

◆ GetTree() [2/2]

TTree * TGo4MainTree::GetTree ( ) const
inlineprotected

Access to the tree.

For friends only, i.e TreeSource and TreeStore.

Definition at line 40 of file TGo4MainTree.h.

References fxTree.

◆ IncCurrentIndex() [1/2]

Int_t TGo4MainTree::IncCurrentIndex ( )
inline

Increments current index in the main tree by one.

Returns the value of the index after incrementing. To be used by event loop controlling framework.

Definition at line 72 of file TGo4MainTree.h.

References fiCurrentIndex.

Referenced by Update().

◆ IncCurrentIndex() [2/2]

Int_t TGo4MainTree::IncCurrentIndex ( )
inline

Increments current index in the main tree by one.

Returns the value of the index after incrementing. To be used by event loop controlling framework.

Definition at line 72 of file TGo4MainTree.h.

References fiCurrentIndex.

◆ Instance() [1/2]

◆ Instance() [2/2]

TGo4MainTree * TGo4MainTree::Instance ( )
static

References TGo4MainTree().

◆ SetAutoSave() [1/2]

void TGo4MainTree::SetAutoSave ( Int_t bytesinterval)

Set the tree autosave byte interval.

May be changed on the fly.

Definition at line 66 of file TGo4MainTree.cxx.

References fxTree, GO4TRACE, and Instance().

◆ SetAutoSave() [2/2]

void TGo4MainTree::SetAutoSave ( Int_t bytesinterval)

Set the tree autosave byte interval.

May be changed on the fly.

◆ SetCurrentIndex() [1/2]

void TGo4MainTree::SetCurrentIndex ( Int_t number = 0)
inline

Definition at line 74 of file TGo4MainTree.h.

References fiCurrentIndex.

◆ SetCurrentIndex() [2/2]

void TGo4MainTree::SetCurrentIndex ( Int_t number = 0)
inline

Definition at line 74 of file TGo4MainTree.h.

References fiCurrentIndex.

◆ Update() [1/2]

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 89 of file TGo4MainTree.cxx.

References fxTree, GetCurrentIndex(), GetMaxIndex(), GO4TRACE, and IncCurrentIndex().

Referenced by TGo4AnalysisStepManager::ProcessAnalysisSteps().

◆ Update() [2/2]

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.

◆ Write() [1/4]

Int_t TGo4MainTree::Write ( const char * dummy = nullptr,
Int_t option = 0,
Int_t bufsize = 0 ) const
override

Definition at line 81 of file TGo4MainTree.cxx.

References fxFile, fxTree, and GO4TRACE.

◆ Write() [2/4]

Int_t TGo4MainTree::Write ( const char * dummy = nullptr,
Int_t option = 0,
Int_t bufsize = 0 ) const
override

References TGo4MainTree(), fxFile, and fxInstance.

◆ Write() [3/4]

Int_t TGo4MainTree::Write ( const char * dummy = nullptr,
Int_t option = 0,
Int_t bufsize = 0 )
override

Write tree content to file.

Definition at line 73 of file TGo4MainTree.cxx.

References fxFile, fxTree, and GO4TRACE.

Referenced by ~TGo4MainTree(), and TGo4AnalysisStepManager::AutoSave().

◆ Write() [4/4]

Int_t TGo4MainTree::Write ( const char * dummy = nullptr,
Int_t option = 0,
Int_t bufsize = 0 )
override

Write tree content to file.

◆ TGo4TreeSource

Definition at line 34 of file TGo4MainTree.h.

References TGo4TreeSource.

Referenced by TGo4TreeSource.

◆ TGo4TreeStore

TGo4TreeStore
friend

Definition at line 35 of file TGo4MainTree.h.

References TGo4TreeStore.

Referenced by TGo4TreeStore.

Field Documentation

◆ fgcFILENAME

const char * TGo4MainTree::fgcFILENAME = "Go4MainTree.root"
static

Standard suffix for file name.

Definition at line 52 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), and ~TGo4MainTree().

◆ fgcTREENAME

const char * TGo4MainTree::fgcTREENAME = "Main"
static

Standard go4 name of the main tree.

Definition at line 49 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), and ~TGo4MainTree().

◆ fgiAUTOSAVESIZE

const Int_t TGo4MainTree::fgiAUTOSAVESIZE = 10000000
static

Default tree autosave size.

Definition at line 58 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), and ~TGo4MainTree().

◆ fgiCOMPRESS

const Int_t TGo4MainTree::fgiCOMPRESS = 5
static

Default compression level.

Definition at line 55 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), and ~TGo4MainTree().

◆ fiCurrentIndex

Int_t TGo4MainTree::fiCurrentIndex {0}
private

Index number of the current event.

Definition at line 103 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), GetCurrentIndex(), IncCurrentIndex(), and SetCurrentIndex().

◆ fiMaxIndex

Int_t TGo4MainTree::fiMaxIndex {0}
private

Number of events stored in the Tree.

Used to check if the complete tree is already read.

Definition at line 100 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), and GetMaxIndex().

◆ fxFile

TFile * TGo4MainTree::fxFile {nullptr}
private

Definition at line 94 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), ~TGo4MainTree(), Write(), and Write().

◆ fxInstance

TGo4MainTree * TGo4MainTree::fxInstance = nullptr
staticprivate

Definition at line 92 of file TGo4MainTree.h.

Referenced by Exists(), Instance(), and Write().

◆ fxTree

TTree * TGo4MainTree::fxTree {nullptr}
private

Definition at line 96 of file TGo4MainTree.h.

Referenced by TGo4MainTree(), GetMaxIndex(), GetTree(), SetAutoSave(), Update(), Write(), and Write().


The documentation for this class was generated from the following files: