GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
TGo4FileSource Class Reference

#include <TGo4FileSource.h>

+ Inheritance diagram for TGo4FileSource:

Public Member Functions

 TGo4FileSource ()
 
 TGo4FileSource (TGo4FileSourceParameter *par)
 
 TGo4FileSource (const char *name)
 
virtual ~TGo4FileSource ()
 
virtual Bool_t BuildEvent (TGo4EventElement *dest)
 
- Public Member Functions inherited from TGo4EventSource
 TGo4EventSource (const char *name)
 
virtual ~TGo4EventSource ()
 
 TGo4EventSource ()
 
virtual void Clear (Option_t *opt="")
 
Int_t GetCreateStatus () const
 
Int_t GetEventStatus () const
 
const char * GetErrMess () const
 
virtual const char * GetActiveName ()
 
virtual Bool_t CheckEventClass (TClass *cl)
 

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
 
TGo4EventElementfxTopEvent
 
TList * fxFilesNames
 
TString fxCurrentFileName
 

Additional Inherited Members

- Static Public Attributes inherited from TGo4EventSource
static const Int_t fgiTIMEOUTDEFAULT =1
 
- Protected Types inherited from TGo4EventSource
enum  { fguTXTLEN = 256 }
 
- Protected Member Functions inherited from TGo4EventSource
void SetErrMess (const char *txt)
 
void SetEventStatus (Int_t status)
 
void SetCreateStatus (Int_t status)
 
void ThrowError (Int_t creastat, Int_t errstat, const char *message,...)
 
void ThrowEOF (Int_t creastat, Int_t errstat, const char *message,...)
 

Detailed Description

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

Author
J. Adamczewski
Since
1/2001

Definition at line 36 of file TGo4FileSource.h.

Constructor & Destructor Documentation

TGo4FileSource::TGo4FileSource ( )

Definition at line 65 of file TGo4FileSource.cxx.

TGo4FileSource::TGo4FileSource ( TGo4FileSourceParameter par)
TGo4FileSource::TGo4FileSource ( const char *  name)
TGo4FileSource::~TGo4FileSource ( )
virtual

Definition at line 79 of file TGo4FileSource.cxx.

References CloseCurrentFile(), and fxFilesNames.

Member Function Documentation

Bool_t TGo4FileSource::BuildEvent ( TGo4EventElement dest)
virtual
Bool_t TGo4FileSource::CloseCurrentFile ( )
private

Close currently open file.

Definition at line 182 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
TList * TGo4FileSource::ProducesFilesList ( const char *  mask)
static

Definition at line 89 of file TGo4FileSource.cxx.

References TGo4FileStore::fgcFILESUF.

Referenced by TGo4MbsFile::AddFileName(), and TGo4FileSource().

Member Data Documentation

Bool_t TGo4FileSource::fbActivated
private

This flag is used for lazy init of tree in Eventbuilding methods.

Definition at line 72 of file TGo4FileSource.h.

Referenced by BuildEvent(), and CloseCurrentFile().

Long64_t TGo4FileSource::fiCurrentEvent
private

Event number in current tree.

Definition at line 66 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 69 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 63 of file TGo4FileSource.h.

Referenced by BuildEvent(), CloseCurrentFile(), and OpenNextFile().

TString TGo4FileSource::fxCurrentFileName
private

current name of the file

Definition at line 81 of file TGo4FileSource.h.

Referenced by BuildEvent(), CloseCurrentFile(), and OpenNextFile().

TFile* TGo4FileSource::fxFile
private

Definition at line 57 of file TGo4FileSource.h.

Referenced by CloseCurrentFile(), and OpenNextFile().

TList* TGo4FileSource::fxFilesNames
private

list of files names

Definition at line 78 of file TGo4FileSource.h.

Referenced by OpenNextFile(), TGo4FileSource(), and ~TGo4FileSource().

TGo4EventElement* TGo4FileSource::fxTopEvent
private

pointer to top branch event

Definition at line 75 of file TGo4FileSource.h.

Referenced by BuildEvent(), and CloseCurrentFile().

TTree* TGo4FileSource::fxTree
private

Definition at line 59 of file TGo4FileSource.h.

Referenced by BuildEvent(), CloseCurrentFile(), and OpenNextFile().


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