Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4MainTree Class Reference

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

#include <TGo4MainTree.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Static Public Attributes

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

Protected Member Functions

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

Private Attributes

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

Static Private Attributes

static TGo4MainTreefxInstance = 0

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 34 of file TGo4MainTree.h.


Constructor & Destructor Documentation

TGo4MainTree::TGo4MainTree  )  [protected]
 

Definition at line 33 of file TGo4MainTree.cxx.

References TGo4Log::Debug(), fgcFILENAME, fgcTREENAME, fgiAUTOSAVESIZE, fgiCOMPRESS, fiMaxIndex, fxFile, fxTree, and TRACE.

Referenced by Instance().

TGo4MainTree::~TGo4MainTree  )  [virtual]
 

Definition at line 59 of file TGo4MainTree.cxx.

References fxFile, TRACE, and Write().


Member Function Documentation

TTree* TGo4MainTree::GetTree  )  [inline, protected]
 

Access to the tree.

For friends only, i.e TreeSource and TreeStore.

Definition at line 41 of file TGo4MainTree.h.

References fxTree.

Referenced by TGo4TreeSource::Open(), and TGo4TreeStore::TGo4TreeStore().

TGo4MainTree * TGo4MainTree::Instance  )  [static]
 

Definition at line 68 of file TGo4MainTree.cxx.

References fxInstance, TGo4MainTree(), and TRACE.

Referenced by TGo4AnalysisStepManager::AutoSave(), TGo4TreeSource::Open(), TGo4AnalysisStepManager::ProcessAnalysisSteps(), SetAutoSave(), and TGo4TreeStore::TGo4TreeStore().

static Bool_t TGo4MainTree::Exists  )  [inline, static]
 

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 66 of file TGo4MainTree.h.

References fxInstance.

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

Int_t TGo4MainTree::GetCurrentIndex  )  const [inline]
 

Definition at line 68 of file TGo4MainTree.h.

References fiCurrentIndex.

Referenced by TGo4TreeSource::BuildEvent(), TGo4TreeStore::Store(), Update(), and TGo4TreeSource::~TGo4TreeSource().

Int_t TGo4MainTree::IncCurrentIndex  )  [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 73 of file TGo4MainTree.h.

References fiCurrentIndex.

Referenced by Update().

void TGo4MainTree::SetCurrentIndex Int_t  number = 0  )  [inline]
 

Definition at line 75 of file TGo4MainTree.h.

References fiCurrentIndex.

Int_t TGo4MainTree::GetMaxIndex  ) 
 

Definition at line 118 of file TGo4MainTree.cxx.

References fiMaxIndex, and fxTree.

Referenced by Update(), and TGo4TreeSource::~TGo4TreeSource().

void TGo4MainTree::SetAutoSave Int_t  bytesinterval  ) 
 

Set the tree autosave byte interval.

May be changed on the fly.

Definition at line 79 of file TGo4MainTree.cxx.

References fxTree, Instance(), and TRACE.

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

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

Int_t TGo4MainTree::Write const char *  dummy = 0,
Int_t  option = 0,
Int_t  bufsize = 0
[virtual]
 

Write tree content to file.

Definition at line 86 of file TGo4MainTree.cxx.

References fxFile, fxTree, and TRACE.

Referenced by ~TGo4MainTree().

Int_t TGo4MainTree::Write const char *  dummy = 0,
Int_t  option = 0,
Int_t  bufsize = 0
const [virtual]
 

Definition at line 94 of file TGo4MainTree.cxx.

References fxFile, fxTree, and TRACE.


Friends And Related Function Documentation

friend class TGo4TreeSource [friend]
 

Definition at line 35 of file TGo4MainTree.h.

friend class TGo4TreeStore [friend]
 

Definition at line 36 of file TGo4MainTree.h.


Member Data Documentation

const Text_t TGo4MainTree::fgcTREENAME = "Main" [static]
 

Standard go4 name of the main tree.

Definition at line 27 of file TGo4MainTree.cxx.

Referenced by TGo4MainTree().

const Text_t TGo4MainTree::fgcFILENAME = "Go4MainTree.root" [static]
 

Standard suffix for file name.

Definition at line 28 of file TGo4MainTree.cxx.

Referenced by TGo4MainTree().

const Int_t TGo4MainTree::fgiCOMPRESS = 5 [static]
 

Default compression level.

Definition at line 30 of file TGo4MainTree.cxx.

Referenced by TGo4MainTree().

const Int_t TGo4MainTree::fgiAUTOSAVESIZE = 10000000 [static]
 

Default tree autosave size.

Definition at line 31 of file TGo4MainTree.cxx.

Referenced by TGo4MainTree().

TGo4MainTree * TGo4MainTree::fxInstance = 0 [static, private]
 

Definition at line 25 of file TGo4MainTree.cxx.

Referenced by Exists(), and Instance().

TFile* TGo4MainTree::fxFile [private]
 

Definition at line 95 of file TGo4MainTree.h.

Referenced by TGo4TreeStore::Store(), TGo4MainTree(), Write(), and ~TGo4MainTree().

TTree* TGo4MainTree::fxTree [private]
 

Definition at line 97 of file TGo4MainTree.h.

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

Int_t TGo4MainTree::fiMaxIndex [private]
 

Number of events stored in the Tree.

Used to check if the complete tree is already read.

Definition at line 101 of file TGo4MainTree.h.

Referenced by GetMaxIndex(), and TGo4MainTree().

Int_t TGo4MainTree::fiCurrentIndex [private]
 

Index number of the current event.

Definition at line 104 of file TGo4MainTree.h.

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


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:01:04 2008 for Go4-v3.04-1 by  doxygen 1.4.2