8 #ifndef L2_HIEN_RESULT_2009_H
9 #define L2_HIEN_RESULT_2009_H
12 enum {mySizeChar=164};
17 unsigned int value[maxTowers];
24 if(p==0) {printf(
"print L2hienResult2009 - NULL pointer ????\n");
return;}
25 printf(
"print L2hienResult2009: nTowers=%d, total ADC=%d\n",
26 (p->header & 0xFF000000)>>24,
27 (p->header & 0x00FFFFFF));
28 for (
unsigned int i=0;i<L2hienResult2009::maxTowers && i<((p->header & 0xFF000000)>>24);i++)
29 printf(
" L2hienResult2009: %d: ADC=%d\tsoftID=%d\n",
31 (p->value[i] & 0xFFFF0000)>>16,
32 (p->value[i] & 0x0000FFFF));
37 L2hienResult2009_unpackValue(
int *ADC,
int* softID,
unsigned int value)
39 *ADC=(value & 0xFFFF0000)>>16;
40 *softID=(value & 0x0000FFFF);
45 L2hienResult2009_unpackAllValues(
int* nTowers,
int* totalADC,
int *ADC,
int* softID,
L2hienResult2009* result)
47 *nTowers = (result->header & 0xFF000000)>>24;
48 *totalADC =(result->header & 0x00FFFFFF);
49 for (
int i=0;i<L2hienResult2009::maxTowers && i<*nTowers;i++)
51 ADC[i]=(result->value[i] & 0xFFFF0000)>>16;
52 softID[i]=(result->value[i] & 0x0000FFFF);