16 #include "TObjArray.h"
32 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent()",__LINE__, __FILE__));
43 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent(UInt_t, Short_t, UInt_t)",__LINE__, __FILE__));
46 for (UInt_t t=0;t<subnum;++t) {
65 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent(UInt_t, Char_t*, Char_t*, Short_t* UInt_t)",__LINE__, __FILE__));
68 for (UInt_t t=0;t<subnum;++t) {
86 GO4TRACE((12,
"TGo4MbsEvent::TGo4MbsEvent(const char)",__LINE__, __FILE__));
107 GO4TRACE((12,
"TGo4MbsEvent::~TGo4MbsEvent()",__LINE__, __FILE__));
119 GO4TRACE((11,
"TGo4MbsEvent::Clear()",__LINE__, __FILE__));
157 Short_t dummy, Short_t trigger, Int_t count)
191 printf(
"***** File header:\n");
197 printf(
"\t#commentlines: %d\n", head->
filhe_lines);
207 printf(
"***** Buffer header:\n");
208 printf(
"\tbuffernumber: %d \n", head->
l_buf);
209 printf(
"\tdatalen: %d \n", head->
l_dlen);
210 printf(
"\ttime lo: %u\n", head->
l_time[0]);
211 printf(
"\ttime hi: %u\n", head->
l_time[1]);
214 printf(
"\ttimestring: %s\n", sbuf);
215 printf(
"\ttype: %d \n", head->
i_type);
216 printf(
"\tsubtype: %d \n", head->
i_subtype);
222 static TString oldfname =
"";
223 static TString timestring =
"";
226 if (head && (TString(head->
filhe_file) != oldfname)) {
231 static int oldbnum = 0;
234 if ( head && (head->
l_buf != oldbnum) ) {
236 oldbnum = head->
l_buf;
246 printf(
"Event %9d Type/Subtype %5d %5d Length %5d[w] Trigger %2d %s\n",
249 printf(
"Event type %d, subtype %d, data longwords %d",
258 if ((subid>=0) && (sub->
GetProcid()!=subid))
continue;
274 GO4TRACE((11,
"TGo4MbsEvent::NextSubEvent()",__LINE__, __FILE__));
290 GO4TRACE((11,
"TGo4MbsEvent::GetSubEvent(Char_t)",__LINE__, __FILE__));
302 GO4TRACE((11,
"TGo4MbsEvent::GetSubEvent(Short_t)",__LINE__, __FILE__));
306 if(sub->
GetProcid()== procid)
return sub;
325 Int_t fieldlength =0;
329 fieldlength = (datalength-2) / (
sizeof(Int_t) /
sizeof(Short_t));
336 while ( ( subtargetindex =
NextSubEvent(kTRUE) ) !=0 ) {
338 Int_t* subtargetid= &((subtargetindex->
fxHeader).fiFullid);
339 if(*subtargetid == fullID) {
343 subtarget=subtargetindex;
356 Int_t* newsubtargetid= &((subtarget->
fxHeader).fiFullid);
359 delete [] (subtarget->
fiData);
362 *newsubtargetid = fullID;
363 TGo4Log::Debug(
" Created new output subevent for event\n\tpid:%d subcrate:%d ctrl:%d",
369 subtarget->
SetDlen(datalength);
370 void* data = (
void*) source;
376 memcpy((
void*) (subtarget->
fiData),
377 data, (datalength-2)*
sizeof(Short_t));
383 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)