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

TGo4FileStore Class Reference

Event store which fills entries to an own root TTree in a TFile. More...

#include <TGo4FileStore.h>

Inheritance diagram for TGo4FileStore:

TGo4EventStore List of all members.

Public Methods

 TGo4FileStore ()
 TGo4FileStore (const char *name, Int_t splitlevel=1, Int_t compression=1, Bool_t overwrite=kFALSE, Int_t autosavesize=10000000, Int_t bufsize=64000)
 TGo4FileStore (TGo4FileStoreParameter *par)
virtual ~TGo4FileStore ()
virtual Int_t Store (TGo4EventElement *event)
 Stores eventelement event into the storage implementation. More...

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

virtual Int_t Store (TGo4Condition *conny)
 Saves a condition correllated with the current event into the storage. More...

virtual Int_t Store (TGo4Fitter *fitter)
 Saves a fitter correllated with the current event into the storage. More...

virtual Int_t Store (TFolder *fold)
 Saves a complete objects folder correllated with the current event into the storage. More...

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

void SetAutoSave (Int_t bytesinterval)
 Set the tree autosave byte interval. More...

TTree * GetTree ()
 Access to the Tree structure, for framework. More...


Static Public Attributes

const Text_t fgcEVBRANCHNAME [] = "Go4EventBranch."
 Standard go4 name of the branch used in all treestore and treesource implementations. More...

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

const Text_t fgcTREESUF [] = "xTree"
 Standard go4 suffix for tree name. More...

const Int_t fgiFILESPLITSIZE = 1000000000
 size in bytes for root tree-filesplit mechanism. More...


Private Methods

void WriteToStore (TNamed *ob)
 used by all Store methods to write with referencing event number in name. More...


Private Attributes

TFile * fxFile
TTree * fxTree
Bool_t fbBranchExists
 True if branch already exists. More...

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

Int_t fiSplit
 TBranch splitlevel. More...

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

Int_t fiFillCount
 counter of filled events. More...


Detailed Description

Event store which fills entries to an own root TTree in a TFile.

In contrast to TreeStore, we do not use the main go4 tree, but an independent one which need not correspond with the entry indices of all previous events. Disadvantage: difficult to correlate to input events; advantage: one entry of this tree may be composed from several subsequent input event entries...

Author:
J. Adamczewski
Since:
1/2001

Definition at line 41 of file TGo4FileStore.h.


Constructor & Destructor Documentation

TGo4FileStore::TGo4FileStore  
 

Definition at line 35 of file TGo4FileStore.cxx.

References fgiFILESPLITSIZE, fxFile, fxTree, and TRACE.

TGo4FileStore::TGo4FileStore const char *    name,
Int_t    splitlevel = 1,
Int_t    compression = 1,
Bool_t    overwrite = kFALSE,
Int_t    autosavesize = 10000000,
Int_t    bufsize = 64000
 

Definition at line 47 of file TGo4FileStore.cxx.

References TGo4Log::Debug(), fgcFILESUF, fgcTREESUF, fgiFILESPLITSIZE, TGo4EventStore::fguTXTLEN, fiFillCount, fxFile, fxTree, and TRACE.

TGo4FileStore::TGo4FileStore TGo4FileStoreParameter   par
 

Definition at line 100 of file TGo4FileStore.cxx.

References TGo4Log::Debug(), fgcFILESUF, fgcTREESUF, fgiFILESPLITSIZE, TGo4EventStore::fguTXTLEN, fiFillCount, fxFile, fxTree, and TRACE.

TGo4FileStore::~TGo4FileStore   [virtual]
 

Definition at line 150 of file TGo4FileStore.cxx.

References fxFile, fxTree, and TRACE.


Member Function Documentation

Int_t TGo4FileStore::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 178 of file TGo4FileStore.cxx.

References TGo4Log::Debug(), fbBranchExists, fgcEVBRANCHNAME, TGo4EventStore::fguTXTLEN, fiBufsize, fiFillCount, fiSplit, fxEvent, fxTree, and TRACE.

Int_t TGo4FileStore::Store TGo4Parameter   cali [virtual]
 

Saves a calibration object correllated with the current event into the storage.

Reimplemented from TGo4EventStore.

