16 #include "TObjArray.h"
38 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent()",__LINE__, __FILE__));
49 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent(UInt_t, Short_t, UInt_t)",__LINE__, __FILE__));
52 for (UInt_t t=0;t<subnum;++t) {
71 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent(UInt_t, Char_t*, Char_t*, Short_t* UInt_t)",__LINE__, __FILE__));
74 for (UInt_t t=0;t<subnum;++t) {
92 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent(const char)",__LINE__, __FILE__));
113 GO4TRACE((12,
"TGo4MbsEvent::~TGo4MbsEvent()",__LINE__, __FILE__));
125 GO4TRACE((11,
"TGo4MbsEvent::Clear()",__LINE__, __FILE__));
163 Short_t dummy, Short_t trigger, Int_t count)
197 printf(
"***** File header:\n");
203 printf(
"\t#commentlines: %d\n", head->
filhe_lines);
213 printf(
"***** Buffer header:\n");
214 printf(
"\tbuffernumber: %d \n", head->
l_buf);
215 printf(
"\tdatalen: %d \n", head->
l_dlen);
216 printf(
"\ttime lo: %u\n", head->
l_time[0]);
217 printf(
"\ttime hi: %u\n", head->
l_time[1]);
220 printf(
"\ttimestring: %s\n", sbuf);
221 printf(
"\ttype: %d \n", head->
i_type);
222 printf(
"\tsubtype: %d \n", head->
i_subtype);
228 static TString oldfname =
"";
229 static TString timestring =
"";
232 if (head && (TString(head->
filhe_file) != oldfname)) {
237 static int oldbnum = 0;
240 if ( head && (head->
l_buf != oldbnum) ) {
242 oldbnum = head->
l_buf;
252 printf(
"Event %9d Type/Subtype %5d %5d Length %5d[w] Trigger %2d %s\n",
255 printf(
"Event type %d, subtype %d, data longwords %d",
264 if ((subid>=0) && (sub->
GetProcid()!=subid))
continue;
280 GO4TRACE((11,
"TGo4MbsEvent::NextSubEvent()",__LINE__, __FILE__));
296 GO4TRACE((11,
"TGo4MbsEvent::GetSubEvent(Char_t)",__LINE__, __FILE__));
308 GO4TRACE((11,
"TGo4MbsEvent::GetSubEvent(Short_t)",__LINE__, __FILE__));
312 if(sub->
GetProcid()== procid)
return sub;
331 Int_t fieldlength =0;
335 fieldlength = (datalength-2) / (
sizeof(Int_t) /
sizeof(Short_t));
342 while ( ( subtargetindex =
NextSubEvent(kTRUE) ) !=0 ) {
344 Int_t* subtargetid= &((subtargetindex->
fxHeader).fiFullid);
345 if(*subtargetid == fullID) {
349 subtarget=subtargetindex;
362 Int_t* newsubtargetid= &((subtarget->
fxHeader).fiFullid);
365 delete [] (subtarget->
fiData);
368 *newsubtargetid = fullID;
369 TGo4Log::Debug(
" Created new output subevent for event\n\tpid:%d subcrate:%d ctrl:%d",
375 subtarget->
SetDlen(datalength);
376 void* data = (
void*) source;
382 memcpy((
void*) (subtarget->
fiData),
383 data, (datalength-2)*
sizeof(Short_t));
389 subtarget->
fiData= (Int_t*) data;
void SetCount(Int_t count)
TGo4MbsSubEvent * AddSubEvent(Int_t fullID, Short_t *source, Int_t datalength, Bool_t copydata=kFALSE)
virtual void Clear(Option_t *t="")
s_bufhe * GetMbsBufferHeader()
virtual void Clear(Option_t *t="")
void PrintMbsSubevent(Bool_t longw=kTRUE, Bool_t hexw=kTRUE, Bool_t dataw=kTRUE)
Short_t GetSubtype() const
void SetControl(Char_t control)
TGo4EventSource * GetEventSource() const
virtual void PrintEvent()
TGo4SubEventHeader10 fxHeader
struct cv_string s_strings[30]
TGo4MbsSubEvent * NextSubEvent(Bool_t all=kFALSE)
s_filhe * GetInfoHeader()
void SetSubcrate(Char_t subcrate)
TGo4EventHeader10 fxHeader
void SetSubtype(Short_t subtype)
void SetDummy(Short_t dummy)
void SetType(Short_t type)
void SetProcid(Short_t procid)
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 AssignReference(TGo4MbsEvent *ref)
void PrintMbsFileHeader()
INTS4 f_ut_utime(INTS4, INTS4, CHARS *)
void PrintMbsBufferHeader()
s_filhe * GetMbsSourceHeader()
void SetPrintEvent(Int_t num, Int_t sid, Int_t longw, Int_t hexw, Int_t dataw)
Short_t GetProcid() const
Char_t GetSubcrate() const
void SetPrintEvent(Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0)
Short_t GetTrigger() const
Char_t GetControl() const
virtual s_bufhe * GetBufferHeader()
TGo4MbsSubEvent * GetSubEvent(Char_t subcrate, Char_t ctrl, Short_t procid)
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 SetTrigger(Short_t trigger)
static void Debug(const char *text,...)
void ReAllocate(Int_t newsize)