CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
amc::Header Class Reference

#include <AMCSpec.h>

Public Member Functions

unsigned int getAMCNumber () const
 
unsigned int getBoardID () const
 
unsigned int getBX () const
 
unsigned int getLV1ID () const
 
unsigned int getOrbitNumber () const
 
unsigned int getSize () const
 
unsigned int getUserData () const
 
 Header ()
 
 Header (const uint64_t *data)
 
 Header (unsigned int amc_no, unsigned int lv1_id, unsigned int bx_id, unsigned int size, unsigned int or_n, unsigned int board_id, unsigned int user)
 
std::vector< uint64_t > raw () const
 

Private Attributes

uint64_t data0_
 
uint64_t data1_
 

Static Private Attributes

static const unsigned int AmcNo_mask = 0xf
 
static const unsigned int AmcNo_shift = 56
 
static const unsigned int BoardID_mask = 0xffff
 
static const unsigned int BoardID_shift = 0
 
static const unsigned int BX_mask = 0xfff
 
static const unsigned int BX_shift = 20
 
static const unsigned int LV1ID_mask = 0xffffff
 
static const unsigned int LV1ID_shift = 32
 
static const unsigned int OrN_mask = 0xffff
 
static const unsigned int OrN_shift = 16
 
static const unsigned int Size_mask = 0xfffff
 
static const unsigned int Size_shift = 0
 
static const unsigned int User_mask = 0xffffffff
 
static const unsigned int User_shift = 32
 

Detailed Description

Definition at line 59 of file AMCSpec.h.

Constructor & Destructor Documentation

amc::Header::Header ( )
inline

Definition at line 61 of file AMCSpec.h.

61 : data0_(0), data1_(0) {};
uint64_t data1_
Definition: AMCSpec.h:94
uint64_t data0_
Definition: AMCSpec.h:93
amc::Header::Header ( const uint64_t *  data)
inline

Definition at line 62 of file AMCSpec.h.

References findQualityFiles::size, and dataset::user.

62 : data0_(data[0]), data1_(data[1]) {};
uint64_t data1_
Definition: AMCSpec.h:94
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
uint64_t data0_
Definition: AMCSpec.h:93
Header::Header ( unsigned int  amc_no,
unsigned int  lv1_id,
unsigned int  bx_id,
unsigned int  size,
unsigned int  or_n,
unsigned int  board_id,
unsigned int  user 
)

Definition at line 76 of file AMCSpec.cc.

77  :
78  data0_(
79  (uint64_t(amc_no & AmcNo_mask) << AmcNo_shift) |
80  (uint64_t(lv1_id & LV1ID_mask) << LV1ID_shift) |
81  (uint64_t(bx_id & BX_mask) << BX_shift) |
83  ),
84  data1_(
85  (uint64_t(or_n & OrN_mask) << OrN_shift) |
86  (uint64_t(board_id & BoardID_mask) << BoardID_shift) |
88  )
89  {
90  }
size
Write out results.
static const unsigned int AmcNo_mask
Definition: AMCSpec.h:84
static const unsigned int BX_mask
Definition: AMCSpec.h:80
static const unsigned int BoardID_shift
Definition: AMCSpec.h:86
static const unsigned int Size_shift
Definition: AMCSpec.h:77
static const unsigned int Size_mask
Definition: AMCSpec.h:78
static const unsigned int LV1ID_mask
Definition: AMCSpec.h:82
static const unsigned int OrN_mask
Definition: AMCSpec.h:89
static const unsigned int LV1ID_shift
Definition: AMCSpec.h:81
static const unsigned int AmcNo_shift
Definition: AMCSpec.h:83
static const unsigned int BX_shift
Definition: AMCSpec.h:79
static const unsigned int User_shift
Definition: AMCSpec.h:90
uint64_t data1_
Definition: AMCSpec.h:94
static const unsigned int BoardID_mask
Definition: AMCSpec.h:87
unsigned long long uint64_t
Definition: Time.h:15
static const unsigned int User_mask
Definition: AMCSpec.h:91
static const unsigned int OrN_shift
Definition: AMCSpec.h:88
uint64_t data0_
Definition: AMCSpec.h:93

Member Function Documentation

unsigned int amc::Header::getAMCNumber ( ) const
inline

Definition at line 66 of file AMCSpec.h.

References amc::BlockHeader::AmcNo_mask, and amc::BlockHeader::AmcNo_shift.

66 { return (data0_ >> AmcNo_shift) & AmcNo_mask; };
static const unsigned int AmcNo_mask
Definition: AMCSpec.h:84
static const unsigned int AmcNo_shift
Definition: AMCSpec.h:83
uint64_t data0_
Definition: AMCSpec.h:93
unsigned int amc::Header::getBoardID ( ) const
inline

