#include <TGo4EventElement.h>
Public Member Functions | |
TGo4EventElement () | |
TGo4EventElement (const char *name) | |
TGo4EventElement (const char *aName, const char *aTitle, Short_t aBaseCat=0) | |
virtual | ~TGo4EventElement (void) |
void | SetValid (Bool_t on) |
Bool_t | IsValid () const |
void | SetEventSource (TGo4EventSource *src) |
void | SetParent (TGo4EventElement *par) |
void | SetKeepContents (Bool_t on=kTRUE) |
TGo4EventElement * | GetParent () const |
virtual TGo4EventElement * | GetChild (const char *name) |
TGo4EventSource * | GetEventSource () const |
Bool_t | CheckEventSource (const char *classname) |
virtual Int_t | Fill () |
virtual Int_t | Init () |
virtual void | PrintEvent () |
virtual void | makeBranch (TBranch *parent) |
virtual void | deactivate () |
virtual void | activate () |
virtual void | Clear (Option_t *t="") |
virtual void | clearAll (Int_t) |
virtual Bool_t | isComposed () |
virtual Short_t | getId () |
virtual void | setDebug (Bool_t debug) |
virtual TGo4EventElement & | operator[] (Int_t) |
virtual void | Print (Option_t *option="") const |
virtual void | synchronizeWithTree (TTree *tree, TGo4EventElement **var_ptr=0) |
virtual Int_t | activateBranch (TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=0) |
Protected Attributes | |
Short_t | fIdentifier |
Bool_t | fDebug |
Bool_t | fbKeepContents |
Debug level. | |
Private Attributes | |
Bool_t | fbIsValid |
TGo4EventElement * | fxParent |
TGo4EventSource * | fxEventSource |
Definition at line 36 of file TGo4EventElement.h.
TGo4EventElement::TGo4EventElement | ( | ) |
Definition at line 27 of file TGo4EventElement.cxx.
References GO4TRACE.
TGo4EventElement::TGo4EventElement | ( | const char * | name | ) |
Definition at line 40 of file TGo4EventElement.cxx.
References GO4TRACE.
TGo4EventElement::TGo4EventElement | ( | const char * | aName, | |
const char * | aTitle, | |||
Short_t | aBaseCat = 0 | |||
) |
Definition at line 52 of file TGo4EventElement.cxx.
TGo4EventElement::~TGo4EventElement | ( | void | ) | [virtual] |
Definition at line 62 of file TGo4EventElement.cxx.
References GO4TRACE.
void TGo4EventElement::activate | ( | ) | [virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 175 of file TGo4EventElement.cxx.
References gTree, TGo4Log::Info(), and TGo4Log::Warn().
Referenced by TGo4CompositeEvent::activate().
Int_t TGo4EventElement::activateBranch | ( | TBranch * | branch, | |
Int_t | index = 0 , |
|||
TGo4EventElement ** | var_ptr = 0 | |||
) | [virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 133 of file TGo4EventElement.cxx.
Referenced by TGo4CompositeEvent::activateBranch(), and synchronizeWithTree().
Bool_t TGo4EventElement::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.
Definition at line 67 of file TGo4EventElement.cxx.
References fxEventSource, and GO4TRACE.
Referenced by TGo4SimpleEvent::Fill(), TMeshRawEvent::Init(), TMeshFinalEvent::Init(), TMeshDummyEvent::Init(), TMeshB3OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB2InputEvent::Init(), TMeshB1OutputEvent::Init(), TMeshB1InputEvent::Init(), TMeshB12OutputEvent::Init(), and TMeshProviderProc::SetRealInput().
void TGo4EventElement::Clear | ( | Option_t * | t = "" |
) | [virtual] |
Reimplemented in TGo4CompositeEvent, TGo4MbsEvent, TGo4MbsSubEvent, TGo4SimpleEvent, TGo4SimpleSubEvent, TXXXEvent, TXXXAnlEvent, TXXXUnpackEvent, TXXXAnlEvent, TXXXModule, TMeshB12OutputEvent, TMeshB1InputEvent, TMeshB1OutputEvent, TMeshB2InputEvent, TMeshB2OutputEvent, TMeshB3InputEvent, TMeshB3OutputEvent, TMeshDummyEvent, TMeshFinalEvent, TMeshRawEvent, TYYYRawEvent, and TYYYUnpackEvent.
Definition at line 190 of file TGo4EventElement.cxx.
Referenced by TGo4CompositeEvent::Clear(), Fill(), Init(), and TGo4TreeStore::Store().
virtual void TGo4EventElement::clearAll | ( | Int_t | ) | [inline, virtual] |
Definition at line 95 of file TGo4EventElement.h.
void TGo4EventElement::deactivate | ( | ) | [virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 161 of file TGo4EventElement.cxx.
References gTree, TGo4Log::Info(), and TGo4Log::Warn().
Referenced by TGo4CompositeEvent::deactivate().
Int_t TGo4EventElement::Fill | ( | ) | [virtual] |
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);)
Reimplemented in TGo4MbsSubEvent, TGo4SimpleEvent, TGo4SimpleSubEvent, TMeshB12OutputEvent, TMeshB1InputEvent, TMeshB1OutputEvent, TMeshB2InputEvent, TMeshB2OutputEvent, TMeshB3InputEvent, TMeshB3OutputEvent, TMeshDummyEvent, TMeshFinalEvent, and TMeshRawEvent.
Definition at line 212 of file TGo4EventElement.cxx.
References TGo4EventSource::BuildEvent(), Clear(), fbKeepContents, fxEventSource, TGo4EventSource::GetEventStatus(), and SetValid().
Referenced by TGo4AnalysisStep::Process().
TGo4EventElement * TGo4EventElement::GetChild | ( | const char * | name | ) | [virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 97 of file TGo4EventElement.cxx.
References GetParent().
Referenced by TGo4AnalysisObjectManager::GetEventStructure().
TGo4EventSource* TGo4EventElement::GetEventSource | ( | ) | const [inline] |
Definition at line 64 of file TGo4EventElement.h.
References fxEventSource.
Referenced by TGo4ComSetPrintEvent::ExeCom(), TGo4SimpleEvent::Fill(), TGo4MbsEvent::GetMbsBufferHeader(), TGo4MbsEvent::GetMbsSourceHeader(), TMeshRawEvent::Init(), TMeshFinalEvent::Init(), TMeshDummyEvent::Init(), TMeshB3OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB2InputEvent::Init(), TMeshB1OutputEvent::Init(), TMeshB1InputEvent::Init(), and TMeshB12OutputEvent::Init().
virtual Short_t TGo4EventElement::getId | ( | ) | [inline, virtual] |
Definition at line 97 of file TGo4EventElement.h.
References fIdentifier.
Referenced by TGo4CompositeEvent::activateBranch(), and TGo4CompositeEvent::addEventElement().
TGo4EventElement* TGo4EventElement::GetParent | ( | ) | const [inline] |
Int_t TGo4EventElement::Init | ( | ) | [virtual] |
Method called on initialization of event classes. User might check the correct type of the eventsource here and assign this to a subclass pointer.
Reimplemented in TMeshB12OutputEvent, TMeshB1InputEvent, TMeshB1OutputEvent, TMeshB2InputEvent, TMeshB2OutputEvent, TMeshB3InputEvent, TMeshB3OutputEvent, TMeshDummyEvent, TMeshFinalEvent, and TMeshRawEvent.
Definition at line 194 of file TGo4EventElement.cxx.
References TGo4EventSource::CheckEventClass(), Clear(), TGo4Log::Error(), fxEventSource, TGo4Log::Info(), and SetValid().
Referenced by TGo4AnalysisStep::NewEventProcessor(), TGo4AnalysisStep::NewEventSource(), TGo4AnalysisStep::NewInputEvent(), and TGo4AnalysisStep::NewOutputEvent().
virtual Bool_t TGo4EventElement::isComposed | ( | ) | [inline, virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 96 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::activateBranch(), TGo4CompositeEvent::getEventElement(), and TGo4CompositeEvent::getListOfComposites().
Bool_t TGo4EventElement::IsValid | ( | ) | const [inline] |
Returns the valid state of this event.
Definition at line 50 of file TGo4EventElement.h.
References fbIsValid.
Referenced by TXXXAnlProc::BuildEvent(), and TGo4AnalysisStep::Process().
void TGo4EventElement::makeBranch | ( | TBranch * | parent | ) | [virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 92 of file TGo4EventElement.cxx.
Referenced by TGo4Analysis::CreateSingleEventTree().
virtual TGo4EventElement& TGo4EventElement::operator[] | ( | Int_t | ) | [inline, virtual] |
Reimplemented in TGo4CompositeEvent.
Definition at line 99 of file TGo4EventElement.h.
void TGo4EventElement::Print | ( | Option_t * | option = "" |
) | const [virtual] |
Definition at line 87 of file TGo4EventElement.cxx.
References PrintEvent().
void TGo4EventElement::PrintEvent | ( | ) | [virtual] |
Method prints content of the event
Reimplemented in TGo4MbsEvent, TGo4MbsSubEvent, TGo4SimpleEvent, TGo4SimpleSubEvent, and TYYYRawEvent.
Definition at line 74 of file TGo4EventElement.cxx.
References TGo4Log::Debug(), fbIsValid, fxEventSource, and GO4TRACE.
Referenced by TGo4PrintProcessor::BuildEvent(), TGo4ComGetCurrentEvent::ExeCom(), and Print().
virtual void TGo4EventElement::setDebug | ( | Bool_t | debug | ) | [inline, virtual] |
Definition at line 98 of file TGo4EventElement.h.
References fDebug.
void TGo4EventElement::SetEventSource | ( | TGo4EventSource * | src | ) | [inline] |
Setter for the event source that is currently used by the Fill method.
Definition at line 53 of file TGo4EventElement.h.
References fxEventSource.
Referenced by main(), TGo4AnalysisStep::NewEventProcessor(), TGo4AnalysisStep::NewEventSource(), TGo4AnalysisStep::NewInputEvent(), TGo4AnalysisStep::NewOutputEvent(), and TGo4AnalysisStep::Process().
void TGo4EventElement::SetKeepContents | ( | Bool_t | on = kTRUE |
) | [inline] |
Definition at line 58 of file TGo4EventElement.h.
References fbKeepContents.
Referenced by TGo4AnalysisStep::Process().
void TGo4EventElement::SetParent | ( | TGo4EventElement * | par | ) | [inline] |
Setter for the parent event structure reference.
Definition at line 56 of file TGo4EventElement.h.
References fxParent.
void TGo4EventElement::SetValid | ( | Bool_t | on | ) | [inline] |
Switches the valid state of this event.
Definition at line 47 of file TGo4EventElement.h.
References fbIsValid.
Referenced by TYYYEventSource::BuildEvent(), TXXXUnpackProc::BuildEvent(), TXXXAnlProc::BuildEvent(), TXXXProc::BuildEvent(), TGo4MbsSource::BuildMbsEvent(), TMeshFinalEvent::Clear(), Fill(), Init(), TGo4TreeStore::Store(), TMeshUnpackProc::Unpack(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
void TGo4EventElement::synchronizeWithTree | ( | TTree * | tree, | |
TGo4EventElement ** | var_ptr = 0 | |||
) | [virtual] |
Use this method to map event structure with the Tree branch(es)
Definition at line 109 of file TGo4EventElement.cxx.
References activateBranch().
Referenced by TGo4FileSource::BuildEvent().
Bool_t TGo4EventElement::fbIsValid [private] |
Indicates if this event is valid or not. If false, the event store will not write the event. We still stream this, since it may be used to flag validity of composite sub events
Definition at line 113 of file TGo4EventElement.h.
Referenced by IsValid(), PrintEvent(), and SetValid().
Bool_t TGo4EventElement::fbKeepContents [protected] |
Debug level.
helper flag to supress Clear if event shall be kept
Definition at line 134 of file TGo4EventElement.h.
Referenced by Fill(), and SetKeepContents().
Bool_t TGo4EventElement::fDebug [protected] |
Definition at line 131 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::activateBranch(), TGo4CompositeEvent::addEventElement(), TGo4CompositeEvent::ProvideArray(), and setDebug().
Short_t TGo4EventElement::fIdentifier [protected] |
Definition at line 130 of file TGo4EventElement.h.
Referenced by getId().
TGo4EventSource* TGo4EventElement::fxEventSource [private] |
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. 0..1
Definition at line 125 of file TGo4EventElement.h.
Referenced by CheckEventSource(), Fill(), GetEventSource(), Init(), PrintEvent(), and SetEventSource().
TGo4EventElement* TGo4EventElement::fxParent [private] |
The higher level event element that owns this instance 1
Definition at line 117 of file TGo4EventElement.h.
Referenced by GetParent(), and SetParent().