5 #include <rtsSystems.h>
11 #define TRG_VERSION 0x32
14 #include <daqFormats.h>
19 extern int trgReader32(
char *trgd,
int bytes,
int swap,
struct trg_t *trg);
23 int trgReader10(
char *buff,
struct trg_t *
trg_t)
28 if(trgd->bh.byte_order != DAQ_RAW_FORMAT_ORDER) swap=1;
34 int byteCount_Version = swap32(trg->byteCount_Version);
37 int version = byteCount_Version & 0xff;
40 LOG(ERR,
"Incorrect trigger header version 0x%x rather than 0x10", version);
45 int evtdesc_off = swap32(trg->OffsetBlock[TRG_INDEX].offset);
46 LOG(DBG,
"evtdesc_off = %d sizeof(TrgTowerTrnfer-4)=%d",evtdesc_off,
sizeof(
TrgTowerTrnfer)-4);
48 if(evtdesc_off == 0) {
49 LOG(ERR,
"No trigger data available, offset = 0");
56 int version2 = evtdesc->TrgDataFmtVer;
58 if(version2 != 0x32) {
59 LOG(ERR,
"Incorrect trigger data version 0x%x rather than 0x32 (0x%x)", version2, *evtdesc);
63 return trgReader32((
char *)evtdesc, swap32(trg->OffsetBlock[TRG_INDEX].length), swap, trg_t);
void version(std::ostream &os=std::cout)
print HepMC version