Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4TreeStore Class Reference

Storage instance using the central main go4 tree which is accessible as singleton. More...

#include <TGo4TreeStore.h>

Inheritance diagram for TGo4TreeStore:

TGo4EventStore List of all members.

Public Methods

 TGo4TreeStore (const char *name, TGo4EventElement *event, Int_t splitlevel=1, Int_t bufsize=64000, Text_t *filename=0, Int_t compression=5)
 TGo4TreeStore ()
 TGo4TreeStore (TGo4TreeStoreParameter *par, TGo4EventElement *event)
virtual ~TGo4TreeStore ()
virtual Int_t Store (TGo4EventElement *event)
 Stores eventelement event into the storage implementation. More...

void SetCompression (Int_t comp)
 Set the file compression level. More...

virtual Int_t Store (TGo4Parameter *cali)
 Saves a calibration object correllated with the current event into the storage. More...


Static Public Attributes

const Text_t fgcFILESUF [] = ".root"
 Standard suffix for file name. More...


Private Attributes

TFile * fxFile
 Optional file where our branches are located. More...

TGo4MainTreefxSingletonTree
 Reference to external tree singleton wrapper instance. More...

TTree * fxTree
 Reference to the external main tree. More...

TBranch * fxBranch
 The branch representing our store. More...

TGo4EventElementfxEvent
 Points to event structure to be filled into branch. More...

TGo4EventCalibrationfxCalibration
 Points to calibration structure to be filled into branch. More...

Text_t fcEventClass [256]
 Class name of the event associated with this store. More...

Int_t fiSplit
 TBranch splitlevel. More...

Int_t fiBufsize
 buffer size for tree branch. More...


Detailed Description

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.

Author:
J. Adamczewski
Since:
1/2001

Definition at line 43 of file TGo4TreeStore.h.


Constructor & Destructor Documentation

TGo4TreeStore::TGo4TreeStore const char *    name,
TGo4EventElement   event,
Int_t    splitlevel = 1,
Int_t    bufsize = 64000,
Text_t *    filename = 0,
Int_t    compression = 5
 

Definition at line 25 of file TGo4TreeStore.cxx.

References TGo4Log::Debug(), fcEventClass, fgcFILESUF, TGo4EventStore::fguTXTLEN, fiBufsize, fiSplit, fxBranch, fxEvent, fxFile, fxSingletonTree, fxTree, TGo4MainTree::GetTree(), TGo4MainTree::Instance(), and TRACE.

TGo4TreeStore::TGo4TreeStore  
 

Definition at line 129 of file TGo4TreeStore.cxx.

References TRACE.

TGo4TreeStore::TGo4TreeStore TGo4TreeStoreParameter   par,
TGo4EventElement   event
 

Definition at line 80 of file TGo4TreeStore.cxx.

References TGo4Log::Debug(), fcEventClass, fgcFILESUF, TGo4EventStore::fguTXTLEN, fiBufsize, TGo4TreeStoreParameter::fiCompression, fiSplit, fxBranch, TGo4TreeStoreParameter::fxBranchFile, fxEvent, fxFile, fxSingletonTree, fxTree, TGo4MainTree::GetTree(), TGo4MainTree::Instance(), and TRACE.

TGo4TreeStore::~TGo4TreeStore   [virtual]
 

Definition at line 138 of file TGo4TreeStore.cxx.

References TRACE.


Member Function Documentation

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 146 of file TGo4TreeStore.cxx.

References TGo4EventElement::Clear(), TGo4Log::Debug(), fcEventClass, fxBranch, fxEvent, TGo4EventElement::SetValid(), and TRACE.

void TGo4TreeStore::SetCompression Int_t    comp
 

Set the file compression level.

May be changed on the fly.

Definition at line 197 of file TGo4TreeStore.cxx.

References fxFile, and TRACE.

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 175 of file TGo4TreeStore.cxx.

References TGo4MainTree::fxFile, fxSingletonTree, TGo4MainTree::GetCurrentIndex(), and TRACE.


Member Data Documentation

const Text_t TGo4TreeStore::fgcFILESUF = ".root" [static]
 

Standard suffix for file name.

Definition at line 23 of file TGo4TreeStore.cxx.

Referenced by 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 77 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 82 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

TTree* TGo4TreeStore::fxTree [private]
 

Reference to the external main tree.

Definition at line 85 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

TBranch* TGo4TreeStore::fxBranch [private]
 

The branch representing our store.

Definition at line 88 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

TGo4EventElement* TGo4TreeStore::fxEvent [private]
 

Points to event structure to be filled into branch.

Definition at line 91 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 94 of file TGo4TreeStore.h.

Text_t TGo4TreeStore::fcEventClass[256] [private]
 

Class name of the event associated with this store.

Definition at line 97 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

Int_t TGo4TreeStore::fiSplit [private]
 

TBranch splitlevel.

Definition at line 100 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

Int_t TGo4TreeStore::fiBufsize [private]
 

buffer size for tree branch.

Definition at line 103 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:59 2005 for Go4-v2.10-5 by doxygen1.2.15