Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class 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 Member Functions

 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.
void SetCompression (Int_t comp)
 Set the file compression level.
virtual Int_t Store (TGo4Parameter *cali)
 Saves a calibration object correllated with the current event into the storage.

Static Public Attributes

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

Private Attributes

TFile * fxFile
 Optional file where our branches are located.
TGo4MainTreefxSingletonTree
 Reference to external tree singleton wrapper instance.
TTree * fxTree
 Reference to the external main tree.
TBranch * fxBranch
 The branch representing our store.
TGo4EventElementfxEvent
 Points to event structure to be filled into branch.
TGo4EventCalibrationfxCalibration
 Points to calibration structure to be filled into branch.
Text_t fcEventClass [256]
 Class name of the event associated with this store.
Int_t fiSplit
 TBranch splitlevel.
Int_t fiBufsize
 buffer size for tree branch.

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 41 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 31 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 135 of file TGo4TreeStore.cxx.

References TRACE.

TGo4TreeStore::TGo4TreeStore TGo4TreeStoreParameter par,
TGo4EventElement event
 

Definition at line 86 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 144 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 152 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 203 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 181 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 29 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 75 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 80 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

TTree* TGo4TreeStore::fxTree [private]
 

Reference to the external main tree.

Definition at line 83 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

TBranch* TGo4TreeStore::fxBranch [private]
 

The branch representing our store.

Definition at line 86 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 89 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 92 of file TGo4TreeStore.h.

Text_t TGo4TreeStore::fcEventClass[256] [private]
 

Class name of the event associated with this store.

Definition at line 95 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

Int_t TGo4TreeStore::fiSplit [private]
 

TBranch splitlevel.

Definition at line 98 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

Int_t TGo4TreeStore::fiBufsize [private]
 

buffer size for tree branch.

Definition at line 101 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().


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