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;
154 if ( ch < 0 || ch >= 32 )
return 0;
155 if ( sample < 0 || sample >=
samples )
return 0;
166 if ( strcmp(what,
"SAMPLES") == 0 )
171 if ( strcmp(what,
"EVNR") == 0 )
176 if ( strcmp(what,
"TR0") == 0 )
178 if ( n <0 || n >=
samples)
return 0;
183 if ( strcmp(what,
"TR1") == 0 )
185 if ( n <0 || n >=
samples)
return 0;
190 if ( strcmp(what,
"INDEXCELL") == 0 )
192 if ( n <0 || n >=4)
return 0;
197 if ( strcmp(what,
"TRPRESENT") == 0 )
199 if ( n <0 || n >=4)
return 0;
204 if ( strcmp(what,
"FREQUENCY") == 0 )
219 os <<
"Samples: " <<
iValue(0,
"SAMPLES") << std::endl;
220 os <<
"Evt Nr: " <<
iValue(0,
"EVNR") << std::endl;
221 int f =
iValue(0,
"FREQUENCY") ;
222 os <<
"Sample Frequency ";
241 os <<
"("<< f <<
")" << std::endl;
243 os <<
"contains trigger sample: ";
244 for ( i = 0; i < 4; i++)
246 os<<
iValue(i,
"TRPRESENT") <<
" ";
250 os <<
"index cell: ";
251 for ( i = 0; i < 4; i++)
253 os<<
iValue(i,
"INDEXCELL") <<
" ";
259 for ( i = 0; i <
samples ; i++)
261 os << std::setw(4) << i <<
" | ";
263 for ( j = 0; j < 32 ; j++)
266 os << std::setw(4) <<
iValue(i,j) <<
" ";
268 os <<
" tr: " <<
iValue(i,
"TR0") << std::endl;