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
l1t::BlockHeader Class Reference

#include <Block.h>

Public Member Functions

 BlockHeader (unsigned int id, unsigned int size, block_t type=MP7)
 
 BlockHeader (const uint32_t *data)
 
 BlockHeader (const uint32_t *data, unsigned int size)
 
unsigned int getID () const
 
unsigned int getSize () const
 
block_t getType () const
 
bool operator< (const BlockHeader &o) const
 
uint32_t raw (block_t type=MP7) const
 

Private Attributes

unsigned int id_
 
unsigned int size_
 
block_t type_
 

Static Private Attributes

static const unsigned int CTP7_mask = 0xffff
 
static const unsigned int CTP7_shift = 0
 
static const unsigned int ID_mask = 0xff
 
static const unsigned int ID_shift = 24
 
static const unsigned int size_mask = 0xff
 
static const unsigned int size_shift = 16
 

Detailed Description

Definition at line 12 of file Block.h.

Constructor & Destructor Documentation

l1t::BlockHeader::BlockHeader ( unsigned int  id,
unsigned int  size,
block_t  type = MP7 
)
inline

Definition at line 14 of file Block.h.

14 : id_(id), size_(size), type_(type) {};
type
Definition: HCALResponse.h:21
block_t type_
Definition: Block.h:38
unsigned int size_
Definition: Block.h:37
unsigned int id_
Definition: Block.h:36
tuple size
Write out results.
l1t::BlockHeader::BlockHeader ( const uint32_t *  data)
inline

Definition at line 16 of file Block.h.

16 : id_((data[0] >> ID_shift) & ID_mask), size_((data[0] >> size_shift) & size_mask), type_(MP7) {};
Definition: Block.h:10
static const unsigned int ID_shift
Definition: Block.h:31
block_t type_
Definition: Block.h:38
static const unsigned int ID_mask
Definition: Block.h:32
static const unsigned int size_mask
Definition: Block.h:34
unsigned int size_
Definition: Block.h:37
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int id_
Definition: Block.h:36
static const unsigned int size_shift
Definition: Block.h:33
l1t::BlockHeader::BlockHeader ( const uint32_t *  data,
unsigned int  size 
)
inline

Definition at line 18 of file Block.h.

18 : id_((data[0] >> CTP7_shift) & CTP7_mask), size_(size), type_(CTP7) {};
static const unsigned int CTP7_mask
Definition: Block.h:30
block_t type_
Definition: Block.h:38
unsigned int size_
Definition: Block.h:37
static const unsigned int CTP7_shift
Definition: Block.h:29
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int id_
Definition: Block.h:36
tuple size
Write out results.

Member Function Documentation

unsigned int l1t::BlockHeader::getID ( ) const
inline
unsigned int l1t::BlockHeader::getSize ( ) const
inline
block_t l1t::BlockHeader::getType ( void  ) const
inline
bool l1t::BlockHeader::operator< ( const BlockHeader o) const
inline

Definition at line 20 of file Block.h.

References getID().

20 { return getID() < o.getID(); };
unsigned int getID() const
Definition: Block.h:22
uint32_t l1t::BlockHeader::raw ( block_t  type = MP7) const

Definition at line 9 of file Block.cc.

References CTP7_mask, CTP7_shift, id_, ID_mask, ID_shift, LogTrace, l1t::MP7, size_, size_mask, size_shift, and type_.

10  {
11  if (type_ == MP7) {
12  LogTrace("L1T") << "Writing MP7 link header";
13  return ((id_ & ID_mask) << ID_shift) | ((size_ & size_mask) << size_shift);
14  }
15  LogTrace("L1T") << "Writing CTP7 link header";
16  return ((id_ & CTP7_mask) << CTP7_shift);
17  }
static const unsigned int CTP7_mask
Definition: Block.h:30
Definition: Block.h:10
static const unsigned int ID_shift
Definition: Block.h:31
block_t type_
Definition: Block.h:38
static const unsigned int ID_mask
Definition: Block.h:32
static const unsigned int size_mask
Definition: Block.h:34
unsigned int size_
Definition: Block.h:37
#define LogTrace(id)
static const unsigned int CTP7_shift
Definition: Block.h:29
unsigned int id_
Definition: Block.h:36
static const unsigned int size_shift
Definition: Block.h:33

Member Data Documentation

const unsigned int l1t::BlockHeader::CTP7_mask = 0xffff
staticprivate

Definition at line 30 of file Block.h.

Referenced by raw().

const unsigned int l1t::BlockHeader::CTP7_shift = 0
staticprivate

Definition at line 29 of file Block.h.

Referenced by raw().

unsigned int l1t::BlockHeader::id_
private

Definition at line 36 of file Block.h.

Referenced by getID(), and raw().

const unsigned int l1t::BlockHeader::ID_mask = 0xff
staticprivate

Definition at line 32 of file Block.h.

Referenced by raw().

const unsigned int l1t::BlockHeader::ID_shift = 24
staticprivate

Definition at line 31 of file Block.h.

Referenced by raw().

unsigned int l1t::BlockHeader::size_
private

Definition at line 37 of file Block.h.

Referenced by getSize(), and raw().

const unsigned int l1t::BlockHeader::size_mask = 0xff
staticprivate

Definition at line 34 of file Block.h.

Referenced by raw().

const unsigned int l1t::BlockHeader::size_shift = 16
staticprivate

Definition at line 33 of file Block.h.

Referenced by raw().

block_t l1t::BlockHeader::type_
private