GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4SimpleEvent Class Reference

Simple Event structure containing a fixed size TClonesArray of subevents. More...

#include <TGo4SimpleEvent.h>

+ Inheritance diagram for TGo4SimpleEvent:

Public Member Functions

 TGo4SimpleEvent ()
 
 TGo4SimpleEvent (Int_t subevtnum)
 
virtual ~TGo4SimpleEvent ()
 
TGo4SimpleSubEventAddSubEvent (Short_t procid)
 Add subevent ito clonesarray with new procid.
 
void Clear (Option_t *opt="") override
 Method called by the event owner (analysis step) to clear the event element.
 
Int_t Fill () override
 Method called by the event owner (analysis step) to fill the event element from the set event source.
 
Int_t GetCount () const
 
TGo4SimpleSubEventGetSubEvent (Short_t procid)
 Access to subevent in list by procid.
 
TGo4SimpleSubEventNextSubEvent ()
 Iterator for subevent array.
 
void PrintEvent () override
 Method prints content of the event.
 
void ResetIterator ()
 Set the internal iterator of the subevent array to the beginning of the array.
 
- Public Member Functions inherited from TGo4EventElement
 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 TGo4EventElementGetChild (const char *name)
 
TGo4EventSourceGetEventSource () const
 
virtual Short_t getId ()
 
TGo4EventElementGetParent () 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 TGo4EventElementoperator[] (Int_t)
 
void Print (Option_t *option="") const override
 
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)
 

Private Attributes

char fcTestCharArr [10]
 
Int_t fiArrLen {0}
 
Int_t fiCount {0}
 
Int_t fiLastSlot {0}
 Index of last used slot in the clonesarray.
 
Int_t fiMaxSlot {0}
 Index of last existing slot in the clonesarray.
 
Int_t fiTestArray [10]
 
TIterator * fxIterator {nullptr}
 Iterator for array.
 
TClonesArray * fxSubEventArray {nullptr}
 aggregation 1 1..* TClonesArray
 

Friends

class TGo4SimpleEventProcessor
 

Additional Inherited Members

- Protected Attributes inherited from TGo4EventElement
Bool_t fbKeepContents {kFALSE}
 Debug level.
 
Bool_t fDebug {kFALSE}
 
Short_t fIdentifier {-1}
 

Detailed Description

Simple Event structure containing a fixed size TClonesArray of subevents.

Each subevent has integer data members corresponding to the first n longwords of the TMbsSubEvent dynamic data field. May be used to work with quasi raw event data within the root TTreeViewer.

Author
J. Adamczewski
Since
07-feb-2001

Definition at line 33 of file TGo4SimpleEvent.h.

Constructor & Destructor Documentation

◆ TGo4SimpleEvent() [1/2]

TGo4SimpleEvent::TGo4SimpleEvent ( )

◆ TGo4SimpleEvent() [2/2]

TGo4SimpleEvent::TGo4SimpleEvent ( Int_t subevtnum)

◆ ~TGo4SimpleEvent()

TGo4SimpleEvent::~TGo4SimpleEvent ( )
virtual

Definition at line 53 of file TGo4SimpleEvent.cxx.

References fxIterator, fxSubEventArray, and GO4TRACE.

Member Function Documentation

◆ AddSubEvent()

TGo4SimpleSubEvent * TGo4SimpleEvent::AddSubEvent ( Short_t procid)

Add subevent ito clonesarray with new procid.

The pointer to the new subevent is returned. If entry for procid already existed, this entry is returned and the clonesarray is left as is.

Definition at line 157 of file TGo4SimpleEvent.cxx.

References TGo4Log::Debug(), TGo4Log::Error(), fiLastSlot, fiMaxSlot, TGo4SimpleSubEvent::fsProcid, GetSubEvent(), and GO4TRACE.

Referenced by TGo4SimpleEventProcessor::BuildSimpleEvent().

◆ Clear()

void TGo4SimpleEvent::Clear ( Option_t * opt = "")
override

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

Definition at line 75 of file TGo4SimpleEvent.cxx.

References TGo4SimpleSubEvent::Clear(), fiCount, fiMaxSlot, fxSubEventArray, and GO4TRACE.

Referenced by Fill(), and main().

◆ Fill()

Int_t TGo4SimpleEvent::Fill ( )
overridevirtual

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=GetEventSource()->GetA(); etc ), or by direct copy to the member (like GetEventSource()->FillMemoryAt(&myevent.a);)

Reimplemented from TGo4EventElement.

