98 const ULONGLONG
ticOffset = 35067168000000000UL;
101 const unsigned long long ticOffset = 35067168000000000ULL;
115 unsigned long long x,
y,
z;
160 os <<
"History Block: " << std::endl;
193 os <<
"Error Block: " << std::endl;
227 os <<
"Frame length: " << std::dec <<
getFrameLength(fp) << std::endl;
228 os <<
"Frame mark: " << std::hex <<
getFrameMark(fp) << std::dec << std::endl;
232 os <<
"Frame Seq Number: " << (((*(fp+3))&0xff000000)>>24) << std::endl;
233 os <<
"Frame Seq Code: " << (((*(fp+3))&0x00ff0000)>>24) << std::endl;
245 os <<
" - Alignment word " <<
SETW(2) << i <<
": 0x" ;
248 os <<
SETW(8) << std::hex << *p++ << std::dec << std::endl;
260 if ( nerr == 0 )
return;
263 for (
UINT i=0; i<nerr; ++i)
266 os <<
"ErrorEntry " << i <<
": ";
269 <<
"deviceId: " << std::dec << e.
deviceId <<
" "
272 <<
"addData: (" << std::hex << e.
addData[0] <<
"," << std::hex << e.
addData[1] <<
")"
284 os <<
" (empty)\n" << std::endl;
295 os <<
SETW(5) << j <<
" | ";
296 for (
UINT l=0; l<4; l++ )
298 if ( j >= len )
break;
299 os << std::hex <<
SETW(8) << p[j++] <<
" " ;
301 if ( j >= len )
break;
302 os << std::dec << std::endl;
310 os << std::dec <<
SETW(5) << j <<
" | ";
312 for (
UINT l=0; l<6; l++ )
314 os <<
SETW(10) << p[j++] <<
" ";
315 if ( j >= len )
break;
317 if ( j >= len )
break;
325 os << std::endl << std::endl;
367 else if ( strcmp(what,
"FRAMEMARK") ==0)
return getFrameMark(fp);
370 else if ( strcmp(what,
"FRAMESTATUS") == 0)
return getFrameStatus(fp);
373 else if ( strcmp(what,
"FRAMETYPE") == 0)
return getFrameType(fp);
375 else if ( strcmp(what,
"FRAMEALIGNMENTWORD") == 0)
393 #if !defined(SunOS) && !defined(OSF1)
408 unsigned int pos_in_event;
428 std::cout <<
"Found wrong packet length " << *pp
429 << std::hex <<
"(0x" << *pp <<
")" << std::dec
433 <<
" PosInEvent: " << pos_in_event
438 if ( pp != 0 && *pp == 0)
440 std::cout <<
"found 0-length packet" << std::endl;
488 int wanted_hitformat;
527 if (entries >= ne)
return ne;
534 std::cout <<
"Found wrong packet length " << *pp << std::endl;
537 if ( pp != 0 && *pp == 0)
539 std::cout <<
"found 0-length packet" << std::endl;
562 int wanted_hitformat;
567 if (hitFormat) wanted_hitformat = hitFormat;
570 switch (wanted_hitformat)
745 #if !defined(SunOS) && !defined(OSF1)
777 char *to = (
char *) array;
780 if ( strcmp (what,
"DATA") ==0 )
793 memcpy (to, from, l*4);
835 int number_of_frames = 0;
842 while (index < max_index && cont)
854 COUT <<
"invalid frame header, frame nr " << number_of_frames <<
" index = " << index << std::endl;
866 COUT << i <<
" " << std::hex << f[i] << std::dec << std::endl;
885 while (index < max_index && cont)
896 COUT <<
"invalid frame header, frame nr " << ifn <<
" index = " << index << std::endl;
898 COUT << i <<
" " << std::hex << f[i] << std::dec << std::endl;
912 #if !defined(SunOS) && !defined(OSF1)