19 if (buf == 0)
return 0;
23 for (i =0; i<dlength; i++) *k++ = buf[i];
34 if (strcmp(what,
"EVCLOCK")==0)
37 if( (ich<0) || (ich>3) )
return -1;
44 else if (strcmp(what,
"PARVECT")==0)
67 if( (ich<0) || (ich>3) )
return -1;
98 unsigned int delta = 0;
104 if (buf == 0)
return;
107 os <<
"GL1 Clock Counter Event Difference Data Packet:" << std::endl;
108 os <<
" Clock counter for this event (N) = " << buf[0];
110 os <<
", Partition = 0x" << std::hex << buf[4] << std::dec << std::endl;
114 os <<
" Clock counter for N-1 event = " << buf[1];
115 if(dlength>=8) os <<
", Partition = 0x" << std::hex << buf[5] << std::dec;
117 delta = buf[0]-buf[1];
119 delta = 0xFFFFFFFF-buf[1] + buf[0] + 1;
120 os << std::endl <<
" (delta from this event = " << delta <<
" clocks, " << delta*0.106 <<
" microseconds)" << std::endl;
122 os <<
" Clock counter for N-2 event = " << buf[2];
123 if(dlength>=8) os <<
", Partition = 0x" << std::hex << buf[6] << std::dec;
125 delta = buf[0]-buf[2];
127 delta = 0xFFFFFFFF-buf[2] + buf[0] + 1;
128 os << std::endl <<
" (delta from this event = " << delta <<
" clocks, " << delta*0.106 <<
" microseconds)" << std::endl;
130 os <<
" Clock counter for N-3 event = " << buf[3];
131 if(dlength>=8) os <<
", Partition = 0x" << std::hex << buf[7] << std::dec;
133 delta = buf[0]-buf[3];
135 delta = 0xFFFFFFFF-buf[3] + buf[0] + 1;
136 os << std::endl <<
" (delta from this event = " << delta <<
" clocks, " << delta*0.106 <<
" microseconds)" << std::endl;
143 oldFill=os.fill(
'0');
151 os << std::endl << std::dec <<
SETW(5) << j <<
" | ";
154 os << std::hex <<
SETW(8) << k[j++] <<
" ";
155 if (j>=dlength)
break;
157 if (j>=dlength)
break;
160 for(m=0;m<54;m++) os<<
"=";
161 os << std::dec << std::endl;