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

Wrapper for the standard gsi event structure as delivered from mbs. More...

#include <TGo4MbsEvent.h>

+ Inheritance diagram for TGo4MbsEvent:

Public Member Functions

 TGo4MbsEvent ()
 
 TGo4MbsEvent (const char *name)
 Ctor expecting just a name.
 
 TGo4MbsEvent (UInt_t subnum, Char_t *subcrates, Char_t *controls, Short_t *procids, UInt_t *datasizes)
 Ctor expecting the number of subevents to initialize and arrays which specify the subevent ids (subcrate, ctrl, procid) to create.
 
 TGo4MbsEvent (UInt_t subnum, Short_t *subids, UInt_t datasize=100)
 Ctor expecting the number of subevents to initialize and an array which specifies the subevent ids (procids) to create.
 
virtual ~TGo4MbsEvent ()
 
TGo4MbsSubEventAddSubEvent (Int_t fullID, Short_t *source, Int_t datalength, Bool_t copydata=kFALSE)
 Add new subevent to mbs event.
 
void AssignReference (TGo4MbsEvent *ref)
 
void Clear (Option_t *opt="") override
 Method called by the event owner (analysis step) to clear the event element.
 
Int_t GetByteLen () const
 
Int_t GetCount () const
 
Int_t GetDlen () const
 
Short_t GetDummy () const
 
Int_t GetIntLen () const
 
s_bufheGetMbsBufferHeader ()
 Access to the buffer header of the current event.
 
s_filheGetMbsSourceHeader ()
 Access to the info header of the current mbs source.
 
TGo4MbsSubEventGetSubEvent (Char_t subcrate, Char_t ctrl, Short_t procid)
 Access to subevent in list by procid, subcrate and ctrl identifiers.
 
TGo4MbsSubEventGetSubEvent (Short_t procid)
 Access to subevent in list by procid.
 
Short_t GetSubtype () const
 
Short_t GetTrigger () const
 
Short_t GetType () const
 
TGo4MbsSubEventNextSubEvent (Bool_t all=kFALSE)
 Iterator for subevent array.
 
void PrintEvent () override
 Print event with default settings.
 
void PrintMbsBufferHeader ()
 Method to print MBS buffer header.
 
void PrintMbsEvent (Int_t subid=-1, Bool_t longw=kTRUE, Bool_t hexw=kTRUE, Bool_t dataw=kTRUE, Bool_t bufhead=kFALSE, Bool_t filhead=kFALSE)
 Print MBS event.
 
void PrintMbsFileHeader ()
 Method to print MBS source header.
 
void RemoveReference ()
 
void ResetIterator ()
 Set the internal iterator of the subevent array to the beginning of the array.
 
void Set (Int_t dlen=0, Short_t type=10, Short_t subtype=1, Short_t dummy=0, Short_t trigger=0, Int_t count=0)
 
void SetCount (Int_t count)
 
void SetDlen (Int_t dlen)
 
void SetDummy (Short_t dummy)
 
void SetPrintEvent (Int_t num, Int_t sid, Int_t longw, Int_t hexw, Int_t dataw)
 Set print parameter for MBS event source See TGo4MbsSource for more details.
 
void SetSubtype (Short_t subtype)
 
void SetTrigger (Short_t trigger)
 
void SetType (Short_t type)
 
- 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 Int_t Fill ()
 Method called by the event owner (analysis step) to fill the event element from the set event source.
 
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 Member Functions

void SimpleInit ()
 

Private Attributes

Bool_t fbIsReference {kFALSE}
 Indicates if this object is mere reference to another mbs event.
 
Int_t fiSubEvIndex {0}
 Subevent index in array, replacement for Iterator.
 
TGo4EventHeader10 fxHeader
 aggregationByValue
 
TObjArray * fxSubEvArray {nullptr}
 dynamic array of subevents.
 

Friends

class TGo4MbsSource
 

Additional Inherited Members

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

Detailed Description

Wrapper for the standard gsi event structure as delivered from mbs.

Definition at line 35 of file TGo4MbsEvent.h.

Constructor & Destructor Documentation

◆ TGo4MbsEvent() [1/4]

TGo4MbsEvent::TGo4MbsEvent ( )

◆ TGo4MbsEvent() [2/4]

TGo4MbsEvent::TGo4MbsEvent ( UInt_t subnum,
Short_t * subids,
UInt_t datasize = 100 )

Ctor expecting the number of subevents to initialize and an array which specifies the subevent ids (procids) to create.

