CMS 3D CMS Logo

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

#include <AMCSpec.h>

Public Member Functions

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 crc, unsigned int blk, unsigned int lv1, unsigned int bx)
 

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 106 of file AMCSpec.h.

Constructor & Destructor Documentation

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

Definition at line 108 of file AMCSpec.h.

108 : data_(data[0]) {};
uint64_t data_
Definition: AMCSpec.h:128
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
amc13::Trailer::Trailer ( unsigned int  crc,
unsigned int  blk,
unsigned int  lv1,
unsigned int  bx 
)

Definition at line 123 of file AMCSpec.cc.

References BlkNo_mask, BlkNo_shift, BX_mask, BX_shift, CRC_mask, CRC_shift, data_, LV1_mask, and LV1_shift.

124  {
125  data_ =
126  (static_cast<uint64_t>(crc & CRC_mask) << CRC_shift) |
127  (static_cast<uint64_t>(blk & BlkNo_mask) << BlkNo_shift) |
128  (static_cast<uint64_t>(lv1 & LV1_mask) << LV1_shift) |
129  (static_cast<uint64_t>(bx & BX_mask) << BX_shift);
130  }
static const unsigned int LV1_mask
Definition: AMCSpec.h:124
static const unsigned int CRC_mask
Definition: AMCSpec.h:120
static const unsigned int BlkNo_mask
Definition: AMCSpec.h:122
static const unsigned int BX_mask
Definition: AMCSpec.h:126
uint64_t data_
Definition: AMCSpec.h:128
static const unsigned int BX_shift
Definition: AMCSpec.h:125
unsigned long long uint64_t
Definition: Time.h:15
static const unsigned int LV1_shift
Definition: AMCSpec.h:123
static const unsigned int BlkNo_shift
Definition: AMCSpec.h:121
static const unsigned int CRC_shift
Definition: AMCSpec.h:119

Member Function Documentation

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

Definition at line 112 of file AMCSpec.h.

References BlkNo_mask, BlkNo_shift, and data_.

Referenced by amc13::Packet::parse().

112 { return (data_ >> BlkNo_shift) & BlkNo_mask; };
static const unsigned int BlkNo_mask
Definition: AMCSpec.h:122
uint64_t data_
Definition: AMCSpec.h:128
static const unsigned int BlkNo_shift
Definition: AMCSpec.h:121
unsigned int amc13::Trailer::getBX ( ) const
inline

Definition at line 114 of file AMCSpec.h.

References BX_mask, BX_shift, and data_.

114 { return (data_ >> BX_shift) & BX_mask; };
static const unsigned int BX_mask
Definition: AMCSpec.h:126
uint64_t data_
Definition: AMCSpec.h:128
static const unsigned int BX_shift
Definition: AMCSpec.h:125
unsigned int amc13::Trailer::getCRC ( ) const
inline

Definition at line 111 of file AMCSpec.h.

References CRC_mask, CRC_shift, and data_.

Referenced by amc13::Packet::parse().

111 { return (data_ >> CRC_shift) & CRC_mask; };
static const unsigned int CRC_mask
Definition: AMCSpec.h:120
uint64_t data_
Definition: AMCSpec.h:128
static const unsigned int CRC_shift
Definition: AMCSpec.h:119
unsigned int amc13::Trailer::getLV1ID ( ) const
inline

Definition at line 113 of file AMCSpec.h.

References data_, LV1_mask, and LV1_shift.

113 { return (data_ >> LV1_shift) & LV1_mask; };
static const unsigned int LV1_mask
Definition: AMCSpec.h:124
uint64_t data_
Definition: AMCSpec.h:128
static const unsigned int LV1_shift
Definition: AMCSpec.h:123
uint64_t amc13::Trailer::raw ( ) const
inline

Definition at line 116 of file AMCSpec.h.

References data_.

116 { return data_; };
uint64_t data_
Definition: AMCSpec.h:128

Member Data Documentation

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

Definition at line 122 of file AMCSpec.h.

Referenced by getBlock(), and Trailer().

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

Definition at line 121 of file AMCSpec.h.

Referenced by getBlock(), and Trailer().

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

Definition at line 126 of file AMCSpec.h.

Referenced by getBX(), and Trailer().

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

Definition at line 125 of file AMCSpec.h.

Referenced by getBX(), and Trailer().

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

Definition at line 120 of file AMCSpec.h.

Referenced by getCRC(), and Trailer().

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

Definition at line 119 of file AMCSpec.h.

Referenced by getCRC(), and Trailer().

uint64_t amc13::Trailer::data_
private

Definition at line 128 of file AMCSpec.h.

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

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

Definition at line 124 of file AMCSpec.h.

Referenced by getLV1ID(), and Trailer().

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

Definition at line 123 of file AMCSpec.h.

Referenced by getLV1ID(), and Trailer().