Definition at line 240 of file TGo4FileStore.cxx.

References WriteToStore().

Int_t TGo4FileStore::Store TGo4Condition   conny [virtual]
 

Saves a condition correllated with the current event into the storage.

Reimplemented from TGo4EventStore.

Definition at line 246 of file TGo4FileStore.cxx.

References WriteToStore().

Int_t TGo4FileStore::Store TGo4Fitter   fitter [virtual]
 

Saves a fitter correllated with the current event into the storage.

Reimplemented from TGo4EventStore.

Definition at line 252 of file TGo4FileStore.cxx.

References WriteToStore().

Int_t TGo4FileStore::Store TFolder *    fold [virtual]
 

Saves a complete objects folder correllated with the current event into the storage.

Reimplemented from TGo4EventStore.

Definition at line 258 of file TGo4FileStore.cxx.

References WriteToStore().

void TGo4FileStore::SetCompression Int_t    comp
 

Set the file compression level.

May be changed on the fly.

Definition at line 172 of file TGo4FileStore.cxx.

References fxFile, and TRACE.

void TGo4FileStore::SetAutoSave Int_t    bytesinterval
 

Set the tree autosave byte interval.

May be changed on the fly.

Definition at line 167 of file TGo4FileStore.cxx.

References fxTree, and TRACE.

TTree* TGo4FileStore::GetTree   [inline, virtual]
 

Access to the Tree structure, for framework.

Reimplemented from TGo4EventStore.

Definition at line 93 of file TGo4FileStore.h.

References fxTree.

void TGo4FileStore::WriteToStore TNamed *    ob [private]
 

used by all Store methods to write with referencing event number in name.

Definition at line 266 of file TGo4FileStore.cxx.

References TGo4EventStore::fguTXTLEN, fiFillCount, fxFile, and fxTree.

Referenced by Store().


Member Data Documentation

const Text_t TGo4FileStore::fgcEVBRANCHNAME = "Go4EventBranch." [static]
 

Standard go4 name of the branch used in all treestore and treesource implementations.

Definition at line 31 of file TGo4FileStore.cxx.

Referenced by Store().

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

Standard suffix for file name.

Definition at line 30 of file TGo4FileStore.cxx.

Referenced by TGo4FileSource::Open(), and TGo4FileStore().

const Text_t TGo4FileStore::fgcTREESUF = "xTree" [static]
 

Standard go4 suffix for tree name.

Definition at line 29 of file TGo4FileStore.cxx.

Referenced by TGo4FileStore().

const Int_t TGo4FileStore::fgiFILESPLITSIZE = 1000000000 [static]
 

size in bytes for root tree-filesplit mechanism.

Definition at line 32 of file TGo4FileStore.cxx.

Referenced by TGo4FileStore().

TFile* TGo4FileStore::fxFile [private]
 

Definition at line 100 of file TGo4FileStore.h.

Referenced by SetCompression(), TGo4FileStore(), WriteToStore(), and ~TGo4FileStore().

TTree* TGo4FileStore::fxTree [private]
 

Definition at line 102 of file TGo4FileStore.h.

Referenced by GetTree(), SetAutoSave(), Store(), TGo4FileStore(), WriteToStore(), and ~TGo4FileStore().

Bool_t TGo4FileStore::fbBranchExists [private]
 

True if branch already exists.

Used for automatic creation of new event branch within Store method.

Definition at line 106 of file TGo4FileStore.h.

Referenced by Store().

TGo4EventElement* TGo4FileStore::fxEvent [private]
 

Points to event structure to be filled into branch.

Definition at line 109 of file TGo4FileStore.h.

Referenced by Store().

Int_t TGo4FileStore::fiSplit [private]
 

TBranch splitlevel.

Definition at line 112 of file TGo4FileStore.h.

Referenced by Store().

Int_t TGo4FileStore::fiBufsize [private]
 

buffer size for tree branch.

Definition at line 115 of file TGo4FileStore.h.

Referenced by Store().

Int_t TGo4FileStore::fiFillCount [private]
 

counter of filled events.

Definition at line 118 of file TGo4FileStore.h.

Referenced by Store(), TGo4FileStore(), and WriteToStore().


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