v2.10-0 (21000JUN2005)

Go4EventServer
Class TGo4FileSource


class TGo4FileSource
derived from TGo4EventSource

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

Field Summary
 private Bool_tfbActivated
          This flag is used for lazy init of tree in Eventbuilding methods.
 private Int_tfiCurrentEvent
          Number of events stored in the Tree.
 private Int_tfiMaxEvents
          Number of events stored in the Tree.
 private TStringfxBranchName
          name of tree branch to be activated
 private TFile*fxFile
           
 private TObject*fxTopEvent
          pointer to top branch event
 private TTree*fxTree
           

Fields inherited from interface Go4Event.TGo4EventSource
fgiTIMEOUTDEFAULT, fguTXTLEN

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4FileSource()
           
TGo4FileSource(TGo4FileSourceParameter* par)
           
TGo4FileSource(const char * name)
           

Destructor Summary
 virtual synchronized ~TGo4FileSource()
           

Method Summary
 Bool_tBuildCompositeEvent(TGo4CompositeEvent* dest)
          Use this method instead of BuildEvent
to correctly sync and read Go4 composite event
 Bool_tBuildEvent(TGo4EventElement* dest)
          Fill the destination event dest from the tree.
 private Int_tOpen()
          Open file.

Methods inherited from interface Go4Event.TGo4EventSource
Clear, GetCreateStatus, GetErrMess, GetEventStatus, SetCreateStatus, SetErrMess, SetEventStatus, ThrowError

Methods inherited from class TNamed
operator=, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Field Detail

fbActivated

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

fiCurrentEvent

private Int_t fiCurrentEvent
Number of events stored in the Tree. Used to check if
the complete tree is already read.

fiMaxEvents

private Int_t fiMaxEvents
Number of events stored in the Tree. Used to check if
the complete tree is already read.

fxBranchName

private TString fxBranchName
name of tree branch to be activated

fxFile

private TFile* fxFile

fxTopEvent

private TObject* fxTopEvent
pointer to top branch event

fxTree

private TTree* fxTree
Constructor Detail

TGo4FileSource

public TGo4FileSource()

TGo4FileSource

public TGo4FileSource(TGo4FileSourceParameter* par)

TGo4FileSource

public TGo4FileSource(const char * name)
Method Detail

~TGo4FileSource

public virtual synchronized ~TGo4FileSource()
Method Detail

BuildCompositeEvent

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

BuildEvent

public Bool_t 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.

Open

private Int_t Open()
Open file. To be used by all constructors.

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005