Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4FileSource Class Reference

Raw event source which reads entries from a root TTree in a TFile. More...

#include <TGo4FileSource.h>

Inheritance diagram for TGo4FileSource:

TGo4EventSource List of all members.

Public Methods

 TGo4FileSource ()
 TGo4FileSource (TGo4FileSourceParameter *par)
 TGo4FileSource (const char *name)
virtual ~TGo4FileSource ()
Bool_t BuildEvent (TGo4EventElement *dest)
 Fill the destination event dest from the tree. More...

Bool_t BuildCompositeEvent (TGo4CompositeEvent *dest)
 Use this method instead of BuildEvent to correctly sync and read Go4 composite event. More...


Private Methods

Int_t Open ()
 Open file. More...


Private Attributes

TFile * fxFile
TTree * fxTree
Int_t fiMaxEvents
 Number of events stored in the Tree. More...

Int_t fiCurrentEvent
 Number of events stored in the Tree. More...

TString fxBranchName
 name of tree branch to be activated. More...

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

TObject * fxTopEvent
 pointer to top branch event. More...


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 37 of file TGo4FileSource.h.


Constructor & Destructor Documentation

TGo4FileSource::TGo4FileSource  
 

Definition at line 39 of file TGo4FileSource.cxx.

TGo4FileSource::TGo4FileSource TGo4FileSourceParameter   par
 

Definition at line 30 of file TGo4FileSource.cxx.

References Open().

TGo4FileSource::TGo4FileSource const char *    name
 

Definition at line 23 of file TGo4FileSource.cxx.

References Open().

TGo4FileSource::~TGo4FileSource   [virtual]
 

Definition at line 74 of file TGo4FileSource.cxx.

References fxFile.


Member Function Documentation

Bool_t TGo4FileSource::BuildEvent TGo4EventElement   dest
 

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.

Definition at line 79 of file TGo4FileSource.cxx.

References fbActivated, fiCurrentEvent, fiMaxEvents, fxBranchName, fxTopEvent, fxTree, and TGo4EventSource::ThrowError().

Referenced by TYYYUnpackEvent::Fill(), TYYYRawEvent::Fill(), TMeshRawEvent::Fill(), TMeshFinalEvent::Fill(), TMeshB3OutputEvent::Fill(), TMeshB3InputEvent::Fill(), TMeshB2OutputEvent::Fill(), TMeshB2InputEvent::Fill(), TMeshB1OutputEvent::Fill(), TMeshB1InputEvent::Fill(), TMeshB12OutputEvent::Fill(), TXXXUnpackEvent::Fill(), TGo4SimpleEvent::Fill(), and TGo4MbsEvent::Fill().

Bool_t TGo4FileSource::BuildCompositeEvent TGo4CompositeEvent   dest
 

Use this method instead of BuildEvent to correctly sync and read Go4 composite event.

Definition at line 126 of file TGo4FileSource.cxx.

References fbActivated, fiCurrentEvent, fiMaxEvents, fxTree, gTree, TGo4CompositeEvent::synchronizeWithTree(), and TGo4EventSource::ThrowError().

Int_t TGo4FileSource::Open   [private]
 

Open file.

To be used by all constructors.

Definition at line 46 of file TGo4FileSource.cxx.

References TGo4FileStore::fgcFILESUF, TGo4EventSource::fguTXTLEN, fiMaxEvents, fxFile, fxTree, TGo4EventSource::SetCreateStatus(), and TGo4EventSource::ThrowError().

Referenced by TGo4FileSource().


Member Data Documentation

TFile* TGo4FileSource::fxFile [private]
 

Definition at line 60 of file TGo4FileSource.h.

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

TTree* TGo4FileSource::fxTree [private]
 

Definition at line 62 of file TGo4FileSource.h.

Referenced by BuildCompositeEvent(), BuildEvent(), and Open().

Int_t TGo4FileSource::fiMaxEvents [private]
 

Number of events stored in the Tree.

Used to check if the complete tree is already read.

Definition at line 66 of file TGo4FileSource.h.

Referenced by BuildCompositeEvent(), BuildEvent(), and Open().

Int_t TGo4FileSource::fiCurrentEvent [private]
 

Number of events stored in the Tree.

Used to check if the complete tree is already read.

Definition at line 70 of file TGo4FileSource.h.

Referenced by BuildCompositeEvent(), and BuildEvent().

TString TGo4FileSource::fxBranchName [private]
 

name of tree branch to be activated.

Definition at line 73 of file TGo4FileSource.h.

Referenced by BuildEvent().

Bool_t TGo4FileSource::fbActivated [private]
 

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

Definition at line 76 of file TGo4FileSource.h.

Referenced by BuildCompositeEvent(), and BuildEvent().

TObject* TGo4FileSource::fxTopEvent [private]
 

pointer to top branch event.

Definition at line 79 of file TGo4FileSource.h.

Referenced by BuildEvent().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:38 2005 for Go4-v2.10-5 by doxygen1.2.15