GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4TreeStore Class Reference

Go4 TTree storage. More...

#include <TGo4TreeStore.h>

+ Inheritance diagram for TGo4TreeStore:

Public Member Functions

 TGo4TreeStore ()
 
 TGo4TreeStore (const char *name, TGo4EventElement *event, Int_t splitlevel=1, Int_t bufsize=64000, const char *filename=nullptr, Int_t compression=5)
 
 TGo4TreeStore (TGo4TreeStoreParameter *par, TGo4EventElement *event)
 
virtual ~TGo4TreeStore ()
 
void SetCompression (Int_t comp)
 Set the file compression level.
 
virtual Int_t Store (TFolder *fold)
 Expose all Store methods to avoid compiler warnings, A.Neiser.
 
virtual Int_t Store (TGo4Condition *conny)
 Expose all Store methods to avoid compiler warnings, A.Neiser.
 
Int_t Store (TGo4EventElement *event) override
 Stores eventelement event into the storage implementation.
 
virtual Int_t Store (TGo4Fitter *fitter)
 Expose all Store methods to avoid compiler warnings, A.Neiser.
 
Int_t Store (TGo4Parameter *cali) override
 Saves a calibration object correlated with the current event into the storage.
 
- Public Member Functions inherited from TGo4EventStore
 TGo4EventStore ()
 
 TGo4EventStore (const char *name)
 
virtual ~TGo4EventStore ()
 
void Clear (Option_t *opt="") override
 We overwrite the default TNamed::Clear that would erase our name and title!
 
virtual TTree * GetTree ()
 Access to a tree that might belong to this storage implementation.
 

Static Public Attributes

static const char * fgcFILESUF = ".root"
 Standard suffix for file name.
 

Private Attributes

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

Additional Inherited Members

- Protected Types inherited from TGo4EventStore
enum  { fguTXTLEN = 256 }
 text length More...
 

Detailed Description

Go4 TTree storage.

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() [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 TGo4EventStore::TGo4EventStore(), fiBufsize, fiSplit, and GO4TRACE.

◆ TGo4TreeStore() [3/3]

◆ ~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/5]

Int_t TGo4EventStore::Store ( TFolder * fold)
virtual

Expose all Store methods to avoid compiler warnings, A.Neiser.

Reimplemented from TGo4EventStore.

Definition at line 63 of file TGo4EventStore.cxx.

◆ Store() [2/5]

Int_t TGo4EventStore::Store ( TGo4Condition * conny)
virtual

Expose all Store methods to avoid compiler warnings, A.Neiser.

Reimplemented from TGo4EventStore.

Definition at line 55 of file TGo4EventStore.cxx.

◆ Store() [3/5]

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 TGo4Log::Debug(), fcEventClass, fxBranch, fxEvent, and GO4TRACE.

◆ Store() [4/5]

Int_t TGo4EventStore::Store ( TGo4Fitter * fitter)
virtual

Expose all Store methods to avoid compiler warnings, A.Neiser.

Reimplemented from TGo4EventStore.

Definition at line 59 of file TGo4EventStore.cxx.

◆ Store() [5/5]

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 fxSingletonTree, and GO4TRACE.

Field Documentation

◆ fcEventClass

TString TGo4TreeStore::fcEventClass
private

Class name of the event associated with this store.

Definition at line 98 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().

◆ fgcFILESUF

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

Standard suffix for file name.

Definition at line 72 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), and TGo4TreeStore().

◆ fiBufsize

Int_t TGo4TreeStore::fiBufsize {0}
private

buffer size for tree branch.

Definition at line 104 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), TGo4TreeStore(), and TGo4TreeStore().

◆ fiSplit

Int_t TGo4TreeStore::fiSplit {0}
private

TBranch splitlevel.

Definition at line 101 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), TGo4TreeStore(), and TGo4TreeStore().

◆ fxBranch

TBranch* TGo4TreeStore::fxBranch {nullptr}
private

The branch representing our store.

Definition at line 89 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().

◆ fxCalibration

TGo4EventCalibration* TGo4TreeStore::fxCalibration {nullptr}
private

Points to calibration structure to be filled into branch.

Definition at line 95 of file TGo4TreeStore.h.

◆ fxEvent

TGo4EventElement* TGo4TreeStore::fxEvent {nullptr}
private

Points to event structure to be filled into branch.

Definition at line 92 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().

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

Referenced by TGo4TreeStore(), TGo4TreeStore(), and SetCompression().

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

Referenced by TGo4TreeStore(), TGo4TreeStore(), and Store().

◆ fxTree

TTree* TGo4TreeStore::fxTree {nullptr}
private

Reference to the external main tree.

Definition at line 86 of file TGo4TreeStore.h.

Referenced by TGo4TreeStore(), and TGo4TreeStore().


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