24 #define SETBYTEBIT(var, pos) ( var |= 1 << pos ) 25 #define CLEARBYTEBIT(var, pos) ( var &= ~(1 << pos) ) 26 #define CHECKBYTEBIT(var, pos) ( (var) & (1<<pos) ) 29 #define DCBITFLAG 0x6 // 0x0 LSB -> 0x7 MSB 30 #define GETDCFLAG(info) (CHECKBYTEBIT(info, DCBITFLAG)>0) 31 #define SETDCFLAG(info) (SETBYTEBIT(info, DCBITFLAG)) 34 #define EVDQFLAG(info) ( (info & 0x3F ) == 0 ) 46 virtual const char*
what()
const throw()
48 return "Bad file format";
112 const T *ptr =
static_cast<const T*
>(in);
struct dlardaq::trigger_t trigger_t
static const size_t FileFootSz
ssize_t decode_evehead(const char *buf, evheader_t &eh)
ssize_t decode_runhead(const char *buf, runheader_t &rh)
static const size_t RunHeadSz
static const size_t EveHeadSz
struct dlardaq::footer_t footer_t
ssize_t decode_filefoot(const char *buf, footer_t &rf)
static const short BitsADC
struct dlardaq::runheader_t runheader_t
struct dlardaq::evheader_t evheader_t
T ConvertToValue(const void *in)
void unpack12into16(const void *in, void *out, size_t n)
void pack16into12(const void *in, void *out, size_t n)
void read12(const char *fname, std::vector< adc16_t > &adc)
void write12(const char *fname, std::vector< adc16_t > &adc)
static formatexception fex
cet::coded_exception< error, detail::translate > exception