Subevent number subnum must not extend the length of subids field.

Definition at line 35 of file TGo4MbsEvent.cxx.

References TGo4EventElement::TGo4EventElement(), Clear(), fbIsReference, fiSubEvIndex, fxHeader, fxSubEvArray, GO4TRACE, and TGo4MbsSubEvent::SetProcid().

◆ TGo4MbsEvent() [3/4]

TGo4MbsEvent::TGo4MbsEvent ( UInt_t subnum,
Char_t * subcrates,
Char_t * controls,
Short_t * procids,
UInt_t * datasizes )

Ctor expecting the number of subevents to initialize and arrays which specify the subevent ids (subcrate, ctrl, procid) to create.

Subevent number subnum must not extend the length of subids field. Array datasizes contains preallocated size of each subevent data field.

Definition at line 52 of file TGo4MbsEvent.cxx.

References TGo4EventElement::TGo4EventElement(), Clear(), fbIsReference, fiSubEvIndex, fxHeader, fxSubEvArray, GO4TRACE, TGo4MbsSubEvent::SetControl(), TGo4MbsSubEvent::SetProcid(), and TGo4MbsSubEvent::SetSubcrate().

◆ TGo4MbsEvent() [4/4]

TGo4MbsEvent::TGo4MbsEvent ( const char * name)

Ctor expecting just a name.

Auxiliary to support mbs event in the generic step factory.

Definition at line 76 of file TGo4MbsEvent.cxx.

References TGo4EventElement::TGo4EventElement(), fbIsReference, fiSubEvIndex, fxHeader, GO4TRACE, and SimpleInit().

◆ ~TGo4MbsEvent()

TGo4MbsEvent::~TGo4MbsEvent ( )
virtual

Definition at line 101 of file TGo4MbsEvent.cxx.

References fbIsReference, fxSubEvArray, and GO4TRACE.

Member Function Documentation

◆ AddSubEvent()

TGo4MbsSubEvent * TGo4MbsEvent::AddSubEvent ( Int_t fullID,
Short_t * source,
Int_t datalength,
Bool_t copydata = kFALSE )

Add new subevent to mbs event.

/param fullID - 32-bit combination of subcrate, ctrl, procid values /param source - pointer on raw data /param datalength - total length of subevent in DWORDS (2-bytes) /param copydata if true data will be copied into internal allocated buffer, otherwise pointer on provided buffer will be used

Definition at line 318 of file TGo4MbsEvent.cxx.

References TGo4Log::Debug(), TGo4MbsSubEvent::fbIsDataOwner, TGo4MbsSubEvent::fbIsFilled, TGo4MbsSubEvent::fiAllocLen, TGo4MbsSubEvent::fiData, TGo4MbsSubEvent::fxHeader, fxSubEvArray, TGo4MbsSubEvent::GetControl(), TGo4MbsSubEvent::GetProcid(), TGo4MbsSubEvent::GetSubcrate(), NextSubEvent(), TGo4MbsSubEvent::ReAllocate(), ResetIterator(), and TGo4MbsSubEvent::SetDlen().

Referenced by TGo4MbsSource::BuildMbsEvent(), and TGo4MbsSource::BuildMbsSubEvent().

◆ AssignReference()

◆ Clear()

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

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

Definition at line 114 of file TGo4MbsEvent.cxx.

References fbIsReference, GO4TRACE, NextSubEvent(), and ResetIterator().

Referenced by TGo4MbsEvent(), TGo4MbsEvent(), and SimpleInit().

◆ GetByteLen()

Int_t TGo4MbsEvent::GetByteLen ( ) const
inline

Definition at line 136 of file TGo4MbsEvent.h.

References GetDlen().

◆ GetCount()

Int_t TGo4MbsEvent::GetCount ( ) const
inline

Definition at line 151 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4SimpleEventProcessor::BuildSimpleEvent(), and PrintMbsEvent().

◆ GetDlen()

Int_t TGo4MbsEvent::GetDlen ( ) const
inline

Definition at line 134 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by GetByteLen(), GetIntLen(), and PrintMbsEvent().

◆ GetDummy()

Short_t TGo4MbsEvent::GetDummy ( ) const
inline

Definition at line 145 of file TGo4MbsEvent.h.

References fxHeader.

◆ GetIntLen()

Int_t TGo4MbsEvent::GetIntLen ( ) const
inline

Definition at line 135 of file TGo4MbsEvent.h.

