3 #include "EEmcEventHeader.h"
25 EEmcEventHeader :: ~EEmcEventHeader()
27 if(mComment)
delete [] mComment;
31 void EEmcEventHeader :: setComment(
const char* s) {
32 mCommentLen = (strlen(s)/8+1)*8;
34 if(mComment)
delete [] mComment;
35 mComment =
new char[mCommentLen];
36 strncpy(mComment,s,mCommentLen);
43 void EEmcEventHeader :: clear() {
49 if(mComment)
delete [] mComment;
57 void EEmcEventHeader :: print(FILE *fd)
const{
58 fprintf(fd,
"EEmcEventHeader:\n");
59 fprintf(fd,
"\trun number : %-6d \n",mRunNumber);
60 fprintf(fd,
"\tevent number : %-6d (0x%06x)\n",mEventNumber,mEventNumber);
61 fprintf(fd,
"\ttoken : %-6d (0x%03x)\n",mToken ,mToken);
62 fprintf(fd,
"\ttime stamp : %ld / %s",mTimeStamp,
63 ctime((
const time_t *)&mTimeStamp));
64 fprintf(fd,
"\tproc. time : %ld / %s",mProcessingTime,
65 ctime((
const time_t *)&mProcessingTime));
67 fprintf(fd,
"\tcomment : %s\n" ,mComment);
68 fprintf(fd,
"\tstatus : 0x%08x\n",mStatus);