GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
#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 | 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 () |
void | Clear (Option_t *opt="") override |
virtual void | clearAll (Int_t) |
virtual Bool_t | isComposed () |
virtual Short_t | getId () |
virtual void | setDebug (Bool_t debug) |
virtual TGo4EventElement & | operator[] (Int_t) |
void | Print (Option_t *option="") const override |
virtual void | synchronizeWithTree (TTree *tree, TGo4EventElement **var_ptr=nullptr) |
virtual Int_t | activateBranch (TBranch *branch, Int_t index=0, TGo4EventElement **var_ptr=nullptr) |
virtual TTree * | CreateSampleTree (TGo4EventElement **sample=nullptr) |
void | ShowSampleTree () |
Protected Attributes | |
Short_t | fIdentifier {-1} |
Bool_t | fDebug {kFALSE} |
Bool_t | fbKeepContents {kFALSE} |
Debug level. More... | |
Private Attributes | |
Bool_t | fbIsValid {kTRUE} |
TGo4EventElement * | fxParent {nullptr} |
TGo4EventSource * | fxEventSource {nullptr} |
Definition at line 36 of file TGo4EventElement.h.
TGo4EventElement::TGo4EventElement | ( | ) |
Definition at line 26 of file TGo4EventElement.cxx.
References GO4TRACE.
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.
|
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(), and makeBranch().
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 107 of file TGo4EventElement.cxx.
Referenced by TGo4CompositeEvent::activateBranch(), operator[](), 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(), GetEventSource(), TMeshB3OutputEvent::Init(), TMeshB1OutputEvent::Init(), TMeshB12OutputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB2InputEvent::Init(), TMeshFinalEvent::Init(), TMeshDummyEvent::Init(), TMeshB1InputEvent::Init(), TMeshRawEvent::Init(), and TMeshProviderProc::SetRealInput().
|
override |
Definition at line 145 of file TGo4EventElement.cxx.
Referenced by TGo4CompositeEvent::Clear(), Fill(), TGo4AnalysisObjectManager::GetEventStructure(), Init(), makeBranch(), and TGo4TreeStore::Store().
|
inlinevirtual |
Definition at line 95 of file TGo4EventElement.h.
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 186 of file TGo4EventElement.cxx.
References Fill().
Referenced by operator[](), and ShowSampleTree().
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 135 of file TGo4EventElement.cxx.
References TGo4Log::Warn().
Referenced by TGo4CompositeEvent::deactivate(), and makeBranch().
|
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 TGo4SimpleSubEvent, TGo4SimpleEvent, TGo4MbsSubEvent, TMeshRawEvent, TMeshB1InputEvent, TMeshFinalEvent, TMeshDummyEvent, TMeshB12OutputEvent, TMeshB1OutputEvent, TMeshB2InputEvent, TMeshB2OutputEvent, TMeshB3OutputEvent, and TMeshB3InputEvent.
Definition at line 167 of file TGo4EventElement.cxx.
References TGo4EventSource::BuildEvent(), Clear(), fbKeepContents, fxEventSource, TGo4EventSource::GetEventStatus(), and SetValid().
Referenced by CreateSampleTree(), GetEventSource(), and TGo4AnalysisStep::Process().
|
virtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 71 of file TGo4EventElement.cxx.
References GetParent().
Referenced by TGo4CompositeEvent::GetChild(), TGo4AnalysisObjectManager::GetEventStructure(), and GetParent().
|
inline |
Definition at line 64 of file TGo4EventElement.h.
References CheckEventSource(), Fill(), fxEventSource, Init(), and PrintEvent().
Referenced by TGo4ComSetPrintEvent::ExeCom(), TGo4SimpleEvent::Fill(), TGo4MbsEvent::GetMbsBufferHeader(), TGo4MbsEvent::GetMbsSourceHeader(), TMeshB1OutputEvent::Init(), TMeshB2OutputEvent::Init(), TMeshB12OutputEvent::Init(), TMeshB3OutputEvent::Init(), TMeshB3InputEvent::Init(), TMeshB2InputEvent::Init(), TMeshFinalEvent::Init(), TMeshDummyEvent::Init(), TMeshB1InputEvent::Init(), TMeshRawEvent::Init(), and TGo4MbsEvent::SetPrintEvent().
|
inlinevirtual |
Definition at line 97 of file TGo4EventElement.h.
References fIdentifier.
Referenced by TGo4CompositeEvent::activateBranch(), and TGo4CompositeEvent::addEventElement().
|
inline |
Definition at line 60 of file TGo4EventElement.h.
References fxParent, and GetChild().
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 TMeshRawEvent, TMeshB1InputEvent, TMeshDummyEvent, TMeshFinalEvent, TMeshB2InputEvent, TMeshB3InputEvent, TMeshB12OutputEvent, TMeshB1OutputEvent, TMeshB2OutputEvent, and TMeshB3OutputEvent.
Definition at line 149 of file TGo4EventElement.cxx.
References TGo4EventSource::CheckEventClass(), Clear(), TGo4Log::Error(), fxEventSource, TGo4Log::Info(), and SetValid().
Referenced by GetEventSource(), TGo4AnalysisStep::NewEventProcessor(), TGo4AnalysisStep::NewEventSource(), TGo4AnalysisStep::NewInputEvent(), and TGo4AnalysisStep::NewOutputEvent().
|
inlinevirtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 96 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::activateBranch().
|
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().
|
inlinevirtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 90 of file TGo4EventElement.h.
References activate(), Clear(), and deactivate().
Referenced by TGo4CompositeEvent::makeBranch(), TGo4BackStore::Store(), and TGo4FileStore::Store().
|
inlinevirtual |
Reimplemented in TGo4CompositeEvent.
Definition at line 99 of file TGo4EventElement.h.
References activateBranch(), CreateSampleTree(), Print(), ShowSampleTree(), and synchronizeWithTree().
|
override |
Definition at line 66 of file TGo4EventElement.cxx.
References PrintEvent().
Referenced by operator[]().
|
virtual |
Method prints content of the event
Reimplemented in TGo4SimpleSubEvent, TGo4MbsEvent, TGo4SimpleEvent, TGo4MbsSubEvent, and TYYYRawEvent.
Definition at line 55 of file TGo4EventElement.cxx.
References fbIsValid, fxEventSource, GO4TRACE, and TGo4Log::Info().
Referenced by TGo4PrintProcessor::BuildEvent(), TGo4ComGetCurrentEvent::ExeCom(), GetEventSource(), Print(), TYYYRawEvent::PrintEvent(), and TGo4SimpleEvent::PrintEvent().
|
inlinevirtual |
Definition at line 98 of file TGo4EventElement.h.
References fDebug.
|
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().
|
inline |
Definition at line 58 of file TGo4EventElement.h.
References fbKeepContents.
Referenced by TGo4AnalysisStep::Process().
|
inline |
Setter for the parent event structure reference.
Definition at line 56 of file TGo4EventElement.h.
References fxParent.
|
inline |
Switches the valid state of this event.
Definition at line 47 of file TGo4EventElement.h.
References fbIsValid.
Referenced by TXXXProc::BuildEvent(), TXXXAnlProc::BuildEvent(), TXXXUnpackProc::BuildEvent(), TYYYEventSource::BuildEvent(), TGo4MbsSource::BuildMbsEvent(), TMeshFinalEvent::Clear(), TXXXUnpackProc::CreateRawHistograms(), Fill(), Init(), TGo4TreeStore::Store(), TMeshUnpackProc::Unpack(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
void TGo4EventElement::ShowSampleTree | ( | ) |
Definition at line 209 of file TGo4EventElement.cxx.
References CreateSampleTree().
Referenced by operator[]().
|
virtual |
Use this method to map event structure with the Tree branch(es)
Definition at line 83 of file TGo4EventElement.cxx.
References activateBranch().
Referenced by TGo4FileSource::BuildEvent(), and operator[]().
|
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 117 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 136 of file TGo4EventElement.h.
Referenced by Fill(), and SetKeepContents().
|
protected |
Definition at line 133 of file TGo4EventElement.h.
Referenced by TGo4CompositeEvent::activateBranch(), TGo4CompositeEvent::addEventElement(), TGo4CompositeEvent::ProvideArray(), and setDebug().
|
protected |
Definition at line 132 of file TGo4EventElement.h.
Referenced by 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 129 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 121 of file TGo4EventElement.h.
Referenced by GetParent(), and SetParent().