GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
TGo4TreeStore Class Reference

#include <TGo4TreeStore.h>

+ Inheritance diagram for TGo4TreeStore:

Public Member Functions

 TGo4TreeStore (const char *name, TGo4EventElement *event, Int_t splitlevel=1, Int_t bufsize=64000, const char *filename=nullptr, Int_t compression=5)
 
 TGo4TreeStore ()
 
 TGo4TreeStore (TGo4TreeStoreParameter *par, TGo4EventElement *event)
 
virtual ~TGo4TreeStore ()
 
Int_t Store (TGo4EventElement *event) override
 
void SetCompression (Int_t comp)
 
Int_t Store (TGo4Parameter *cali) override
 
- Public Member Functions inherited from TGo4EventStore
 TGo4EventStore ()
 
 TGo4EventStore (const char *name)
 
virtual ~TGo4EventStore ()
 
virtual Int_t Store (TGo4Condition *conny)
 
virtual Int_t Store (TGo4Fitter *fitter)
 
virtual Int_t Store (TFolder *fold)
 
virtual TTree * GetTree ()
 
void Clear (Option_t *opt="") override
 

Static Public Attributes

static const char * fgcFILESUF = ".root"
 

Private Attributes

TFile * fxFile {nullptr}
 
TGo4MainTreefxSingletonTree {nullptr}
 
TTree * fxTree {nullptr}
 
TBranch * fxBranch {nullptr}
 
TGo4EventElementfxEvent {nullptr}
 
TGo4EventCalibrationfxCalibration {nullptr}
 
TString fcEventClass
 
Int_t fiSplit {0}
 
Int_t fiBufsize {0}
 

Additional Inherited Members

- Protected Types inherited from TGo4EventStore
enum  { fguTXTLEN = 256 }
 

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() [1/3]

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

◆ TGo4TreeStore() [2/3]

TGo4TreeStore::TGo4TreeStore ( )

Definition at line 110 of file TGo4TreeStore.cxx.

References GO4TRACE.

◆ TGo4TreeStore() [3/3]

TGo4TreeStore::TGo4TreeStore ( TGo4TreeStoreParameter par,
TGo4EventElement event 
)

◆ ~TGo4TreeStore()

TGo4TreeStore::~TGo4TreeStore ( )
virtual

Definition at line 116 of file TGo4TreeStore.cxx.

References GO4TRACE.

Member Function Documentation

◆ SetCompression()

void TGo4TreeStore::SetCompression ( Int_t  comp)

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

Definition at line 162 of file TGo4TreeStore.cxx.

References fxFile, and GO4TRACE.

◆ Store() [1/2]

Int_t TGo4TreeStore::Store ( TGo4EventElement event)
overridevirtual

Stores eventelement event into the storage implementation. May be a file, a root tree, a socket to a viewer...

Implements TGo4EventStore.

Definition at line 122 of file TGo4TreeStore.cxx.

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

◆ Store() [2/2]

Int_t TGo4TreeStore::Store ( TGo4Parameter cali)
overridevirtual

Saves a calibration object correlated 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 148 of file TGo4TreeStore.cxx.

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

Member Data Documentation

◆ fcEventClass

TString TGo4TreeStore::fcEventClass
private

Class name of the event associated with this store.

Definition at line 96 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

◆ fgcFILESUF

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

Standard suffix for file name

Definition at line 70 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

◆ fiBufsize

Int_t TGo4TreeStore::fiBufsize {0}
private

buffer size for tree branch.

Definition at line 102 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

◆ fiSplit

Int_t TGo4TreeStore::fiSplit {0}
private

TBranch splitlevel.

Definition at line 99 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().

◆ fxBranch

TBranch* TGo4TreeStore::fxBranch {nullptr}
private

The branch representing our store.

Definition at line 87 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

◆ fxCalibration

TGo4EventCalibration* TGo4TreeStore::fxCalibration {nullptr}
private

Points to calibration structure to be filled into branch.

Definition at line 93 of file TGo4TreeStore.h.

◆ fxEvent

TGo4EventElement* TGo4TreeStore::fxEvent {nullptr}
private

Points to event structure to be filled into branch.

Definition at line 90 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

◆ fxFile

TFile* TGo4TreeStore::fxFile {nullptr}
private

Optional file where our branches are located. By default, branches are written to the same file as the main tree.

Definition at line 76 of file TGo4TreeStore.h.

Referenced by SetCompression(), and TGo4TreeStore().

◆ fxSingletonTree

TGo4MainTree* TGo4TreeStore::fxSingletonTree {nullptr}
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 81 of file TGo4TreeStore.h.

Referenced by Store(), and TGo4TreeStore().

◆ fxTree

TTree* TGo4TreeStore::fxTree {nullptr}
private

Reference to the external main tree.

Definition at line 84 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore().


The documentation for this class was generated from the following files: