Classes | Namespaces | Macros | Typedefs | Functions | Variables
dlardaq.h File Reference
#include <exception>
#include <vector>
#include <ctime>
#include <stdint.h>

Go to the source code of this file.

Classes

class  dlardaq::formatexception
 
struct  dlardaq::trigger_t
 
struct  dlardaq::runheader_t
 
struct  dlardaq::evheader_t
 
struct  dlardaq::footer_t
 

Namespaces

 dlardaq
 

Macros

#define EVSKEY   0xFF
 
#define ENDKEY   0xF0
 
#define SETBYTEBIT(var, pos)   ( var |= 1 << pos )
 
#define CLEARBYTEBIT(var, pos)   ( var &= ~(1 << pos) )
 
#define CHECKBYTEBIT(var, pos)   ( (var) & (1<<pos) )
 
#define DCBITFLAG   0x6
 
#define GETDCFLAG(info)   (CHECKBYTEBIT(info, DCBITFLAG)>0)
 
#define SETDCFLAG(info)   (SETBYTEBIT(info, DCBITFLAG))
 
#define EVDQFLAG(info)   ( (info & 0x3F ) == 0 )
 

Typedefs

typedef char dlardaq::BYTE
 
typedef uint16_t dlardaq::adc16_t
 
typedef struct dlardaq::trigger_t dlardaq::trigger_t
 
typedef struct dlardaq::runheader_t dlardaq::runheader_t
 
typedef struct dlardaq::evheader_t dlardaq::evheader_t
 
typedef struct dlardaq::footer_t dlardaq::footer_t
 

Functions

void dlardaq::pack16into12 (const void *in, void *out, size_t n)
 
void dlardaq::unpack12into16 (const void *in, void *out, size_t n)
 
void dlardaq::write12 (const char *fname, std::vector< adc16_t > &adc)
 
void dlardaq::read12 (const char *fname, std::vector< adc16_t > &adc)
 
template<typename T >
dlardaq::ConvertToValue (const void *in)
 
ssize_t dlardaq::decode_runhead (const char *buf, runheader_t &rh)
 
ssize_t dlardaq::decode_evehead (const char *buf, evheader_t &eh)
 
ssize_t dlardaq::decode_filefoot (const char *buf, footer_t &rf)
 

Variables

static formatexception dlardaq::fex
 
static const size_t dlardaq::RunHeadSz = 5
 
static const size_t dlardaq::EveHeadSz = 35
 
static const size_t dlardaq::FileFootSz = 4
 
static const short dlardaq::BitsADC = 12
 

Macro Definition Documentation

#define CHECKBYTEBIT (   var,
  pos 
)    ( (var) & (1<<pos) )

Definition at line 26 of file dlardaq.h.

#define CLEARBYTEBIT (   var,
  pos 
)    ( var &= ~(1 << pos) )

Definition at line 25 of file dlardaq.h.

#define DCBITFLAG   0x6

Definition at line 29 of file dlardaq.h.

#define ENDKEY   0xF0

Definition at line 21 of file dlardaq.h.

#define EVDQFLAG (   info)    ( (info & 0x3F ) == 0 )

Definition at line 34 of file dlardaq.h.

#define EVSKEY   0xFF

Definition at line 20 of file dlardaq.h.

#define GETDCFLAG (   info)    (CHECKBYTEBIT(info, DCBITFLAG)>0)

Definition at line 30 of file dlardaq.h.

#define SETBYTEBIT (   var,
  pos 
)    ( var |= 1 << pos )

Definition at line 24 of file dlardaq.h.

#define SETDCFLAG (   info)    (SETBYTEBIT(info, DCBITFLAG))

Definition at line 31 of file dlardaq.h.