Definition at line 93 of file TGo4SimpleEvent.cxx.

References TGo4EventElement::CheckEventSource(), Clear(), TGo4EventElement::GetEventSource(), GO4TRACE, and TGo4SimpleEventProcessor.

Referenced by main().

◆ GetCount()

Int_t TGo4SimpleEvent::GetCount ( ) const

Definition at line 152 of file TGo4SimpleEvent.cxx.

References fiCount.

Referenced by PrintEvent().

◆ GetSubEvent()

TGo4SimpleSubEvent * TGo4SimpleEvent::GetSubEvent ( Short_t procid)

Access to subevent in list by procid.

Returns zero if no subevent of this procid is found

Definition at line 131 of file TGo4SimpleEvent.cxx.

References fiMaxSlot, fxSubEventArray, and GO4TRACE.

Referenced by AddSubEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), and main().

◆ NextSubEvent()

TGo4SimpleSubEvent * TGo4SimpleEvent::NextSubEvent ( )

Iterator for subevent array.

If reset is kTRUE, the iteration starts at the first TObjArray slot, otherwise we continue at the position after the last call of this method.

Definition at line 190 of file TGo4SimpleEvent.cxx.

References fxIterator, and GO4TRACE.

Referenced by PrintEvent().

◆ PrintEvent()

void TGo4SimpleEvent::PrintEvent ( )
overridevirtual

Method prints content of the event.

Reimplemented from TGo4EventElement.

Definition at line 62 of file TGo4SimpleEvent.cxx.

References TGo4Log::Debug(), GetCount(), GO4TRACE, NextSubEvent(), TGo4EventElement::PrintEvent(), and ResetIterator().

Referenced by main().

◆ ResetIterator()

void TGo4SimpleEvent::ResetIterator ( )

Set the internal iterator of the subevent array to the beginning of the array.

Definition at line 181 of file TGo4SimpleEvent.cxx.

References fxIterator, fxSubEventArray, and GO4TRACE.

Referenced by PrintEvent().

Friends And Related Symbol Documentation

◆ TGo4SimpleEventProcessor

friend class TGo4SimpleEventProcessor
friend

Definition at line 35 of file TGo4SimpleEvent.h.

References TGo4SimpleEventProcessor.

Referenced by Fill(), and TGo4SimpleEventProcessor.

Field Documentation

◆ fcTestCharArr

char TGo4SimpleEvent::fcTestCharArr[10]
private

Definition at line 114 of file TGo4SimpleEvent.h.

◆ fiArrLen

Int_t TGo4SimpleEvent::fiArrLen {0}
private

Definition at line 110 of file TGo4SimpleEvent.h.

Referenced by TGo4SimpleEvent().

◆ fiCount

Int_t TGo4SimpleEvent::fiCount {0}
private

Definition at line 91 of file TGo4SimpleEvent.h.

Referenced by TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), and GetCount().

◆ fiLastSlot

Int_t TGo4SimpleEvent::fiLastSlot {0}
private

Index of last used slot in the clonesarray.

Definition at line 96 of file TGo4SimpleEvent.h.

Referenced by AddSubEvent().

◆ fiMaxSlot

Int_t TGo4SimpleEvent::fiMaxSlot {0}
private

Index of last existing slot in the clonesarray.

Definition at line 101 of file TGo4SimpleEvent.h.

Referenced by TGo4SimpleEvent(), TGo4SimpleEvent(), AddSubEvent(), Clear(), and GetSubEvent().

◆ fiTestArray

Int_t TGo4SimpleEvent::fiTestArray[10]
private

Definition at line 112 of file TGo4SimpleEvent.h.

Referenced by TGo4SimpleEvent().

◆ fxIterator

TIterator* TGo4SimpleEvent::fxIterator {nullptr}
private

Iterator for array.

Definition at line 118 of file TGo4SimpleEvent.h.

Referenced by TGo4SimpleEvent(), TGo4SimpleEvent(), ~TGo4SimpleEvent(), NextSubEvent(), and ResetIterator().

◆ fxSubEventArray

TClonesArray* TGo4SimpleEvent::fxSubEventArray {nullptr}
private

aggregation 1 1..* TClonesArray

Definition at line 108 of file TGo4SimpleEvent.h.

Referenced by TGo4SimpleEvent(), TGo4SimpleEvent(), ~TGo4SimpleEvent(), Clear(), GetSubEvent(), and ResetIterator().


The documentation for this class was generated from the following files: