Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class 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 Member Functions

 TGo4FileSource ()
 TGo4FileSource (TGo4FileSourceParameter *par)
 TGo4FileSource (const char *name)
virtual ~TGo4FileSource ()
Bool_t BuildEvent (TGo4EventElement *dest)
 Fill the destination event dest from the tree.
Bool_t BuildCompositeEvent (TGo4CompositeEvent *dest)
 Use this method instead of BuildEvent to correctly sync and read Go4 composite event.

Private Member Functions

Int_t Open ()
 Open file.

Private Attributes

TFile * fxFile
TTree * fxTree
Int_t fiMaxEvents
 Number of events stored in the Tree.
Int_t fiCurrentEvent
 Number of events stored in the Tree.
TString fxBranchName
 name of tree branch to be activated
Bool_t fbActivated
 This flag is used for lazy init of tree in Eventbuilding methods.
TObject * fxTopEvent
 pointer to top branch event

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


Constructor & Destructor Documentation

TGo4FileSource::TGo4FileSource  ) 
 

Definition at line 48 of file TGo4FileSource.cxx.

TGo4FileSource::TGo4FileSource TGo4FileSourceParameter par  ) 
 

Definition at line 39 of file TGo4FileSource.cxx.

References Open().

TGo4FileSource::TGo4FileSource const char *  name  ) 
 

Definition at line 32 of file TGo4FileSource.cxx.

References Open().

TGo4FileSource::~TGo4FileSource  )  [virtual]
 

Definition at line 82 of file TGo4FileSource.cxx.

References fxFile.


Member Function Documentation

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 87 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 134 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 55 of file TGo4FileSource.cxx.

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

Referenced by TGo4FileSource().


Member Data Documentation

TFile* TGo4FileSource::fxFile [private]
 

Definition at line 61 of file TGo4FileSource.h.

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

TTree* TGo4FileSource::fxTree [private]
 

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

Referenced by BuildCompositeEvent(), and BuildEvent().

TString TGo4FileSource::fxBranchName [private]
 

name of tree branch to be activated

Definition at line 74 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 77 of file TGo4FileSource.h.

Referenced by BuildCompositeEvent(), and BuildEvent().

TObject* TGo4FileSource::fxTopEvent [private]
 

pointer to top branch event

Definition at line 80 of file TGo4FileSource.h.

Referenced by BuildEvent().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:00:53 2008 for Go4-v3.04-1 by  doxygen 1.4.2