17 for (
int i = 0; i < 4; i++)
82 _evtnr = SubeventData[0] & 0xffff;
83 _detid = SubeventData[2] & 0xffff;
86 _clock = SubeventData[4] & 0xffff;
111 k = &SubeventData[
offset];
115 for (
int index = 0; index < dlength ; index++)
118 int rawtag = ((k[index] >> 16) & 0x3fff);
119 int realtag = rawtag -9;
126 for ( module = 0; module < 4; module++)
128 if ( realtag < (module+1) * 64 *
_nsamples + 6*module )
break;
139 int tag = realtag - 6*module;
141 int value = k[index] & 0x3fff;
146 if ( module > 0 && realtag < ( module*64*
_nsamples + 6*module ) )
149 if ( realtag == module*64*
_nsamples +2 + 6*(module -1) )
163 int channelpair = (tag /
_nsamples) & 0xfffe;
164 int ch = channelpair;
200 return array[sample][ch];
209 if ( strcmp(what,
"CLOCK") == 0 )
214 if ( strcmp(what,
"EVTNR") == 0 )
219 if ( strcmp(what,
"SAMPLES") == 0 )
224 if ( strcmp(what,
"NRMODULES") == 0 )
230 if ( strcmp(what,
"CHANNELS") == 0 )
235 if ( strcmp(what,
"DETID") == 0 )
240 if ( strcmp(what,
"MODULEADDRESS") == 0 )
246 if ( strcmp(what,
"FEMSLOT") == 0 )
252 if ( strcmp(what,
"FEMEVTNR") == 0 )
258 if ( strcmp(what,
"FEMCLOCK") == 0 )
264 if ( strcmp(what,
"EVENCHECKSUM") == 0 )
269 if ( strcmp(what,
"ODDCHECKSUM") == 0 )
274 if ( strcmp(what,
"CALCEVENCHECKSUM") == 0 )
279 if ( strcmp(what,
"CALCODDCHECKSUM") == 0 )
284 if ( strcmp(what,
"EVENCHECKSUMOK") == 0 )
291 if ( strcmp(what,
"ODDCHECKSUMOK") == 0 )
306 os <<
"Evt Nr: " <<
iValue(0,
"EVTNR") << std::endl;
307 os <<
"Clock: " <<
iValue(0,
"CLOCK") << std::endl;
308 os <<
"Nr Modules: " <<
iValue(0,
"NRMODULES") << std::endl;
309 os <<
"Channels: " <<
iValue(0,
"CHANNELS") << std::endl;
310 os <<
"Samples: " <<
iValue(0,
"SAMPLES") << std::endl;
311 os <<
"Det. ID: " << hex <<
"0x" <<
iValue(0,
"DETID") << dec << std::endl;
312 os <<
"Mod. Addr: " << hex <<
"0x" <<
iValue(0,
"MODULEADDRESS") << dec << std::endl;
315 for (
int i = 0; i <
iValue(0,
"NRMODULES"); i++) os << setw(8) <<
iValue(i,
"FEMSLOT");
318 os <<
"FEM Evt nr: ";
319 for (
int i = 0; i <
iValue(0,
"NRMODULES"); i++) os << setw(8) <<
iValue(i,
"FEMEVTNR");
323 for (
int i = 0; i <
iValue(0,
"NRMODULES"); i++) os << setw(8) <<
iValue(i,
"FEMCLOCK");
326 os <<
"Even chksum: 0x" << hex <<
iValue(0,
"EVENCHECKSUM") <<
" calculated: 0x" <<
iValue(0,
"CALCEVENCHECKSUM");
327 if (
iValue(0,
"EVENCHECKSUMOK") == 1) os <<
" ok" << endl;
328 else if (
iValue(0,
"EVENCHECKSUMOK") == 0) os <<
" **wrong" << endl;
330 os <<
"Odd chksum: 0x" << hex <<
iValue(0,
"ODDCHECKSUM") <<
" calculated: 0x" <<
iValue(0,
"CALCODDCHECKSUM");
331 if (
iValue(0,
"ODDCHECKSUMOK") == 1) os <<
" ok" << endl;
332 else if (
iValue(0,
"ODDCHECKSUMOK") == 0) os <<
" **wrong" << endl;
337 os << setw(4) <<
c <<
" | ";