Definition at line 67 of file AMCSpec.h.

References amc::BlockHeader::BoardID_mask, and amc::BlockHeader::BoardID_shift.

67 { return (data1_ >> BoardID_shift) & BoardID_mask; };
static const unsigned int BoardID_shift
Definition: AMCSpec.h:86
uint64_t data1_
Definition: AMCSpec.h:94
static const unsigned int BoardID_mask
Definition: AMCSpec.h:87
unsigned int amc::Header::getBX ( ) const
inline

Definition at line 69 of file AMCSpec.h.

69 { return (data0_ >> BX_shift) & BX_mask; };
static const unsigned int BX_mask
Definition: AMCSpec.h:80
static const unsigned int BX_shift
Definition: AMCSpec.h:79
uint64_t data0_
Definition: AMCSpec.h:93
unsigned int amc::Header::getLV1ID ( ) const
inline

Definition at line 68 of file AMCSpec.h.

68 { return (data0_ >> LV1ID_shift) & LV1ID_mask; };
static const unsigned int LV1ID_mask
Definition: AMCSpec.h:82
static const unsigned int LV1ID_shift
Definition: AMCSpec.h:81
uint64_t data0_
Definition: AMCSpec.h:93
unsigned int amc::Header::getOrbitNumber ( ) const
inline

Definition at line 70 of file AMCSpec.h.

70 { return (data1_ >> OrN_shift) & OrN_mask; };
static const unsigned int OrN_mask
Definition: AMCSpec.h:89
uint64_t data1_
Definition: AMCSpec.h:94
static const unsigned int OrN_shift
Definition: AMCSpec.h:88
unsigned int amc::Header::getSize ( ) const
inline

Definition at line 71 of file AMCSpec.h.

References amc::BlockHeader::Size_mask, and amc::BlockHeader::Size_shift.

Referenced by amc::Packet::finalize().

71 { return (data0_ >> Size_shift) & Size_mask; };
static const unsigned int Size_shift
Definition: AMCSpec.h:77
static const unsigned int Size_mask
Definition: AMCSpec.h:78
uint64_t data0_
Definition: AMCSpec.h:93
unsigned int amc::Header::getUserData ( ) const
inline

Definition at line 72 of file AMCSpec.h.

72 { return (data1_ >> User_shift) & User_mask; };
static const unsigned int User_shift
Definition: AMCSpec.h:90
uint64_t data1_
Definition: AMCSpec.h:94
static const unsigned int User_mask
Definition: AMCSpec.h:91
std::vector<uint64_t> amc::Header::raw ( ) const
inline

Definition at line 74 of file AMCSpec.h.

Referenced by amc::Packet::Packet().

74 { return {data0_, data1_}; };
uint64_t data1_
Definition: AMCSpec.h:94
uint64_t data0_
Definition: AMCSpec.h:93

Member Data Documentation

const unsigned int amc::Header::AmcNo_mask = 0xf
staticprivate

Definition at line 84 of file AMCSpec.h.

const unsigned int amc::Header::AmcNo_shift = 56
staticprivate

Definition at line 83 of file AMCSpec.h.

const unsigned int amc::Header::BoardID_mask = 0xffff
staticprivate

Definition at line 87 of file AMCSpec.h.

const unsigned int amc::Header::BoardID_shift = 0
staticprivate

Definition at line 86 of file AMCSpec.h.

const unsigned int amc::Header::BX_mask = 0xfff
staticprivate

Definition at line 80 of file AMCSpec.h.

const unsigned int amc::Header::BX_shift = 20
staticprivate

Definition at line 79 of file AMCSpec.h.

uint64_t amc::Header::data0_
private

Definition at line 93 of file AMCSpec.h.

uint64_t amc::Header::data1_
private

Definition at line 94 of file AMCSpec.h.

const unsigned int amc::Header::LV1ID_mask = 0xffffff
staticprivate

Definition at line 82 of file AMCSpec.h.

const unsigned int amc::Header::LV1ID_shift = 32
staticprivate

Definition at line 81 of file AMCSpec.h.

const unsigned int amc::Header::OrN_mask = 0xffff
staticprivate

Definition at line 89 of file AMCSpec.h.

const unsigned int amc::Header::OrN_shift = 16
staticprivate

Definition at line 88 of file AMCSpec.h.

const unsigned int amc::Header::Size_mask = 0xfffff
staticprivate

Definition at line 78 of file AMCSpec.h.

const unsigned int amc::Header::Size_shift = 0
staticprivate

Definition at line 77 of file AMCSpec.h.

const unsigned int amc::Header::User_mask = 0xffffffff
staticprivate

Definition at line 91 of file AMCSpec.h.

const unsigned int amc::Header::User_shift = 32
staticprivate

Definition at line 90 of file AMCSpec.h.