GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
The abstract base class for the data elements of which the unpacked events (or detector structure data, resp) are composed. More...
#include <TGo4EventElement.h>
Public Member Functions | |
TGo4EventElement () | |
TGo4EventElement (const char *aName, const char *aTitle, Short_t aBaseCat=0) | |
TGo4EventElement (const char *name) | |
virtual | ~TGo4EventElement () |
virtual void | activate () |
virtual Int_t | activateBranch (TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=nullptr) |
Bool_t | CheckEventSource (const char *classname) |
Check if event source is valid. | |
void | Clear (Option_t *opt="") override |
virtual void | clearAll (Int_t) |
virtual TTree * | CreateSampleTree (TGo4EventElement **sample=nullptr) |
virtual void | deactivate () |
virtual Int_t | Fill () |
Method called by the event owner (analysis step) to fill the event element from the set event source. | |
virtual TGo4EventElement * | GetChild (const char *name) |
TGo4EventSource * | GetEventSource () const |
virtual Short_t | getId () |
TGo4EventElement * | GetParent () const |
virtual Int_t | Init () |
Method called on initialization of event classes. | |
virtual Bool_t | isComposed () |
Bool_t | IsValid () const |
Returns the valid state of this event. | |
virtual void | makeBranch (TBranch *parent) |
virtual TGo4EventElement & | operator[] (Int_t) |
void | Print (Option_t *option="") const override |
virtual void | PrintEvent () |
Method prints content of the event. | |
virtual void | setDebug (Bool_t debug) |
void | SetEventSource (TGo4EventSource *src) |
Setter for the event source that is currently used by the Fill method. | |
void | SetKeepContents (Bool_t on=kTRUE) |
void | SetParent (TGo4EventElement *par) |
Setter for the parent event structure reference. | |
void | SetValid (Bool_t on) |
Switches the valid state of this event. | |
void | ShowSampleTree () |
virtual void | synchronizeWithTree (TTree *tree, TGo4EventElement **var_ptr=nullptr) |
Use this method to map event structure with the Tree branch(es) | |
Protected Attributes | |
Bool_t | fbKeepContents {kFALSE} |
Debug level. | |
Bool_t | fDebug {kFALSE} |
Short_t | fIdentifier {-1} |
Private Attributes | |
Bool_t | fbIsValid {kTRUE} |
Indicates if this event is valid or not. | |
TGo4EventSource * | fxEventSource {nullptr} |
The external event source instance which is used to fill this event structure from the raw event. | |
TGo4EventElement * | fxParent {nullptr} |
The higher level event element that owns this instance 1. | |
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.
Definition at line 39 of file TGo4EventElement.h.
TGo4EventElement::TGo4EventElement | ( | ) |
Definition at line 26 of file TGo4EventElement.cxx.
References GO4TRACE.
Referenced by TGo4CompositeEvent::TGo4CompositeEvent(), TGo4CompositeEvent::TGo4CompositeEvent(), TGo4MbsEvent::TGo4MbsEvent(), TGo4MbsEvent::TGo4MbsEvent(), TGo4MbsEvent::TGo4MbsEvent(), TGo4MbsEvent::TGo4MbsEvent(), TGo4MbsSubEvent::TGo4MbsSubEvent(), TGo4MbsSubEvent::TGo4MbsSubEvent(), TGo4SimpleEvent::TGo4SimpleEvent(), TGo4SimpleEvent::TGo4SimpleEvent(), TMeshB12OutputEvent::TMeshB12OutputEvent(), TMeshB12OutputEvent::TMeshB12OutputEvent(), TMeshB1InputEvent::TMeshB1InputEvent(), TMeshB1InputEvent::TMeshB1InputEvent(), TMeshB1OutputEvent::TMeshB1OutputEvent(), TMeshB1OutputEvent::TMeshB1OutputEvent(), TMeshB2InputEvent::TMeshB2InputEvent(), TMeshB2InputEvent::TMeshB2InputEvent(), TMeshB2OutputEvent::TMeshB2OutputEvent(), TMeshB2OutputEvent::TMeshB2OutputEvent(), TMeshB3InputEvent::TMeshB3InputEvent(), TMeshB3InputEvent::TMeshB3InputEvent(), TMeshB3OutputEvent::TMeshB3OutputEvent(), TMeshB3OutputEvent::TMeshB3OutputEvent(), TMeshDummyEvent::TMeshDummyEvent(), TMeshDummyEvent::TMeshDummyEvent(), TMeshFinalEvent::TMeshFinalEvent(), TMeshFinalEvent::TMeshFinalEvent(), TMeshRawEvent::TMeshRawEvent(), TMeshRawEvent::TMeshRawEvent(), TXXXAnlEvent::TXXXAnlEvent(), TXXXAnlEvent::TXXXAnlEvent(), TXXXEvent::TXXXEvent(), TXXXEvent::TXXXEvent(), TXXXModule::TXXXModule(), TXXXModule::TXXXModule(), TXXXUnpackEvent::TXXXUnpackEvent(), TXXXUnpackEvent::TXXXUnpackEvent(), TYYYRawEvent::TYYYRawEvent(), TYYYRawEvent::TYYYRawEvent(), TYYYUnpackEvent::TYYYUnpackEvent(), TYYYUnpackEvent::TYYYUnpackEvent(), TGo4CompositeEvent::activate(), TGo4CompositeEvent::activateBranch(), activateBranch(), TGo4CompositeEvent::addEventElement(), TGo4CompositeEvent::Clear(), TGo4CompositeEvent::CreateSampleTree(), CreateSampleTree(), TGo4CompositeEvent::deactivate(), TGo4CompositeEvent::GetChild(), GetChild(), TGo4CompositeEvent::getEventElement(), TGo4CompositeEvent::getEventElement(), TGo4CompositeEvent::getListOfComposites(), GetParent(), TGo4CompositeEvent::makeBranch(), TGo4CompositeEvent::operator[](), operator[](), Print(), SetParent(), ShowSampleTree(), and synchronizeWithTree().
TGo4EventElement::TGo4EventElement | ( | const char * | name | ) |
Definition at line 32 of file TGo4EventElement.cxx.
References GO4TRACE.
TGo4EventElement::TGo4EventElement | ( | const char * | aName, |
const char * | aTitle, | ||
Short_t | aBaseCat = 0 ) |
Definition at line 38 of file TGo4EventElement.cxx.
References fIdentifier.
|
virtual |
Definition at line 44 of file TGo4EventElement.cxx.
References GO4TRACE.
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 140 of file TGo4EventElement.cxx.
References TGo4Log::Warn().
Referenced by TGo4CompositeEvent::activate().
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 107 of file TGo4EventElement.cxx.
References TGo4EventElement().
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 49 of file TGo4EventElement.cxx.
References fxEventSource, and GO4TRACE.
Referenced by TGo4SimpleEvent::Fill(), TMeshB12OutputEvent::Init(), TMeshB1InputEvent::Init(), TMeshB1OutputEvent::Init(), TMeshB2InputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB3OutputEvent::Init(), TMeshDummyEvent::Init(), TMeshFinalEvent::Init(), TMeshRawEvent::Init(), and TMeshProviderProc::SetRealInput().
|
override |
Definition at line 145 of file TGo4EventElement.cxx.
Referenced by TGo4CompositeEvent::Clear(), Fill(), and Init().
|
inlinevirtual |
Definition at line 98 of file TGo4EventElement.h.
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 186 of file TGo4EventElement.cxx.
References TGo4EventElement(), and Fill().
Referenced by ShowSampleTree().
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 135 of file TGo4EventElement.cxx.
References TGo4Log::Warn().
Referenced by TGo4CompositeEvent::deactivate().
|
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 167 of file TGo4EventElement.cxx.
References Clear(), fbKeepContents, fxEventSource, and SetValid().
Referenced by CreateSampleTree().
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 71 of file TGo4EventElement.cxx.
References TGo4EventElement(), and GetParent().
Referenced by TGo4CompositeEvent::GetChild(), and TGo4AnalysisObjectManager::GetEventStructure().
|
inline |
Definition at line 67 of file TGo4EventElement.h.
References fxEventSource.
Referenced by TGo4ComSetPrintEvent::ExeCom(), TGo4SimpleEvent::Fill(), TGo4MbsEvent::GetMbsBufferHeader(), TGo4MbsEvent::GetMbsSourceHeader(), TMeshB12OutputEvent::Init(), TMeshB1InputEvent::Init(), TMeshB1OutputEvent::Init(), TMeshB2InputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB3OutputEvent::Init(), TMeshDummyEvent::Init(), TMeshFinalEvent::Init(), TMeshRawEvent::Init(), and TGo4MbsEvent::SetPrintEvent().
|
inlinevirtual |
Definition at line 100 of file TGo4EventElement.h.
References fIdentifier.
Referenced by TGo4CompositeEvent::activateBranch(), and TGo4CompositeEvent::addEventElement().
|
inline |
Definition at line 63 of file TGo4EventElement.h.
References TGo4EventElement(), and fxParent.
Referenced by GetChild().
|
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 149 of file TGo4EventElement.cxx.
References Clear(), TGo4Log::Error(), fxEventSource, TGo4Log::Info(), and SetValid().
|
inlinevirtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 99 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::activateBranch().
|
inline |
Returns the valid state of this event.
Definition at line 53 of file TGo4EventElement.h.
References fbIsValid.
|
inlinevirtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 93 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::makeBranch().
|
inlinevirtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 102 of file TGo4EventElement.h.
References TGo4EventElement().
|
override |
Definition at line 66 of file TGo4EventElement.cxx.
References TGo4EventElement(), and PrintEvent().
|
virtual |
Method prints content of the event.
Reimplemented in TGo4MbsEvent, TGo4MbsSubEvent, TGo4SimpleEvent, TGo4SimpleSubEvent, and TYYYRawEvent.
Definition at line 55 of file TGo4EventElement.cxx.
References fbIsValid, fxEventSource, GO4TRACE, and TGo4Log::Info().
Referenced by TGo4PrintProcessor::BuildEvent(), Print(), TGo4SimpleEvent::PrintEvent(), and TYYYRawEvent::PrintEvent().
|
inlinevirtual |
Definition at line 101 of file TGo4EventElement.h.
References fDebug.
|
inline |
Setter for the event source that is currently used by the Fill method.
Definition at line 56 of file TGo4EventElement.h.
References fxEventSource.
Referenced by main().
|
inline |
Definition at line 61 of file TGo4EventElement.h.
References fbKeepContents.
|
inline |
Setter for the parent event structure reference.
Definition at line 59 of file TGo4EventElement.h.
References TGo4EventElement(), and fxParent.
|
inline |
Switches the valid state of this event.
Definition at line 50 of file TGo4EventElement.h.
References fbIsValid.
Referenced by TXXXUnpackProc::BuildEvent(), TGo4MbsSource::BuildMbsEvent(), Fill(), Init(), TMeshUnpackProc::Unpack(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
void TGo4EventElement::ShowSampleTree | ( | ) |
Definition at line 209 of file TGo4EventElement.cxx.
References TGo4EventElement(), and CreateSampleTree().
|
virtual |
Use this method to map event structure with the Tree branch(es)
Definition at line 83 of file TGo4EventElement.cxx.
References TGo4EventElement(), and activateBranch().
Referenced by TGo4FileSource::BuildEvent().
|
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 120 of file TGo4EventElement.h.
Referenced by IsValid(), PrintEvent(), and SetValid().
|
protected |
Debug level.
helper flag to suppress Clear if event shall be kept
Definition at line 139 of file TGo4EventElement.h.
Referenced by Fill(), and SetKeepContents().
|
protected |
Definition at line 136 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::activateBranch(), TGo4CompositeEvent::addEventElement(), TGo4CompositeEvent::ProvideArray(), and setDebug().
|
protected |
Definition at line 135 of file TGo4EventElement.h.
Referenced by TGo4EventElement(), and getId().
|
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 132 of file TGo4EventElement.h.
Referenced by CheckEventSource(), Fill(), GetEventSource(), Init(), PrintEvent(), and SetEventSource().
|
private |
The higher level event element that owns this instance 1.
Definition at line 124 of file TGo4EventElement.h.
Referenced by GetParent(), and SetParent().