1 #include "l3TrgReader.h"
6 #define TRG_VERSION 0x32
9 #include "daqFormats.h"
14 int l3TrgReader::readL3P(
L3_P *l3p)
16 if (l3p == NULL)
return -1;
18 if (l3p->trig.off == 0)
return -1;
20 char *trgBuf = (
char*)l3p + l3p->trig.off*4;
23 unsigned char version;
25 if (l3p->bh.format_number <= 7) {
26 version = ((
unsigned char *)trgBuf)[0];
29 LOG(ERR,
"L3_P fn=%d should not contain TRG=0x%x",
30 l3p->bh.format_number,version,0,0,0);
36 if (version <= 0x20) {
37 LOG(ERR,
"L3_P fn=%d should not contain TRG=0x%x",
38 l3p->bh.format_number,version,0,0,0);
48 return readV12(trgBuf);
51 return readV20(trgBuf);
54 return readV21(trgBuf);
57 LOG(ERR,
"l3Trg: Unknown trigger format: 0x%x (0x%08x) %s\n",
58 version, *((
long*)trgBuf), (
char*)trgBuf,0,0,0);
66 int l3TrgReader::read(
void *buffer)
68 LOG(ERR,
"WARNING: l3TrgReader::read is obsolete",0,0,0,0,0);
70 unsigned char version = ((
unsigned char *)buffer)[0];
77 return readV12(buffer);
81 return readV20(buffer);
88 return readV21(buffer);
97 void l3TrgReader::reset()
void version(std::ostream &os=std::cout)
print HepMC version