Public Member Functions | Static Public Attributes | Private Attributes

TGo4TreeStore Class Reference

#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, const char *filename=0, Int_t compression=5)
 TGo4TreeStore ()
 TGo4TreeStore (TGo4TreeStoreParameter *par, TGo4EventElement *event)
virtual ~TGo4TreeStore ()
virtual Int_t Store (TGo4EventElement *event)
void SetCompression (Int_t comp)
virtual Int_t Store (TGo4Parameter *cali)

Static Public Attributes

static const char * fgcFILESUF = ".root"

Private Attributes

TFile * fxFile
TGo4MainTreefxSingletonTree
TTree * fxTree
TBranch * fxBranch
TGo4EventElementfxEvent
TGo4EventCalibrationfxCalibration
TString fcEventClass
Int_t fiSplit
Int_t fiBufsize

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 39 of file TGo4TreeStore.h.


Constructor & Destructor Documentation

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

Definition at line 112 of file TGo4TreeStore.cxx.

References GO4TRACE.

TGo4TreeStore::~TGo4TreeStore (  )  [virtual]

Definition at line 121 of file TGo4TreeStore.cxx.

References GO4TRACE.


Member Function Documentation

void TGo4TreeStore::SetCompression ( Int_t  comp  ) 

Set the file compression level. May be changed on the fly.

Definition at line 169 of file TGo4TreeStore.cxx.

References fxFile, and GO4TRACE.

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

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

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

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


Member Data Documentation

TString TGo4TreeStore::fcEventClass [private]

Class name of the event associated with this store.

Definition at line 93 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

const char * TGo4TreeStore::fgcFILESUF = ".root" [static]

Standard suffix for file name

Definition at line 67 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

Int_t TGo4TreeStore::fiBufsize [private]

buffer size for tree branch.

Definition at line 99 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

Int_t TGo4TreeStore::fiSplit [private]

TBranch splitlevel.

Definition at line 96 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

TBranch* TGo4TreeStore::fxBranch [private]

The branch representing our store.

Definition at line 84 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

Points to calibration structure to be filled into branch.

Definition at line 90 of file TGo4TreeStore.h.

Points to event structure to be filled into branch.

Definition at line 87 of file TGo4TreeStore.h.

Referenced by Store(), and 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 73 of file TGo4TreeStore.h.

Referenced by SetCompression(), and TGo4TreeStore().

Reference to external tree singleton wrapper instance. Is initialized once at the start and used to access the singleton member functions.

Definition at line 78 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

TTree* TGo4TreeStore::fxTree [private]

Reference to the external main tree.

Definition at line 81 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines