15 const uint32_t *data = (
const uint32_t*)(*data8);
16 int count = (*datalen)/4;
22 for (
int i=0; i<count; i++) {
23 switch ((data[i] >> 27) & 0x1F) {
27 e->
geo = data[i] & 0x1F;
29 printf(
"%d 0x%08x: global header: event count %d, geo 0x%2x\n", i, data[i], e->
event_count, e->
geo);
45 h.
channel = (data[i] >> 19) & 0x7F;
80 e->
ettt = data[i] & 0x7FFFFFF;
82 printf(
"%d 0x%08x: extended trigger time 0x%x\n", i, data[i], e->
ettt);
96 printf(
"%d 0x%08x: trailer: status TL %d, OBO %d, TDC_E %d, word count %d, geo 0x%x\n", i, data[i], e->
trailer_trigger_lost, e->
trailer_output_buffer_overflow, e->
trailer_tdc_error, e->
trailer_word_count, e->
trailer_geo);
99 printf (
"v1190unpack: geo mismatch\n");
103 printf (
"v1190unpack: word count mismatch: trailer wc %d, but data has %d words\n", e->
trailer_word_count, i+1);
110 printf(
"%d 0x%08x: unexpected data\n", i, data[i]);
112 printf(
"v1190unpack: unexpected data word 0x%08x\n", data[i]);
128 printf(
"v1190event: error %d, ec %d, geo 0x%x, tl %d, obo %d, tdc_e %d, wc %d, %d hits\n",
error,
event_count,
geo,
trailer_trigger_lost,
trailer_output_buffer_overflow,
trailer_tdc_error,
trailer_word_count, (
int)
hits.size());
int tdc_trailer_word_count
std::vector< v1190hit > hits
bool trailer_output_buffer_overflow
bool trailer_trigger_lost
v1190event * UnpackV1190(const char **data8, int *datalen, bool verbose)