References GetDlen().

◆ GetMbsBufferHeader()

s_bufhe * TGo4MbsEvent::GetMbsBufferHeader ( )

Access to the buffer header of the current event.

Definition at line 312 of file TGo4MbsEvent.cxx.

References TGo4MbsSource::GetBufferHeader(), TGo4EventElement::GetEventSource(), and TGo4MbsSource.

Referenced by PrintMbsBufferHeader(), and PrintMbsEvent().

◆ GetMbsSourceHeader()

s_filhe * TGo4MbsEvent::GetMbsSourceHeader ( )

Access to the info header of the current mbs source.

Definition at line 306 of file TGo4MbsEvent.cxx.

References TGo4EventElement::GetEventSource(), TGo4MbsSource::GetInfoHeader(), and TGo4MbsSource.

Referenced by PrintMbsEvent(), and PrintMbsFileHeader().

◆ GetSubEvent() [1/2]

TGo4MbsSubEvent * TGo4MbsEvent::GetSubEvent ( Char_t subcrate,
Char_t ctrl,
Short_t procid )

Access to subevent in list by procid, subcrate and ctrl identifiers.

Returns zero if no subevent of these ids is found. If event has subevents with identical ids, the first in order will be returned (use NextSubEvent() to access all in this case).

Definition at line 285 of file TGo4MbsEvent.cxx.

References GO4TRACE, NextSubEvent(), and ResetIterator().

◆ GetSubEvent() [2/2]

TGo4MbsSubEvent * TGo4MbsEvent::GetSubEvent ( Short_t procid)

Access to subevent in list by procid.

Returns zero if no subevent of this id is found. If event has subevents with identical procid, the first in order will be returned (use NextSubEvent() to access all in this case). Not recommended to use, left for compatibility!

Definition at line 295 of file TGo4MbsEvent.cxx.

References GO4TRACE, NextSubEvent(), and ResetIterator().

◆ GetSubtype()

Short_t TGo4MbsEvent::GetSubtype ( ) const
inline

Definition at line 142 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by PrintMbsEvent().

◆ GetTrigger()

Short_t TGo4MbsEvent::GetTrigger ( ) const
inline

Definition at line 148 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TXXXProc::BuildEvent(), and PrintMbsEvent().

◆ GetType()

Short_t TGo4MbsEvent::GetType ( ) const
inline

Definition at line 139 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by PrintMbsEvent().

◆ NextSubEvent()

TGo4MbsSubEvent * TGo4MbsEvent::NextSubEvent ( Bool_t all = kFALSE)

Iterator for subevent array.

Continue at the position after the last call of this method. /param all specifies if all available subevents are delivered, or only subevents which were filled in the previous cycle.

Definition at line 267 of file TGo4MbsEvent.cxx.

References fiSubEvIndex, fxSubEvArray, GO4TRACE, and TGo4MbsSubEvent::IsFilled().

Referenced by AddSubEvent(), TXXXProc::BuildEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetSubEvent(), GetSubEvent(), and PrintMbsEvent().

◆ PrintEvent()

void TGo4MbsEvent::PrintEvent ( )
overridevirtual

Print event with default settings.

Reimplemented from TGo4EventElement.

Definition at line 164 of file TGo4MbsEvent.cxx.

References PrintMbsEvent().

◆ PrintMbsBufferHeader()

void TGo4MbsEvent::PrintMbsBufferHeader ( )

Method to print MBS buffer header.

Definition at line 199 of file TGo4MbsEvent.cxx.

References f_ut_utime(), GetMbsBufferHeader(), s_bufhe::i_subtype, s_bufhe::i_type, s_bufhe::l_buf, s_bufhe::l_dlen, and s_bufhe::l_time.

Referenced by PrintMbsEvent().

◆ PrintMbsEvent()

void TGo4MbsEvent::PrintMbsEvent ( Int_t subid = -1,
Bool_t longw = kTRUE,
Bool_t hexw = kTRUE,
Bool_t dataw = kTRUE,
Bool_t bufhead = kFALSE,
Bool_t filhead = kFALSE )

Print MBS event.

Parameters
subid- select subevent id, -1 - print all subevents
longw- data in long format (4 bytes)
hexw- print in hex format
dataw- print raw data
bufhead- print current mbs buffer header
filhead- print current mbs file header

Definition at line 217 of file TGo4MbsEvent.cxx.

