v2.10-0 (21000JUN2005)

Go4Event
Class TGo4EventElement

Direct Known Subclasses:
TGo4ClonesElement, TGo4CompositeEvent, TGo4MbsEvent, TGo4MbsSubEvent, TGo4SimpleEvent, TGo4SimpleSubEvent, TXXXEvent, TXXXAnlEvent, TXXXUnpackEvent, TMeshB12OutputEvent, TMeshB1InputEvent, TMeshB1OutputEvent, TMeshB2InputEvent, TMeshB2OutputEvent, TMeshB3InputEvent, TMeshB3OutputEvent, TMeshDummyEvent, TMeshFinalEvent, TMeshRawEvent, TYYYRawEvent, TYYYUnpackEvent

class TGo4EventElement
derived from TNamed

The abstract base class for the data elements of which the
unpacked events (or detector structure data, resp) are composed.
Any event structure consists of eventelements that are linked back to
their parent element.
The user event class is the top parent level event element;
unlimited levels of event elements as subevents might be
managed by this user event.
The way of subelement organization (e.g.
user event class members, TObjArray,...) is not restricted here.

Author:
J. Adamczewski
Since: 12/2000
interface

Field Summary
 private Bool_tfbIsValid
          Indicates if this event is valid or not.
 protected Bool_tfDebug
           
 protected Short_tfIdentifier
           
 private TGo4EventSource*fxEventSource
          The external event source instance which is used to fill this event structure
from the raw event.
 private TGo4EventElement*fxParent
          The higher level event element that owns this instance
 protected Bool_tisActivated
           
 protected Bool_tisComposite
           

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4EventElement()
           
TGo4EventElement(const char * name)
           
TGo4EventElement(const char * aName, const char * aTitle, Short_t aBaseCat)
           

Destructor Summary
 synchronized ~TGo4EventElement()
           

Method Summary
 voidactivate()
           
 Int_tactivateBranch(TBranch* branch, Int_t splitLevel, Int_t init)
           
 Bool_tCheckEventSource(const char * classname)
          Check if event source is valid.
 voidClear(Option_t* t)
           
 voidclearAll(Int_t )
           
 voiddeactivate()
           
 Int_tFill()
          Method called by the event owner (analysis step) to fill the
event element from the set event source.
 Char_tGetDataChar(TGo4EventDataIndex* index)
          Get char (1 byte) data value by user specified index.
 Double_tGetDataDouble(TGo4EventDataIndex* index)
          Get double data value by user specified index.
 Float_tGetDataFloat(TGo4EventDataIndex* index)
          Get float data value by user specified index.
 Int_tGetDataInt(TGo4EventDataIndex* index)
          Get integer (4 byte) data value by user specified index.
 Long_tGetDataLong(TGo4EventDataIndex* index)
          Get long (4 or 8 bytes) integer data value by user specified index.
 Short_tGetDataShort(TGo4EventDataIndex* index)
          Get short (2 byte) data value by user specified index.
 const TGo4EventSource*GetEventSource()
           
 Short_tgetId()
           
 const TGo4EventElement*GetParent()
           
 TGo4CompositeEvent*getSubEventElement()
           
 Int_tInit()
          Method called on initialization of event classes.
 Bool_tisComposed()
           
 const Bool_tIsValid()
          Returns the valid state of this event.
 voidmakeBranch(TBranch* parent)
           
 synchronized TGo4EventElement&operator[](Int_t )
           
 voidPrintEvent()
          Method called by the event owner (analysis step) to clear the
event element.
 voidsetDebug(Bool_t debug)
           
 voidSetEventSource(TGo4EventSource* src)
          Setter for the event source that is currently used by the Fill method.
 voidSetParent(TGo4EventElement* par)
          Setter for the parent event structure reference.
 voidSetValid(Bool_t on)
          Switches the valid state of this event.

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

fbIsValid

private Bool_t fbIsValid
Indicates if this event is valid or not. If false, the event store
will not write the event.

fDebug

protected Bool_t fDebug

fIdentifier

protected Short_t fIdentifier

fxEventSource

private TGo4EventSource* fxEventSource
The external event source instance which is used to fill this event structure
from the raw event. Lazy initialization as zero; the pointer is set by
analysis only for top level Event Elements with subevents. Might be exchanged
on the fly to switch the unpack of different subevents into the same
event structure.
supplierCardinality 0..1

fxParent

private TGo4EventElement* fxParent
The higher level event element that owns this instance
supplierCardinality 1

isActivated

protected Bool_t isActivated

isComposite

protected Bool_t isComposite
Constructor Detail

TGo4EventElement

public TGo4EventElement()

TGo4EventElement

public TGo4EventElement(const char * name)

TGo4EventElement

public TGo4EventElement(const char * aName, const char * aTitle, Short_t aBaseCat)
Method Detail

~TGo4EventElement

public synchronized ~TGo4EventElement()
Method Detail

activate

public void activate()

activateBranch

public Int_t activateBranch(TBranch* branch, Int_t splitLevel, Int_t init)

CheckEventSource

public Bool_t CheckEventSource(const char * classname)
Check if event source is valid. Tests the pointer for
zero, and if not zero, compares classname of the
event source with given string. To be used from the
Fill method and from the analysis method init event classes.

Clear

public void Clear(Option_t* t)

clearAll

public void clearAll(Int_t )

deactivate

public void deactivate()

Fill

public Int_t Fill()
Method called by the event owner (analysis step) to fill the
event element from the set event source. Event source can
be the source of the analysis step (if this is a raw event) or the event processor (if this is a reduced event).
Fill method has to specify how the event source writes to the
members of this event structure. Either by calling methods of
the source (like myevent.a=fxEventSource->GetA(); etc ), or by
direct copy to the member (like fxEventSource->FillMemoryAt(&myevent.a);)

GetDataChar

public Char_t GetDataChar(TGo4EventDataIndex* index)
Get char (1 byte) data value by user specified index.
Must be re-implemented by subclass to work.

GetDataDouble

public Double_t GetDataDouble(TGo4EventDataIndex* index)
Get double data value by user specified index.
Must be re-implemented by subclass to work.

GetDataFloat

public Float_t GetDataFloat(TGo4EventDataIndex* index)
Get float data value by user specified index.
Must be re-implemented by subclass to work.

GetDataInt

public Int_t GetDataInt(TGo4EventDataIndex* index)
Get integer (4 byte) data value by user specified index.
Must be re-implemented by subclass to work.

GetDataLong

public Long_t GetDataLong(TGo4EventDataIndex* index)
Get long (4 or 8 bytes) integer data value by user specified index.
Must be re-implemented by subclass to work.

GetDataShort

public Short_t GetDataShort(TGo4EventDataIndex* index)
Get short (2 byte) data value by user specified index.
Must be re-implemented by subclass to work.

GetEventSource

public const TGo4EventSource* GetEventSource()

getId

public Short_t getId()

GetParent

public const TGo4EventElement* GetParent()

getSubEventElement

public TGo4CompositeEvent* getSubEventElement()

Init

public Int_t Init()
Method called on initialization of event classes.
User might check the correct type of the eventsource here and assign this
to a subclass pointer.

isComposed

public Bool_t isComposed()

IsValid

public const Bool_t IsValid()
Returns the valid state of this event.

makeBranch

public void makeBranch(TBranch* parent)

operator[]

public synchronized TGo4EventElement& operator[](Int_t )

PrintEvent

public void PrintEvent()
Method called by the event owner (analysis step) to clear the
event element.

setDebug

public void setDebug(Bool_t debug)

SetEventSource

public void SetEventSource(TGo4EventSource* src)
Setter for the event source that is currently used by the Fill method.

SetParent

public void SetParent(TGo4EventElement* par)
Setter for the parent event structure reference.

SetValid

public void SetValid(Bool_t on)
Switches the valid state of this event.

Association Links

to Class TGo4EventElement

The higher level event element that owns this instance

Supplier Cardinality 1

to Class TGo4EventSource

The external event source instance which is used to fill this event structure
from the raw event. Lazy initialization as zero; the pointer is set by
analysis only for top level Event Elements with subevents. Might be exchanged
on the fly to switch the unpack of different subevents into the same
event structure.

Supplier Cardinality 0..1

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

30-06-2005