#include <TGo4FileSource.h>
Public Member Functions | |
TGo4FileSource () | |
TGo4FileSource (TGo4FileSourceParameter *par) | |
TGo4FileSource (const char *name) | |
virtual | ~TGo4FileSource () |
virtual Bool_t | BuildEvent (TGo4EventElement *dest) |
Static Public Member Functions | |
static TList * | ProducesFilesList (const char *mask) |
Private Member Functions | |
Bool_t | OpenNextFile () |
Bool_t | CloseCurrentFile () |
Private Attributes | |
TFile * | fxFile |
TTree * | fxTree |
Long64_t | fiMaxEvents |
Long64_t | fiCurrentEvent |
long int | fiGlobalEvent |
Bool_t | fbActivated |
TGo4EventElement * | fxTopEvent |
TList * | fxFilesNames |
TString | fxCurrentFileName |
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 67 of file TGo4FileSource.cxx.
TGo4FileSource::TGo4FileSource | ( | TGo4FileSourceParameter * | par | ) |
Definition at line 49 of file TGo4FileSource.cxx.
References fxFilesNames, OpenNextFile(), ProducesFilesList(), and TGo4EventSource::ThrowError().
TGo4FileSource::TGo4FileSource | ( | const char * | name | ) |
Definition at line 32 of file TGo4FileSource.cxx.
References fxFilesNames, OpenNextFile(), ProducesFilesList(), and TGo4EventSource::ThrowError().
TGo4FileSource::~TGo4FileSource | ( | ) | [virtual] |
Definition at line 81 of file TGo4FileSource.cxx.
References CloseCurrentFile(), and fxFilesNames.
Bool_t TGo4FileSource::BuildEvent | ( | TGo4EventElement * | dest | ) | [virtual] |
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 202 of file TGo4FileSource.cxx.
References fbActivated, fiCurrentEvent, fiGlobalEvent, fiMaxEvents, fxCurrentFileName, fxTopEvent, fxTree, TGo4Log::Info(), OpenNextFile(), TGo4EventElement::synchronizeWithTree(), TGo4EventSource::ThrowEOF(), and TGo4EventSource::ThrowError().
Referenced by TMeshRawEvent::Fill(), TMeshFinalEvent::Fill(), TMeshB3OutputEvent::Fill(), TMeshB3InputEvent::Fill(), TMeshB2OutputEvent::Fill(), TMeshB2InputEvent::Fill(), TMeshB1OutputEvent::Fill(), TMeshB1InputEvent::Fill(), TMeshB12OutputEvent::Fill(), and TGo4SimpleEvent::Fill().
Bool_t TGo4FileSource::CloseCurrentFile | ( | ) | [private] |
Close currently open file.
Definition at line 184 of file TGo4FileSource.cxx.
References fbActivated, fiCurrentEvent, fiMaxEvents, fxCurrentFileName, fxFile, fxTopEvent, fxTree, and TGo4Log::Info().
Referenced by OpenNextFile(), and ~TGo4FileSource().
Bool_t TGo4FileSource::OpenNextFile | ( | ) | [private] |
Open next file from the files list.
Definition at line 152 of file TGo4FileSource.cxx.
References CloseCurrentFile(), fiMaxEvents, fxCurrentFileName, fxFile, fxFilesNames, fxTree, TGo4EventSource::SetCreateStatus(), and TGo4EventSource::ThrowError().
Referenced by BuildEvent(), and TGo4FileSource().
TList * TGo4FileSource::ProducesFilesList | ( | const char * | mask | ) | [static] |
Definition at line 91 of file TGo4FileSource.cxx.
References TGo4FileStore::fgcFILESUF.
Referenced by TGo4MbsFile::AddFileName(), and TGo4FileSource().
Bool_t TGo4FileSource::fbActivated [private] |
This flag is used for lazy init of tree in Eventbuilding methods.
Definition at line 73 of file TGo4FileSource.h.
Referenced by BuildEvent(), and CloseCurrentFile().
Long64_t TGo4FileSource::fiCurrentEvent [private] |
Event number in current tree.
Definition at line 67 of file TGo4FileSource.h.
Referenced by BuildEvent(), and CloseCurrentFile().
long int TGo4FileSource::fiGlobalEvent [private] |
Global event number, starting from the first tree.
Definition at line 70 of file TGo4FileSource.h.
Referenced by BuildEvent().
Long64_t TGo4FileSource::fiMaxEvents [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 BuildEvent(), CloseCurrentFile(), and OpenNextFile().
TString TGo4FileSource::fxCurrentFileName [private] |
current name of the file
Definition at line 82 of file TGo4FileSource.h.
Referenced by BuildEvent(), CloseCurrentFile(), and OpenNextFile().
TFile* TGo4FileSource::fxFile [private] |
Definition at line 58 of file TGo4FileSource.h.
Referenced by CloseCurrentFile(), and OpenNextFile().
TList* TGo4FileSource::fxFilesNames [private] |
list of files names
Definition at line 79 of file TGo4FileSource.h.
Referenced by OpenNextFile(), TGo4FileSource(), and ~TGo4FileSource().
TGo4EventElement* TGo4FileSource::fxTopEvent [private] |
pointer to top branch event
Definition at line 76 of file TGo4FileSource.h.
Referenced by BuildEvent(), and CloseCurrentFile().
TTree* TGo4FileSource::fxTree [private] |
Definition at line 60 of file TGo4FileSource.h.
Referenced by BuildEvent(), CloseCurrentFile(), and OpenNextFile().