References f_ut_utime(), s_filhe::filhe_file, GetCount(), GetDlen(), GetMbsBufferHeader(), GetMbsSourceHeader(), GetSubtype(), GetTrigger(), GetType(), s_bufhe::l_buf, s_bufhe::l_time, NextSubEvent(), PrintMbsBufferHeader(), PrintMbsFileHeader(), and ResetIterator().

Referenced by TGo4PrintProcessor::BuildEvent(), and PrintEvent().

◆ PrintMbsFileHeader()

void TGo4MbsEvent::PrintMbsFileHeader ( )

◆ RemoveReference()

void TGo4MbsEvent::RemoveReference ( )

Definition at line 146 of file TGo4MbsEvent.cxx.

References fbIsReference, and SimpleInit().

◆ ResetIterator()

void TGo4MbsEvent::ResetIterator ( )
inline

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

Definition at line 100 of file TGo4MbsEvent.h.

References fiSubEvIndex.

Referenced by AddSubEvent(), TXXXProc::BuildEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetSubEvent(), GetSubEvent(), and PrintMbsEvent().

◆ Set()

void TGo4MbsEvent::Set ( Int_t dlen = 0,
Short_t type = 10,
Short_t subtype = 1,
Short_t dummy = 0,
Short_t trigger = 0,
Int_t count = 0 )

Definition at line 153 of file TGo4MbsEvent.cxx.

References SetCount(), SetDlen(), SetDummy(), SetSubtype(), SetTrigger(), and SetType().

Referenced by SimpleInit().

◆ SetCount()

void TGo4MbsEvent::SetCount ( Int_t count)
inline

Definition at line 150 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

◆ SetDlen()

void TGo4MbsEvent::SetDlen ( Int_t dlen)
inline

Definition at line 133 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

◆ SetDummy()

void TGo4MbsEvent::SetDummy ( Short_t dummy)
inline

Definition at line 144 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

◆ SetPrintEvent()

void TGo4MbsEvent::SetPrintEvent ( Int_t num,
Int_t sid,
Int_t longw,
Int_t hexw,
Int_t dataw )

Set print parameter for MBS event source See TGo4MbsSource for more details.

Definition at line 260 of file TGo4MbsEvent.cxx.

References TGo4EventElement::GetEventSource(), TGo4MbsSource::SetPrintEvent(), and TGo4MbsSource.

◆ SetSubtype()

void TGo4MbsEvent::SetSubtype ( Short_t subtype)
inline

Definition at line 141 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

◆ SetTrigger()

void TGo4MbsEvent::SetTrigger ( Short_t trigger)
inline

Definition at line 147 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

◆ SetType()

void TGo4MbsEvent::SetType ( Short_t type)
inline

Definition at line 138 of file TGo4MbsEvent.h.

References fxHeader.

Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().

◆ SimpleInit()

void TGo4MbsEvent::SimpleInit ( )
private

Friends And Related Symbol Documentation

◆ TGo4MbsSource

friend class TGo4MbsSource
friend

Definition at line 37 of file TGo4MbsEvent.h.

References TGo4MbsEvent(), and TGo4MbsSource.

Referenced by GetMbsBufferHeader(), GetMbsSourceHeader(), SetPrintEvent(), and TGo4MbsSource.

Field Documentation

◆ fbIsReference

Bool_t TGo4MbsEvent::fbIsReference {kFALSE}
private

Indicates if this object is mere reference to another mbs event.

Definition at line 177 of file TGo4MbsEvent.h.

Referenced by TGo4MbsEvent(), TGo4MbsEvent(), TGo4MbsEvent(), TGo4MbsEvent(), ~TGo4MbsEvent(), AssignReference(), Clear(), and RemoveReference().

◆ fiSubEvIndex

Int_t TGo4MbsEvent::fiSubEvIndex {0}
private

Subevent index in array, replacement for Iterator.

Definition at line 174 of file TGo4MbsEvent.h.

Referenced by TGo4MbsEvent(), TGo4MbsEvent(), TGo4MbsEvent(), TGo4MbsEvent(), NextSubEvent(), and ResetIterator().

◆ fxHeader

◆ fxSubEvArray

TObjArray* TGo4MbsEvent::fxSubEvArray {nullptr}
private

dynamic array of subevents.

Definition at line 171 of file TGo4MbsEvent.h.

Referenced by TGo4MbsEvent(), TGo4MbsEvent(), ~TGo4MbsEvent(), AddSubEvent(), AssignReference(), NextSubEvent(), and SimpleInit().


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