5 #include "StarRoot/TUnixTime.h"
12 SetDateTime(20330101,0);
14 memset(&mRunNumber,0,(
char*)(&mEventNumber)-(
char*)&mRunNumber);
15 mRunNumber=-1;mOldRunNumber=-2;mEventNumber=-1;
20 if (!GetName() [0]) SetName (hddr.GetName ());
21 if (!GetTitle()[0]) SetTitle(hddr.GetTitle());
22 memcpy(&mRunNumber,&hddr.mRunNumber,(
char*)((&mEventNumber)+1)-(
char*)&mRunNumber);
23 mEventTime = hddr.mEventTime;
24 mProdTime = hddr.mProdTime;
25 mEventType = hddr.mEventType;
32 assert((
char*)&mEventNumber -(
char*)&mRunNumber
33 ==(
char*)&tag->mEventNumber-(
char*)&tag->mRunNumber);
35 memcpy(tag,&mRunNumber,(
char*)(&mEventNumber+1)-(
char*)&mRunNumber);
36 tag->mEventTime = mEventTime.GetDate() + mEventTime.GetTime()/1000000.;
37 tag->mProdTime = mProdTime.GetDate() + mProdTime.GetTime()/1000000. ;
38 tag->mEventType[0] = 0;
39 strncat(tag->mEventType,mEventType,15);
42 void StEvtHddr::SetGMTime(UInt_t ut)
46 unixTime.GetGTime(dat,tim);
47 mEventTime.Set(dat,tim);
50 void StEvtHddr::SetProdDateTime(UInt_t ut)
54 unixTime.GetGTime(dat,tim);
55 mProdTime.Set(dat,tim);
58 UInt_t StEvtHddr::GetUTime()
const
61 unixTime.SetGTime(mEventTime.GetDate(),mEventTime.GetTime());
62 return unixTime.GetUTime();
65 void StEvtHddr::Print(Option_t *option)
const
68 (
"*********** Event Info **********************")
71 (
"\tRun: \t%5d Event %5d TimeStamp %8d.%6d Bunch %d:%d"
72 ,mRunNumber,mEventNumber,mEventTime.GetDate(),mEventTime.GetTime()
73 ,mBunchCrossingNumber[0],mBunchCrossingNumber[1])
76 (
"\t EvtSize: %d \tInpTrig: %4x OutTrig: %4x"
77 ,mEventSize,mInputTriggerMask,mTriggerMask)
80 (
"*********************************************")