#include <TGo4MbsEvent.h>
Public Member Functions | |
TGo4MbsEvent () | |
TGo4MbsEvent (UInt_t subnum, Short_t *subids, UInt_t datasize=100) | |
TGo4MbsEvent (UInt_t subnum, Char_t *subcrates, Char_t *controls, Short_t *procids, UInt_t *datasizes) | |
TGo4MbsEvent (const char *name) | |
virtual | ~TGo4MbsEvent () |
virtual void | Clear (Option_t *t="") |
void | AssignReference (TGo4MbsEvent *ref) |
void | RemoveReference () |
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) |
virtual void | PrintEvent () |
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) |
void | ResetIterator () |
TGo4MbsSubEvent * | NextSubEvent (Bool_t all=kFALSE) |
TGo4MbsSubEvent * | GetSubEvent (Char_t subcrate, Char_t ctrl, Short_t procid) |
TGo4MbsSubEvent * | GetSubEvent (Short_t procid) |
TGo4MbsSubEvent * | AddSubEvent (Int_t fullID, Short_t *source, Int_t datalength, Bool_t copydata=kFALSE) |
void | SetDlen (Int_t dlen) |
Int_t | GetDlen () const |
Int_t | GetIntLen () const |
Int_t | GetByteLen () const |
void | SetType (Short_t type) |
Short_t | GetType () const |
void | SetSubtype (Short_t subtype) |
Short_t | GetSubtype () const |
void | SetDummy (Short_t dummy) |
Short_t | GetDummy () const |
void | SetTrigger (Short_t trigger) |
Short_t | GetTrigger () const |
void | SetCount (Int_t count) |
Int_t | GetCount () const |
s_filhe * | GetMbsSourceHeader () |
void | PrintMbsFileHeader () |
s_bufhe * | GetMbsBufferHeader () |
void | PrintMbsBufferHeader () |
Private Member Functions | |
void | SimpleInit () |
Private Attributes | |
TGo4EventHeader10 | fxHeader |
TObjArray * | fxSubEvArray |
Int_t | fiSubEvIndex |
Bool_t | fbIsReference |
Friends | |
class | TGo4MbsSource |
Wrapper for the standard gsi event structure as delivered from mbs.
Definition at line 33 of file TGo4MbsEvent.h.
TGo4MbsEvent::TGo4MbsEvent | ( | ) |
Definition at line 31 of file TGo4MbsEvent.cxx.
References GO4TRACE.
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 42 of file TGo4MbsEvent.cxx.
References Clear(), fxSubEvArray, GO4TRACE, and TGo4MbsSubEvent::SetProcid().
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 60 of file TGo4MbsEvent.cxx.
References Clear(), fxSubEvArray, GO4TRACE, TGo4MbsSubEvent::SetControl(), TGo4MbsSubEvent::SetProcid(), and TGo4MbsSubEvent::SetSubcrate().
TGo4MbsEvent::TGo4MbsEvent | ( | const char * | name | ) |
Ctor expecting just a name. Auxiliary to support mbs event in the generic step factory.
Definition at line 85 of file TGo4MbsEvent.cxx.
References GO4TRACE, and SimpleInit().
TGo4MbsEvent::~TGo4MbsEvent | ( | ) | [virtual] |
Definition at line 111 of file TGo4MbsEvent.cxx.
References fbIsReference, fxSubEvArray, and GO4TRACE.
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 322 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().
void TGo4MbsEvent::AssignReference | ( | TGo4MbsEvent * | ref | ) |
Definition at line 134 of file TGo4MbsEvent.cxx.
References fbIsReference, TGo4EventHeader10::fiCount, TGo4GSIEventHeader::fiDlen, TGo4EventHeader10::fsDummy, TGo4GSIEventHeader::fsSubtype, TGo4EventHeader10::fsTrigger, TGo4GSIEventHeader::fsType, TGo4EventHeader10::fxGSIHeader, fxHeader, and fxSubEvArray.
void TGo4MbsEvent::Clear | ( | Option_t * | t = "" |
) | [virtual] |
Method called by the event owner (analysis step) to clear the event element.
Reimplemented from TGo4EventElement.
Definition at line 123 of file TGo4MbsEvent.cxx.
References TGo4MbsSubEvent::Clear(), fbIsReference, GO4TRACE, NextSubEvent(), and ResetIterator().
Referenced by SimpleInit(), and TGo4MbsEvent().
Int_t TGo4MbsEvent::GetByteLen | ( | ) | const [inline] |
Definition at line 130 of file TGo4MbsEvent.h.
References GetDlen().
Int_t TGo4MbsEvent::GetCount | ( | ) | const [inline] |
Definition at line 145 of file TGo4MbsEvent.h.
References TGo4EventHeader10::fiCount, and fxHeader.
Referenced by TXXXUnpackProc::BuildEvent(), TGo4CompositeProcessor::BuildEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), PrintMbsEvent(), TMeshAnalysis::UserEventFunc(), and TXXXAnalysis::UserEventFunc().
Int_t TGo4MbsEvent::GetDlen | ( | ) | const [inline] |
Definition at line 128 of file TGo4MbsEvent.h.
References TGo4GSIEventHeader::fiDlen, TGo4EventHeader10::fxGSIHeader, and fxHeader.
Referenced by GetByteLen(), GetIntLen(), PrintMbsEvent(), and TMeshAnalysis::UserEventFunc().
Short_t TGo4MbsEvent::GetDummy | ( | ) | const [inline] |
Definition at line 139 of file TGo4MbsEvent.h.
References TGo4EventHeader10::fsDummy, and fxHeader.
Int_t TGo4MbsEvent::GetIntLen | ( | ) | const [inline] |
Definition at line 129 of file TGo4MbsEvent.h.
References GetDlen().
s_bufhe * TGo4MbsEvent::GetMbsBufferHeader | ( | ) |
Access to the buffer header of the current event
Definition at line 316 of file TGo4MbsEvent.cxx.
References TGo4MbsSource::GetBufferHeader(), and TGo4EventElement::GetEventSource().
Referenced by PrintMbsBufferHeader(), and PrintMbsEvent().
s_filhe * TGo4MbsEvent::GetMbsSourceHeader | ( | ) |
Access to the info header of the current mbs source
Definition at line 310 of file TGo4MbsEvent.cxx.
References TGo4EventElement::GetEventSource(), and TGo4MbsSource::GetInfoHeader().
Referenced by PrintMbsEvent(), and PrintMbsFileHeader().
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 287 of file TGo4MbsEvent.cxx.
References TGo4MbsSubEvent::GetControl(), TGo4MbsSubEvent::GetProcid(), TGo4MbsSubEvent::GetSubcrate(), GO4TRACE, NextSubEvent(), and ResetIterator().
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 299 of file TGo4MbsEvent.cxx.
References TGo4MbsSubEvent::GetProcid(), GO4TRACE, NextSubEvent(), and ResetIterator().
Short_t TGo4MbsEvent::GetSubtype | ( | ) | const [inline] |
Definition at line 136 of file TGo4MbsEvent.h.
References TGo4GSIEventHeader::fsSubtype, TGo4EventHeader10::fxGSIHeader, and fxHeader.
Referenced by PrintMbsEvent().
Short_t TGo4MbsEvent::GetTrigger | ( | ) | const [inline] |
Definition at line 142 of file TGo4MbsEvent.h.
References TGo4EventHeader10::fsTrigger, and fxHeader.
Referenced by TXXXProc::BuildEvent(), TGo4CompositeProcessor::BuildEvent(), and PrintMbsEvent().
Short_t TGo4MbsEvent::GetType | ( | ) | const [inline] |
Definition at line 133 of file TGo4MbsEvent.h.
References TGo4GSIEventHeader::fsType, TGo4EventHeader10::fxGSIHeader, and fxHeader.
Referenced by PrintMbsEvent().
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 271 of file TGo4MbsEvent.cxx.
References fiSubEvIndex, fxSubEvArray, GO4TRACE, and TGo4MbsSubEvent::IsFilled().
Referenced by AddSubEvent(), TXXXUnpackProc::BuildEvent(), TXXXProc::BuildEvent(), TGo4CompositeProcessor::BuildEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetSubEvent(), PrintMbsEvent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
void TGo4MbsEvent::PrintEvent | ( | ) | [virtual] |
Print event with default settings
Reimplemented from TGo4EventElement.
Definition at line 173 of file TGo4MbsEvent.cxx.
References PrintMbsEvent().
void TGo4MbsEvent::PrintMbsBufferHeader | ( | ) |
Method to print MBS buffer header
Definition at line 208 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(), TMeshAnalysis::UserEventFunc(), and TMeshAnalysis::UserPostLoop().
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
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 226 of file TGo4MbsEvent.cxx.
References f_ut_utime(), s_filhe::filhe_file, GetCount(), GetDlen(), GetMbsBufferHeader(), GetMbsSourceHeader(), TGo4MbsSubEvent::GetProcid(), GetSubtype(), GetTrigger(), GetType(), s_bufhe::l_buf, s_bufhe::l_time, NextSubEvent(), PrintMbsBufferHeader(), PrintMbsFileHeader(), TGo4MbsSubEvent::PrintMbsSubevent(), and ResetIterator().
Referenced by TGo4PrintProcessor::BuildEvent(), and PrintEvent().
void TGo4MbsEvent::PrintMbsFileHeader | ( | ) |
Method to print MBS source header
Definition at line 193 of file TGo4MbsEvent.cxx.
References s_filhe::filhe_dlen, s_filhe::filhe_file, s_filhe::filhe_file_l, s_filhe::filhe_lines, s_filhe::filhe_subtype, s_filhe::filhe_type, GetMbsSourceHeader(), s_filhe::s_strings, and cv_string::string.
Referenced by PrintMbsEvent(), TMeshAnalysis::UserPostLoop(), and TXXXAnalysis::UserPreLoop().
void TGo4MbsEvent::RemoveReference | ( | ) |
Definition at line 155 of file TGo4MbsEvent.cxx.
References fbIsReference, and SimpleInit().
void TGo4MbsEvent::ResetIterator | ( | ) | [inline] |
Set the internal iterator of the subevent array to the beginning of the array.
Definition at line 94 of file TGo4MbsEvent.h.
References fiSubEvIndex.
Referenced by AddSubEvent(), TXXXUnpackProc::BuildEvent(), TXXXProc::BuildEvent(), TGo4CompositeProcessor::BuildEvent(), TGo4SimpleEventProcessor::BuildSimpleEvent(), Clear(), GetSubEvent(), PrintMbsEvent(), TMeshUnpackProc::UnpackBranch1(), TMeshUnpackProc::UnpackBranch2(), and TMeshUnpackProc::UnpackBranch3().
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 162 of file TGo4MbsEvent.cxx.
References SetCount(), SetDlen(), SetDummy(), SetSubtype(), SetTrigger(), and SetType().
Referenced by SimpleInit().
void TGo4MbsEvent::SetCount | ( | Int_t | count | ) | [inline] |
Definition at line 144 of file TGo4MbsEvent.h.
References TGo4EventHeader10::fiCount, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
void TGo4MbsEvent::SetDlen | ( | Int_t | dlen | ) | [inline] |
Definition at line 127 of file TGo4MbsEvent.h.
References TGo4GSIEventHeader::fiDlen, TGo4EventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
void TGo4MbsEvent::SetDummy | ( | Short_t | dummy | ) | [inline] |
Definition at line 138 of file TGo4MbsEvent.h.
References TGo4EventHeader10::fsDummy, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
void TGo4MbsEvent::SetSubtype | ( | Short_t | subtype | ) | [inline] |
Definition at line 135 of file TGo4MbsEvent.h.
References TGo4GSIEventHeader::fsSubtype, TGo4EventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
void TGo4MbsEvent::SetTrigger | ( | Short_t | trigger | ) | [inline] |
Definition at line 141 of file TGo4MbsEvent.h.
References TGo4EventHeader10::fsTrigger, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
void TGo4MbsEvent::SetType | ( | Short_t | type | ) | [inline] |
Definition at line 132 of file TGo4MbsEvent.h.
References TGo4GSIEventHeader::fsType, TGo4EventHeader10::fxGSIHeader, and fxHeader.
Referenced by TGo4MbsSource::BuildMbsEvent(), and Set().
void TGo4MbsEvent::SimpleInit | ( | ) | [private] |
Definition at line 96 of file TGo4MbsEvent.cxx.
References Clear(), fxSubEvArray, Set(), TGo4MbsSubEvent::SetControl(), TGo4MbsSubEvent::SetProcid(), and TGo4MbsSubEvent::SetSubcrate().
Referenced by RemoveReference(), and TGo4MbsEvent().
friend class TGo4MbsSource [friend] |
Definition at line 35 of file TGo4MbsEvent.h.
Bool_t TGo4MbsEvent::fbIsReference [private] |
Indicates if this object is mere reference to another mbs event
Definition at line 172 of file TGo4MbsEvent.h.
Referenced by AssignReference(), Clear(), RemoveReference(), and ~TGo4MbsEvent().
Int_t TGo4MbsEvent::fiSubEvIndex [private] |
Subevent index in array, replacement for Iterator.
Definition at line 169 of file TGo4MbsEvent.h.
Referenced by NextSubEvent(), and ResetIterator().
TGo4EventHeader10 TGo4MbsEvent::fxHeader [private] |
Definition at line 163 of file TGo4MbsEvent.h.
Referenced by AssignReference(), GetCount(), GetDlen(), GetDummy(), GetSubtype(), GetTrigger(), GetType(), SetCount(), SetDlen(), SetDummy(), SetSubtype(), SetTrigger(), and SetType().
TObjArray* TGo4MbsEvent::fxSubEvArray [private] |
dynamic array of subevents.
Definition at line 166 of file TGo4MbsEvent.h.
Referenced by AddSubEvent(), AssignReference(), NextSubEvent(), SimpleInit(), TGo4MbsEvent(), and ~TGo4MbsEvent().