55 unsigned short *sdata = (
unsigned short *) &SubeventData[4];
81 sysword = ntohl(SubeventData[3]);
91 for ( i = 0; i < 2*(dlength-4); i+=4 )
95 unsigned long long x64 = ntohs( sdata[i+3]);
98 y = ntohs( sdata[i+2]);
102 y = ntohs( sdata[i+1]);
106 y = ntohs( sdata[i]);
109 unsigned long long t = x64 & 0x3fffffffffff
L;
110 unsigned int crystalid = ( x64 >> 52) & 0x1f;
111 unsigned int block = ( x64 >> 57) & 0x1f;
112 unsigned int rfgate = ( x64 >> 62) & 0x1;
113 unsigned int cardiac = ( x64 >> 63) & 0x1;
145 if ( strcmp(what,
"SAMPLES") == 0 )
150 if ( strcmp(what,
"BLOCKID") == 0 )
152 if ( ich < 0 || ich >=
samples)
return 0;
156 if ( strcmp(what,
"CRYSTALID") == 0 )
158 if ( ich < 0 || ich >=
samples)
return 0;
162 if ( strcmp(what,
"RFGATE") == 0 )
164 if ( ich < 0 || ich >=
samples)
return 0;
168 if ( strcmp(what,
"CARDIAC") == 0 )
170 if ( ich < 0 || ich >=
samples)
return 0;
174 if ( strcmp(what,
"SERIAL") == 0 )
179 if ( strcmp(what,
"UDPHEADER1") == 0 )
184 if ( strcmp(what,
"UDPHEADER2") == 0 )
189 if ( strcmp(what,
"EVENTRATE") == 0 )
194 if ( strcmp(what,
"RC_UP") == 0 )
199 if ( strcmp(what,
"CLOCKSELECT") == 0 )
213 if ( ich < 0 || ich >=
samples)
return 0;
222 if ( ich < 0 || ich >=
samples)
return 0;
232 int is =
iValue(0,
"SAMPLES");
246 os <<
" Clock setting: ";
247 if (
iValue(0,
"CLOCKSELECT") )
257 os <<
" Event rate: " <<
iValue(0,
"EVENTRATE") << endl;
258 os <<
" UDP Header 1, 2: " <<
iValue(0,
"UDPHEADER1")
259 <<
" " <<
iValue(0,
"UDPHEADER2") << endl;
260 os <<
" Serial Number : " <<
iValue(0,
"SERIAL") << endl;
262 os <<
" Samples: " <<
iValue(0,
"SAMPLES") << std::endl;
263 os <<
" sample B id C id time ( " << is <<
" Samples )" << std::endl;
265 for ( i = 0; i < is ; i++)
267 int prec = os.precision();
269 os << std::setw(5) << i <<
" | ";
271 os << std::setw(4) <<
iValue(i,
"BLOCKID") <<
" ";
272 os << std::setw(4) <<
iValue(i,
"CRYSTALID") <<
" ";
273 os << std::setw(24) << std::setprecision(24) << hex
276 << dec << std::setprecision(prec) <<
" " ;
277 os << std::setw(24) << std::setprecision(24) << hex <<
lValue(i) << dec
278 << std::setprecision(prec) ;