32 if ( (( *SubeventData >> 28) & 0xf ) != 0xa )
34 std::cout <<
"error in data structure" << std::endl;
37 dlength = *SubeventData & 0x0fffffff;
43 evnr = SubeventData[2] & 0x3fffff;
54 int size = SubeventData[4] & 0xfff;
58 memset(p, 0,
samples * 8 * 4 *
sizeof(
int));
61 int *p_tr =
new int [
samples * 4];
62 memset(p_tr, 0,
samples * 4 *
sizeof(
int));
69 freq = (SubeventData[4] >> 16) & 3;
76 for ( group_nr=0; group_nr < 4; group_nr++)
82 int *groupdata = &(SubeventData[group_offset]);
83 tr_present[group_nr] = (groupdata[0] >> 12) & 1;
84 index_cell[group_nr] = (groupdata[0] >> 20) & 0x3ff;
98 p[group_nr*samples*8 + samples * ch++ +
s] =( groupdata[
pos] & 0xfff);
99 p[group_nr*samples*8 + samples * ch++ +
s] =(groupdata[
pos] >> 12) & 0xfff;
100 p[group_nr*samples*8 + samples * ch++ +
s] = ((groupdata[
pos] >> 24) & 0xff) + ( (groupdata[pos+1] & 0xf)<<8);
102 p[group_nr*samples*8 + samples * ch++ +
s] =(groupdata[pos+1] >> 4) & 0xfff;
103 p[group_nr*samples*8 + samples * ch++ +
s] =(groupdata[pos+1] >> 16) & 0xfff;
104 p[group_nr*samples*8 + samples * ch++ +
s] =((groupdata[pos+1] >> 28) & 0xf) + ( (groupdata[pos+2] & 0xff)<<4);
106 p[group_nr*samples*8 + samples * ch++ +
s] =(groupdata[pos+2] >> 8) & 0xfff;
107 p[group_nr*samples*8 + samples * ch++ +
s] =(groupdata[pos+2] >> 20) & 0xfff;
116 p_tr[group_nr*samples + s++] = ( groupdata[
pos] & 0xfff);
117 p_tr[group_nr*samples + s++] =(groupdata[
pos] >> 12) & 0xfff;
118 p_tr[group_nr*samples + s++] = ((groupdata[
pos] >> 24) & 0xff) + ( (groupdata[pos+1] & 0xf)<<8);
120 p_tr[group_nr*samples + s++] =(groupdata[pos+1] >> 4) & 0xfff;
121 p_tr[group_nr*samples + s++] =(groupdata[pos+1] >> 16) & 0xfff;
122 p_tr[group_nr*samples + s++] =((groupdata[pos+1] >> 28) & 0xf) + ( (groupdata[pos+2] & 0xff)<<4);
124 p_tr[group_nr*samples + s++] =(groupdata[pos+2] >> 8) & 0xfff;
125 p_tr[group_nr*samples + s++] =(groupdata[pos+2] >> 20) & 0xfff;
130 group_offset += pos + 1;
155 if ( ch < 0 || ch >= 36 )
return 0;
156 if ( sample < 0 || sample >=
samples )
return 0;
168 if ( strcmp(what,
"SAMPLES") == 0 )
173 if ( strcmp(what,
"EVNR") == 0 )
178 if ( strcmp(what,
"TR0") == 0 )
180 if ( n <0 || n >=
samples)
return 0;
185 if ( strcmp(what,
"TR1") == 0 )
187 if ( n <0 || n >=
samples)
return 0;
192 if ( strcmp(what,
"TR0-0") == 0 )
194 if ( n <0 || n >=
samples)
return 0;
198 if ( strcmp(what,
"TR0-1") == 0 )
200 if ( n <0 || n >=
samples)
return 0;
204 if ( strcmp(what,
"TR1-0") == 0 )
206 if ( n <0 || n >=
samples)
return 0;
210 if ( strcmp(what,
"TR1-1") == 0 )
212 if ( n <0 || n >=
samples)
return 0;
217 if ( strcmp(what,
"INDEXCELL") == 0 )
219 if ( n <0 || n >=4)
return 0;
224 if ( strcmp(what,
"TRPRESENT") == 0 )
226 if ( n <0 || n >=4)
return 0;
231 if ( strcmp(what,
"FREQUENCY") == 0 )
236 if ( strcmp(what,
"GROUPPRESENT") == 0 )
238 if ( n <0 || n >=4)
return 0;
252 os <<
"Samples: " <<
iValue(0,
"SAMPLES") << std::endl;
253 os <<
"Evt Nr: " <<
iValue(0,
"EVNR") << std::endl;
254 int f =
iValue(0,
"FREQUENCY") ;
255 os <<
"Sample Frequency ";
274 os <<
"("<< f <<
")" << std::endl;
276 os <<
"Group present: ";
277 for ( i = 0; i < 4; i++)
279 os<<
iValue(i,
"GROUPPRESENT") <<
" ";
284 os <<
"contains trigger sample: ";
285 for ( i = 0; i < 4; i++)
287 os<<
iValue(i,
"TRPRESENT") <<
" ";
291 os <<
"index cell: ";
292 for ( i = 0; i < 4; i++)
294 os<<
iValue(i,
"INDEXCELL") <<
" ";
300 for ( i = 0; i <
samples ; i++)
302 os << std::setw(4) << i <<
" | ";
304 for ( j = 0; j < 32 ; j++)
307 os << std::setw(4) <<
iValue(i,j) <<
" ";
309 os <<
" tr: " <<
iValue(i,
"TR0") << std::endl;