3 #include "EztEventHeader.h"
19 EztEventHeader :: ~EztEventHeader()
21 if(mComment)
delete [] mComment;
27 void EztEventHeader :: setComment(
const char* s) {
28 mCommentLen = (strlen(s)/8+1)*8;
29 if(mComment)
delete [] mComment;
30 mComment =
new char[mCommentLen];
31 strncpy(mComment,s,mCommentLen);
38 void EztEventHeader :: clear() {
44 if(mComment)
delete [] mComment;
52 void EztEventHeader :: print(
int flag, FILE *fd)
const{
53 fprintf(fd,
"EztEventHeader:\n");
54 fprintf(fd,
"\trun number : %-6d \n",mRunNumber);
55 fprintf(fd,
"\tevent number : %-6d (0x%06x)\n",mEventNumber,mEventNumber);
56 fprintf(fd,
"\ttoken : %-6d (0x%03x)\n",mToken ,mToken);
57 fprintf(fd,
"\ttime stamp : %ld / %s",mTimeStamp,
58 ctime((
const time_t *)&mTimeStamp));
59 fprintf(fd,
"\tproc. time : %ld / %s",mProcessingTime,
60 ctime((
const time_t *)&mProcessingTime));
62 fprintf(fd,
"\tcomment : %s\n" ,mComment);
63 fprintf(fd,
"\tstatus : 0x%08x\n",mStatus);