27 GO4TRACE((12,
"TGo4MbstSubEvent::TGo4MbsSubEvent()",__LINE__, __FILE__));
39 GO4TRACE((12,
"TGo4MbsSubEvent::TGo4MbsSubEvent(UInt_t)",__LINE__, __FILE__));
42 fiData =
new Int_t[datasize];
44 for (Int_t t = 0; t < datasize; t++)
51 GO4TRACE((12,
"TGo4MbsSubEvent::~TGo4MbsSubEvent()",__LINE__, __FILE__));
58 TGo4Log::Debug(
" MBS SubEvent dtor WARNING: Data(%d) not zero after Clear !!! ", t);
66 GO4TRACE((11,
"TGo4MbsSubEvent::PrintEvent()",__LINE__, __FILE__));
96 printf(
" SubEv ID %6d Type/Subtype %5d %5d Length %5d[w] Control %2d Subcrate %2d\n",
107 for (Int_t
l = 0;
l < ll;
l++) {
111 printf(
"%04x.%04x ", (
unsigned)((*pl_data >> 16) & 0xffff), (
unsigned)(*pl_data & 0xffff));
113 printf(
"%8u ", (
unsigned)*pl_data);
119 if (ll%8 != 0) printf(
"\n");
122 for (Int_t
l = 0;
l < ll;
l++) {
126 printf(
"%6x%6x", (
unsigned)(*pl_data & 0xffff), (
unsigned)((*pl_data >> 16) & 0xffff));
128 printf(
"%8u%8u", (
unsigned)(*pl_data & 0xffff), (
unsigned)((*pl_data >> 16) & 0xffff));
155 GO4TRACE((11,
"TGo4MbsSubEvent::Clear()",__LINE__, __FILE__));
160 if(dleng == 0) dleng = 2;
169 for (Int_t i = 0; i < fieldlength; ++i)
178 GO4TRACE((11,
"TGo4MbsSubEvent::ReAllocate(UInt_t)",__LINE__, __FILE__));
184 fiData =
new Int_t[newsize];
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
static const UInt_t fguLONGBYSHORT
ratio sizeof(long) by sizeof(short).
Bool_t fbIsFilled
True if this subevent has already been filled in this event cycle.
Int_t * GetDataField() const
Direct access to the fiData field pointer.
TGo4SubEventHeader10 fxHeader
aggregationByValue
Int_t * fiData
Pointer to external integer field containing the subevent data.
void PrintEvent() override
Print event with default arguments.
void Set(Int_t dlen, Short_t type=10, Short_t subtype=1, Short_t procid=0, Char_t subcrate=0, Char_t ctrl=0)
virtual ~TGo4MbsSubEvent()
Short_t GetSubtype() const
Int_t GetAllocatedLength() const
Return length of allocated memory for data field.
Char_t GetSubcrate() const
void SetSubtype(Short_t subtype)
void Clear(Option_t *opt="") override
Int_t GetIntLen() const
Return raw data length in int (4-bytes)
void ReAllocate(Int_t newsize)
Allocate the data field with newsize.
Char_t GetControl() const
Short_t GetProcid() const
Bool_t fbIsDataOwner
True if subevent owns data field.
Int_t fiAllocLen
Length of the allocated data field.
void SetType(Short_t type)
void PrintMbsSubevent(Bool_t longw=kTRUE, Bool_t hexw=kTRUE, Bool_t dataw=kTRUE)
Print MBS subevent.