27 std::vector<hybriddata*>::iterator
it;
28 std::vector<report *>::iterator reportit;
33 for ( reportit = (*it)->rowdata.begin(); reportit != (*it)->rowdata.end(); ++reportit)
54 if ( d[i] == 0xfafafafa )
break;
55 unsigned int dh = ntohl(d[i]);
56 int framecounter = (dh & 0xff);
64 unsigned char c = (header >>24) & 0xff;
66 c = (header >>16) & 0xff;
68 c = (header >>8) & 0xff;
72 unsigned int channel = header & 0xff;
76 unsigned int w = ntohl(d[i+2]);
77 int words = w & 0xffff;
82 while ( d[j + i +3] != 0xf000f000 && j < words )
84 hd->
adc.push_back(d[j+i+3] & 0x0fff);
85 hd->
adc.push_back( (d[j+i+3] >> 16) & 0x0fff);
113 int current_report = 0;
115 for ( i = 0; i < hd->
words-( 128+8); i++)
125 if ( hd->
adc[i] < 1220) onecount++;
136 if ( onecount && hd->
adc[i] >= 1220)
154 if ( hd->
adc[start + 11] < 1220)
158 else if ( hd->
adc[start + 11] > 3000)
168 for ( i = 0; i < 8; i++)
170 if (hd->
adc[start + 3 + i] < 1220)
172 acode = ( acode << 1)+1;
174 else if (hd->
adc[ start + 3 + i] > 2980)
176 acode = ( acode << 1);
181 acode = ( acode << 1);
187 for (i = 0; i < 128; i++)
189 int channel = 32 * ( i % 4 ) + 8 * ( i >> 2) - 31 * ( i >> 4);
202 std::vector<hybriddata*>::iterator
it;
205 if ( strcmp(what,
"NHYBRIDS") == 0 )
210 else if ( strcmp(what,
"NSAMPLES") == 0 )
215 if ( (*it)->hdmi == hybrid )
217 return (*it)->rowdata.size();;
234 std::vector<hybriddata*>::iterator
it;
236 if ( ich < 0)
return 0;
238 if ( strcmp(what,
"RAWSAMPLES") == 0 )
243 if ( (*it)->hdmi == hybrid )
245 if ( ich >= (*it)->words)
return 0;
246 return (*it)->adc[ich];
257 if ( ich < 0 || ich > 127)
return 0;
260 std::vector<hybriddata*>::iterator
it;
266 if ( (*it)->hdmi == hybrid)
271 if ( (*it)->rowdata.size() < (
unsigned int)(tsample +1))
return 0;
273 report *
r = (*it)->rowdata[tsample];
289 int is =
iValue(0,
"NHYBRIDS");
292 os <<
"Number of Hybrids: " << is << std::endl;
294 std::vector<hybriddata*>::iterator
it;
295 std::vector<report *>::iterator reportit;
300 os <<
"Framecounter: " << (*it)->framecounter << std::endl;
301 os <<
"HDMI Channel: " << (*it)->hdmi << std::endl;
302 os <<
"Description: " << (*it)->desc << std::endl;
303 os <<
"Words: " << (*it)->words << std::endl;
304 os <<
"Time samples: " << (*it)->rowdata.size() << std::endl;
314 if ( (*it)->rowdata.size() > 0)
317 for ( reportit = (*it)->rowdata.begin(); reportit != (*it)->rowdata.end(); ++reportit)
319 os << setw(5) << (*reportit)->n;
324 for ( reportit = (*it)->rowdata.begin(); reportit != (*it)->rowdata.end(); ++reportit)
326 os << setw(5) << (*reportit)->address;
331 for ( reportit = (*it)->rowdata.begin(); reportit != (*it)->rowdata.end(); ++reportit)
333 os << setw(5) << (*reportit)->error;
336 os <<
" ----------------------------------------------------------------------------------------" << endl;
339 for ( i = 0; i < 128; i++)
341 os << setw(4) << i <<
" | ";
343 for ( reportit = (*it)->rowdata.begin(); reportit != (*it)->rowdata.end(); ++reportit)
345 os << setw(5) << (*reportit)->adc[
i];