GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Raw event source which reads entries from a root TTree in a TFile. More...
#include <TGo4FileSource.h>
Public Member Functions | |
TGo4FileSource () | |
TGo4FileSource (const char *name) | |
TGo4FileSource (TGo4FileSourceParameter *par) | |
virtual | ~TGo4FileSource () |
Bool_t | BuildEvent (TGo4EventElement *dest) override |
Fill the destination event dest from the tree. | |
![]() | |
TGo4EventSource () | |
TGo4EventSource (const char *name) | |
virtual | ~TGo4EventSource () |
virtual Bool_t | CheckEventClass (TClass *cl) |
Check that event class is supported by event source. | |
void | Clear (Option_t *opt="") override |
virtual const char * | GetActiveName () const |
Access to the name of the currently active source. | |
Int_t | GetCreateStatus () const |
Status value of server/file open. | |
const char * | GetErrMess () const |
Status/ error message of the last event. | |
Int_t | GetEventStatus () const |
Status of the last event. | |
Static Public Member Functions | |
static TList * | ProducesFilesList (const char *mask) |
Private Member Functions | |
Bool_t | CloseCurrentFile () |
Close currently open file. | |
Bool_t | OpenNextFile () |
Open next file from the files list. | |
Private Attributes | |
Bool_t | fbActivated {kFALSE} |
This flag is used for lazy init of tree in Eventbuilding methods. | |
Long64_t | fiCurrentEvent {0} |
Event number in current tree. | |
long int | fiGlobalEvent {0} |
Global event number, starting from the first tree. | |
Long64_t | fiMaxEvents {0} |
Number of events stored in the Tree. | |
TString | fxCurrentFileName |
current name of the file | |
TFile * | fxFile {nullptr} |
TList * | fxFilesNames {nullptr} |
list of files names | |
TGo4EventElement * | fxTopEvent {nullptr} |
pointer to top branch event | |
TTree * | fxTree {nullptr} |
Additional Inherited Members | |
![]() | |
static const Int_t | fgiTIMEOUTDEFAULT =1 |
Default timeout in seconds for event input. | |
![]() | |
enum | { fguTXTLEN = 256 } |
text length More... | |
![]() | |
void | SetCreateStatus (Int_t status) |
Status value of event source init (file/server open). | |
void | SetErrMess (const char *txt) |
To be used for modification of the message by the event source implementation. | |
void | SetEventStatus (Int_t status) |
Status of the last event. | |
void | ThrowEOF (Int_t creastat, Int_t errstat, const char *message,...) |
EOF thrower. | |
void | ThrowError (Int_t creastat, Int_t errstat, const char *message,...) |
Exception thrower. | |
Raw event source which reads entries from a root TTree in a TFile.
File is opened by ctor; method BuildEvent() iterates over tree. Needs pointer to external reference to event structure class which must match the structure of the tree entry New since 10/2004: Name of event element defines tree subbranch to be activated as partial input
Definition at line 37 of file TGo4FileSource.h.
TGo4FileSource::TGo4FileSource | ( | ) |
Definition at line 65 of file TGo4FileSource.cxx.
References TGo4EventSource::TGo4EventSource(), fbActivated, fiCurrentEvent, fiGlobalEvent, fiMaxEvents, fxFile, fxFilesNames, fxTopEvent, and fxTree.
TGo4FileSource::TGo4FileSource | ( | TGo4FileSourceParameter * | par | ) |
Definition at line 47 of file TGo4FileSource.cxx.
References TGo4EventSource::TGo4EventSource(), fbActivated, fiCurrentEvent, fiGlobalEvent, fiMaxEvents, fxFile, fxFilesNames, fxTopEvent, fxTree, OpenNextFile(), ProducesFilesList(), and TGo4EventSource::ThrowError().
TGo4FileSource::TGo4FileSource | ( | const char * | name | ) |
Definition at line 30 of file TGo4FileSource.cxx.
References TGo4EventSource::TGo4EventSource(), fbActivated, fiCurrentEvent, fiGlobalEvent, fiMaxEvents, fxFile, fxFilesNames, fxTopEvent, fxTree, OpenNextFile(), ProducesFilesList(), and TGo4EventSource::ThrowError().
|
virtual |
Definition at line 79 of file TGo4FileSource.cxx.
References CloseCurrentFile(), and fxFilesNames.
|
overridevirtual |
Fill the destination event dest from the tree.
If end of tree is reached, the current event counter is reset and a kFALSE value is returned.
Reimplemented from TGo4EventSource.
Definition at line 199 of file TGo4FileSource.cxx.
References fbActivated, fiCurrentEvent, fiGlobalEvent, fiMaxEvents, fxCurrentFileName, fxTopEvent, fxTree, TGo4Log::Info(), OpenNextFile(), TGo4EventElement::synchronizeWithTree(), TGo4EventSource::ThrowEOF(), and TGo4EventSource::ThrowError().
|
private |
Close currently open file.
Definition at line 181 of file TGo4FileSource.cxx.
References fbActivated, fiCurrentEvent, fiMaxEvents, fxCurrentFileName, fxFile, fxTopEvent, fxTree, and TGo4Log::Info().
Referenced by ~TGo4FileSource(), and OpenNextFile().
|
private |
Open next file from the files list.
Definition at line 150 of file TGo4FileSource.cxx.
References CloseCurrentFile(), fiMaxEvents, fxCurrentFileName, fxFile, fxFilesNames, fxTree, TGo4EventSource::SetCreateStatus(), and TGo4EventSource::ThrowError().
Referenced by TGo4FileSource(), TGo4FileSource(), and BuildEvent().
|
static |
Definition at line 89 of file TGo4FileSource.cxx.
References TGo4FileStore::fgcFILESUF.
Referenced by TGo4FileSource(), TGo4FileSource(), and TGo4MbsFile::AddFileName().
|
private |
This flag is used for lazy init of tree in Eventbuilding methods.
Definition at line 73 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), BuildEvent(), and CloseCurrentFile().
|
private |
Event number in current tree.
Definition at line 67 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), BuildEvent(), and CloseCurrentFile().
|
private |
Global event number, starting from the first tree.
Definition at line 70 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), and BuildEvent().
|
private |
Number of events stored in the Tree.
Used to check if the complete tree is already read.
Definition at line 64 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), BuildEvent(), CloseCurrentFile(), and OpenNextFile().
|
private |
current name of the file
Definition at line 82 of file TGo4FileSource.h.
Referenced by BuildEvent(), CloseCurrentFile(), and OpenNextFile().
|
private |
Definition at line 58 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), CloseCurrentFile(), and OpenNextFile().
|
private |
list of files names
Definition at line 79 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), ~TGo4FileSource(), and OpenNextFile().
|
private |
pointer to top branch event
Definition at line 76 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), BuildEvent(), and CloseCurrentFile().
|
private |
Definition at line 60 of file TGo4FileSource.h.
Referenced by TGo4FileSource(), TGo4FileSource(), TGo4FileSource(), BuildEvent(), CloseCurrentFile(), and OpenNextFile().