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;
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 )
298 if ( strcmp(what,
"CHECKSUMOK") == 0 )
317 os <<
"Evt Nr: " <<
iValue(0,
"EVTNR") << std::endl;
318 os <<
"Clock: " <<
iValue(0,
"CLOCK") << std::endl;
319 os <<
"Nr Modules: " <<
iValue(0,
"NRMODULES") << std::endl;
320 os <<
"Channels: " <<
iValue(0,
"CHANNELS") << std::endl;
321 os <<
"Samples: " <<
iValue(0,
"SAMPLES") << std::endl;
322 os <<
"Det. ID: " << hex <<
"0x" <<
iValue(0,
"DETID") << dec << std::endl;
323 os <<
"Mod. Addr: " << hex <<
"0x" <<
iValue(0,
"MODULEADDRESS") << dec << std::endl;
326 for (
int i = 0;
i <
iValue(0,
"NRMODULES");
i++) os << setw(8) <<
iValue(
i,
"FEMSLOT");
329 os <<
"FEM Evt nr: ";
330 for (
int i = 0;
i <
iValue(0,
"NRMODULES");
i++) os << setw(8) <<
iValue(
i,
"FEMEVTNR");
334 for (
int i = 0;
i <
iValue(0,
"NRMODULES");
i++) os << setw(8) <<
iValue(
i,
"FEMCLOCK");
337 os <<
"Even chksum: 0x" << hex <<
iValue(0,
"EVENCHECKSUM") <<
" calculated: 0x" <<
iValue(0,
"CALCEVENCHECKSUM");
338 if (
iValue(0,
"EVENCHECKSUMOK") == 1) os <<
" ok" << endl;
339 else if (
iValue(0,
"EVENCHECKSUMOK") == 0) os <<
" **wrong" << endl;
341 os <<
"Odd chksum: 0x" << hex <<
iValue(0,
"ODDCHECKSUM") <<
" calculated: 0x" <<
iValue(0,
"CALCODDCHECKSUM");
342 if (
iValue(0,
"ODDCHECKSUMOK") == 1) os <<
" ok" << endl;
343 else if (
iValue(0,
"ODDCHECKSUMOK") == 0) os <<
" **wrong" << endl;
348 os << setw(4) <<
c <<
" | ";