CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
amc13::Trailer Class Reference

#include <AMC13Spec.h>

Public Member Functions

bool check (unsigned int crc, unsigned int block, unsigned int lv1_id, unsigned int bx) const
 
unsigned int getBlock () const
 
unsigned int getBX () const
 
unsigned int getCRC () const
 
unsigned int getLV1ID () const
 
uint64_t raw () const
 
 Trailer (const uint64_t *data)
 
 Trailer (unsigned int blk, unsigned int lv1, unsigned int bx)
 

Static Public Member Functions

static void writeCRC (const uint64_t *start, uint64_t *end)
 

Private Attributes

uint64_t data_
 

Static Private Attributes

static const unsigned int BlkNo_mask = 0xff
 
static const unsigned int BlkNo_shift = 20
 
static const unsigned int BX_mask = 0xfff
 
static const unsigned int BX_shift = 0
 
static const unsigned int CRC_mask = 0xffffffff
 
static const unsigned int CRC_shift = 32
 
static const unsigned int LV1_mask = 0xff
 
static const unsigned int LV1_shift = 12
 

Detailed Description

Definition at line 42 of file AMC13Spec.h.

Constructor & Destructor Documentation

amc13::Trailer::Trailer ( const uint64_t *  data)
inline

Definition at line 44 of file AMC13Spec.h.

44 : data_(data[0]) {};
uint64_t data_
Definition: AMC13Spec.h:66
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
amc13::Trailer::Trailer ( unsigned int  blk,
unsigned int  lv1,
unsigned int  bx 
)

Definition at line 27 of file AMC13Spec.cc.

Member Function Documentation

bool amc13::Trailer::check ( unsigned int  crc,
unsigned int  block,
unsigned int  lv1_id,
unsigned int  bx 
) const

Definition at line 36 of file AMC13Spec.cc.

unsigned int amc13::Trailer::getBlock ( ) const
inline

Definition at line 48 of file AMC13Spec.h.

References BlkNo_mask, BlkNo_shift, and data_.

48 { return (data_ >> BlkNo_shift) & BlkNo_mask; };
static const unsigned int BlkNo_mask
Definition: AMC13Spec.h:60
uint64_t data_
Definition: AMC13Spec.h:66
static const unsigned int BlkNo_shift
Definition: AMC13Spec.h:59
unsigned int amc13::Trailer::getBX ( ) const
inline

Definition at line 50 of file AMC13Spec.h.

References BX_mask, BX_shift, and data_.

50 { return (data_ >> BX_shift) & BX_mask; };
static const unsigned int BX_mask
Definition: AMC13Spec.h:64
uint64_t data_
Definition: AMC13Spec.h:66
static const unsigned int BX_shift
Definition: AMC13Spec.h:63
unsigned int amc13::Trailer::getCRC ( ) const
inline

Definition at line 47 of file AMC13Spec.h.

References CRC_mask, CRC_shift, and data_.

47 { return (data_ >> CRC_shift) & CRC_mask; };
static const unsigned int CRC_mask
Definition: AMC13Spec.h:58
uint64_t data_
Definition: AMC13Spec.h:66
static const unsigned int CRC_shift
Definition: AMC13Spec.h:57
unsigned int amc13::Trailer::getLV1ID ( ) const
inline

Definition at line 49 of file AMC13Spec.h.

References data_, LV1_mask, and LV1_shift.

49 { return (data_ >> LV1_shift) & LV1_mask; };
static const unsigned int LV1_mask
Definition: AMC13Spec.h:62
uint64_t data_
Definition: AMC13Spec.h:66
static const unsigned int LV1_shift
Definition: AMC13Spec.h:61
uint64_t amc13::Trailer::raw ( ) const
inline

Definition at line 52 of file AMC13Spec.h.

References data_.

52 { return data_; };
uint64_t data_
Definition: AMC13Spec.h:66
void amc13::Trailer::writeCRC ( const uint64_t *  start,
uint64_t *  end 
)
static

Definition at line 52 of file AMC13Spec.cc.

Member Data Documentation

const unsigned int amc13::Trailer::BlkNo_mask = 0xff
staticprivate

Definition at line 60 of file AMC13Spec.h.

Referenced by getBlock().

const unsigned int amc13::Trailer::BlkNo_shift = 20
staticprivate

Definition at line 59 of file AMC13Spec.h.

Referenced by getBlock().

const unsigned int amc13::Trailer::BX_mask = 0xfff
staticprivate

Definition at line 64 of file AMC13Spec.h.

Referenced by getBX().

const unsigned int amc13::Trailer::BX_shift = 0
staticprivate

Definition at line 63 of file AMC13Spec.h.

Referenced by getBX().

const unsigned int amc13::Trailer::CRC_mask = 0xffffffff
staticprivate

Definition at line 58 of file AMC13Spec.h.

Referenced by getCRC().

const unsigned int amc13::Trailer::CRC_shift = 32
staticprivate

Definition at line 57 of file AMC13Spec.h.

Referenced by getCRC().

uint64_t amc13::Trailer::data_
private

Definition at line 66 of file AMC13Spec.h.

Referenced by getBlock(), getBX(), getCRC(), getLV1ID(), and raw().

const unsigned int amc13::Trailer::LV1_mask = 0xff
staticprivate

Definition at line 62 of file AMC13Spec.h.

Referenced by getLV1ID().

const unsigned int amc13::Trailer::LV1_shift = 12
staticprivate

Definition at line 61 of file AMC13Spec.h.

Referenced by getLV1ID().