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

#include <TGo4FileStore.h>

+ Inheritance diagram for TGo4FileStore:

Public Member Functions

 TGo4FileStore ()
 
 TGo4FileStore (const char *name, Int_t splitlevel=1, Int_t compression=1, Bool_t overwrite=kFALSE, Int_t autosavesize=10000, Int_t bufsize=64000)
 
 TGo4FileStore (TGo4FileStoreParameter *par)
 
virtual ~TGo4FileStore ()
 
Int_t Store (TGo4EventElement *event) override
 
Int_t Store (TGo4Parameter *cali) override
 
Int_t Store (TGo4Condition *conny) override
 
Int_t Store (TGo4Fitter *fitter) override
 
Int_t Store (TFolder *fold) override
 
void SetCompression (Int_t comp)
 
void SetAutoSave (Int_t interval)
 
TTree * GetTree () override
 
- Public Member Functions inherited from TGo4EventStore
 TGo4EventStore ()
 
 TGo4EventStore (const char *name)
 
virtual ~TGo4EventStore ()
 
void Clear (Option_t *opt="") override
 

Static Public Member Functions

static void SetMaxTreeSize (Long64_t sz)
 
static Long64_t GetMaxTreeSize ()
 

Static Public Attributes

static const char * fgcEVBRANCHNAME = "Go4EventBranch."
 
static const char * fgcFILESUF = ".root"
 
static const char * fgcTREESUF = "xTree"
 
static Long64_t fgiFILESPLITSIZE = 1900000000
 

Private Member Functions

void WriteToStore (TNamed *ob)
 

Private Attributes

TFile * fxFile {nullptr}
 
TTree * fxTree {nullptr}
 
Bool_t fbBranchExists {kFALSE}
 
TGo4EventElementfxEvent {nullptr}
 
Int_t fiSplit {0}
 
Int_t fiBufsize {0}
 
Int_t fiFillCount {0}
 

Additional Inherited Members

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

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 36 of file TGo4FileStore.h.

Constructor & Destructor Documentation

◆ TGo4FileStore() [1/3]

TGo4FileStore::TGo4FileStore ( )

Definition at line 33 of file TGo4FileStore.cxx.

References fgiFILESPLITSIZE, and GO4TRACE.

◆ TGo4FileStore() [2/3]

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

◆ TGo4FileStore() [3/3]

TGo4FileStore::TGo4FileStore ( TGo4FileStoreParameter par)

◆ ~TGo4FileStore()

TGo4FileStore::~TGo4FileStore ( )
virtual

Definition at line 154 of file TGo4FileStore.cxx.

References fxFile, fxTree, and GO4TRACE.

Member Function Documentation

◆ GetMaxTreeSize()

Long64_t TGo4FileStore::GetMaxTreeSize ( )
static

Definition at line 258 of file TGo4FileStore.cxx.

References fgiFILESPLITSIZE.

◆ GetTree()

TTree* TGo4FileStore::GetTree ( )
inlineoverridevirtual

Access to the Tree structure, for framework

Reimplemented from TGo4EventStore.

Definition at line 93 of file TGo4FileStore.h.

References fxTree, and WriteToStore().

◆ SetAutoSave()

void TGo4FileStore::SetAutoSave ( Int_t  interval)

Set the tree autosave interval. May be changed on the fly. for new ROOT versions: interval>0 means number of entries, interval<0: number of bytes

Definition at line 167 of file TGo4FileStore.cxx.

References fxTree, and GO4TRACE.

◆ SetCompression()

void TGo4FileStore::SetCompression ( Int_t  comp)

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

Definition at line 173 of file TGo4FileStore.cxx.

References fxFile, and GO4TRACE.

◆ SetMaxTreeSize()

void TGo4FileStore::SetMaxTreeSize ( Long64_t  sz)
static

Definition at line 253 of file TGo4FileStore.cxx.

References fgiFILESPLITSIZE.

Referenced by main().

◆ Store() [1/5]

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

References TGo4Log::Debug(), fbBranchExists, fgcEVBRANCHNAME, fiBufsize, fiFillCount, fiSplit, fxEvent, fxTree, GO4TRACE, and TGo4EventElement::makeBranch().

◆ Store() [2/5]

Int_t TGo4FileStore::Store ( TGo4Parameter cali)
overridevirtual

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

Reimplemented from TGo4EventStore.

Definition at line 215 of file TGo4FileStore.cxx.

References WriteToStore().

◆ Store() [3/5]

Int_t TGo4FileStore::Store ( TGo4Condition conny)
overridevirtual

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

Reimplemented from TGo4EventStore.

Definition at line 221 of file TGo4FileStore.cxx.

References WriteToStore().

◆ Store() [4/5]

Int_t TGo4FileStore::Store ( TGo4Fitter fitter)
overridevirtual

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

Reimplemented from TGo4EventStore.

Definition at line 227 of file TGo4FileStore.cxx.

References WriteToStore().

◆ Store() [5/5]

Int_t TGo4FileStore::Store ( TFolder *  fold)
overridevirtual

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

Reimplemented from TGo4EventStore.

Definition at line 233 of file TGo4FileStore.cxx.

References WriteToStore().

◆ WriteToStore()

void TGo4FileStore::WriteToStore ( TNamed *  ob)
private

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

Definition at line 239 of file TGo4FileStore.cxx.

References fiFillCount, fxFile, and fxTree.

Referenced by GetTree(), and Store().

Member Data Documentation

◆ fbBranchExists

Bool_t TGo4FileStore::fbBranchExists {kFALSE}
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().

◆ fgcEVBRANCHNAME

const char * TGo4FileStore::fgcEVBRANCHNAME = "Go4EventBranch."
static

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

Definition at line 81 of file TGo4FileStore.h.

Referenced by Store().

◆ fgcFILESUF

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

Standard suffix for file name

Definition at line 84 of file TGo4FileStore.h.

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

◆ fgcTREESUF

const char * TGo4FileStore::fgcTREESUF = "xTree"
static

Standard go4 suffix for tree name

Definition at line 87 of file TGo4FileStore.h.

Referenced by TGo4FileStore().

◆ fgiFILESPLITSIZE

Long64_t TGo4FileStore::fgiFILESPLITSIZE = 1900000000
static

size in bytes for root tree-filesplit mechanism.

Definition at line 90 of file TGo4FileStore.h.

Referenced by GetMaxTreeSize(), SetMaxTreeSize(), and TGo4FileStore().

◆ fiBufsize

Int_t TGo4FileStore::fiBufsize {0}
private

buffer size for tree branch.

Definition at line 115 of file TGo4FileStore.h.

Referenced by Store(), and TGo4FileStore().

◆ fiFillCount

Int_t TGo4FileStore::fiFillCount {0}
private

counter of filled events.

Definition at line 118 of file TGo4FileStore.h.

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

◆ fiSplit

Int_t TGo4FileStore::fiSplit {0}
private

TBranch splitlevel.

Definition at line 112 of file TGo4FileStore.h.

Referenced by Store(), and TGo4FileStore().

◆ fxEvent

TGo4EventElement* TGo4FileStore::fxEvent {nullptr}
private

Points to event structure to be filled into branch.

Definition at line 109 of file TGo4FileStore.h.

Referenced by Store().

◆ fxFile

TFile* TGo4FileStore::fxFile {nullptr}
private

Definition at line 100 of file TGo4FileStore.h.

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

◆ fxTree

TTree* TGo4FileStore::fxTree {nullptr}
private

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