CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
l1t::BxBlockHeader Class Reference

#include <BxBlock.h>

Public Member Functions

 BxBlockHeader ()
 
 BxBlockHeader (unsigned int id, unsigned int totalBx, unsigned int flags=0)
 
 BxBlockHeader (const uint32_t raw)
 
int getBx () const
 
unsigned int getFlags () const
 
unsigned int getId () const
 
unsigned int getTotalBx () const
 
bool operator< (const BxBlockHeader &o) const
 
uint32_t raw () const
 

Private Attributes

unsigned int flags_
 
unsigned int id_
 
unsigned int totalBx_
 

Static Private Attributes

static const unsigned int flags_mask = 0xffff
 
static const unsigned int flags_shift = 0
 
static const unsigned int id_mask = 0xff
 
static const unsigned int id_shift = 24
 
static const unsigned int n_words = 6
 
static const unsigned int totalBx_mask = 0xff
 
static const unsigned int totalBx_shift = 16
 

Detailed Description

Definition at line 9 of file BxBlock.h.

Constructor & Destructor Documentation

l1t::BxBlockHeader::BxBlockHeader ( )
inline

Definition at line 11 of file BxBlock.h.

11 : id_(0), totalBx_(0), flags_(0) {};
unsigned int flags_
Definition: BxBlock.h:40
unsigned int totalBx_
Definition: BxBlock.h:39
unsigned int id_
Definition: BxBlock.h:38
l1t::BxBlockHeader::BxBlockHeader ( unsigned int  id,
unsigned int  totalBx,
unsigned int  flags = 0 
)
inline

Definition at line 12 of file BxBlock.h.

12 : id_(id), totalBx_(totalBx), flags_(flags) {};
unsigned int flags_
Definition: BxBlock.h:40
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
unsigned int totalBx_
Definition: BxBlock.h:39
unsigned int id_
Definition: BxBlock.h:38
l1t::BxBlockHeader::BxBlockHeader ( const uint32_t  raw)
inline

Definition at line 14 of file BxBlock.h.

14  : id_(((raw >> id_shift) & id_mask) / n_words)
16  , flags_((raw >> flags_shift) & flags_mask) {};
static const unsigned int totalBx_mask
Definition: BxBlock.h:34
static const unsigned int totalBx_shift
Definition: BxBlock.h:33
unsigned int flags_
Definition: BxBlock.h:40
unsigned int totalBx_
Definition: BxBlock.h:39
static const unsigned int n_words
Definition: BxBlock.h:30
static const unsigned int id_shift
Definition: BxBlock.h:31
static const unsigned int flags_mask
Definition: BxBlock.h:36
static const unsigned int id_mask
Definition: BxBlock.h:32
static const unsigned int flags_shift
Definition: BxBlock.h:35
unsigned int id_
Definition: BxBlock.h:38
uint32_t raw() const
Definition: BxBlock.h:25

Member Function Documentation

int l1t::BxBlockHeader::getBx ( ) const
inline

Definition at line 20 of file BxBlock.h.

References id_, createfilelist::int, and totalBx_.

Referenced by operator<().

20 { return (int)id_ - (int)std::floor(totalBx_/2.); };
unsigned int totalBx_
Definition: BxBlock.h:39
unsigned int id_
Definition: BxBlock.h:38
unsigned int l1t::BxBlockHeader::getFlags ( ) const
inline

Definition at line 23 of file BxBlock.h.

References flags_.

23 { return flags_; };
unsigned int flags_
Definition: BxBlock.h:40
unsigned int l1t::BxBlockHeader::getId ( ) const
inline

Definition at line 21 of file BxBlock.h.

References id_.

21 { return id_; };
unsigned int id_
Definition: BxBlock.h:38
unsigned int l1t::BxBlockHeader::getTotalBx ( ) const
inline
bool l1t::BxBlockHeader::operator< ( const BxBlockHeader o) const
inline

Definition at line 18 of file BxBlock.h.

References getBx().

18 { return getBx() < o.getBx(); };
int getBx() const
Definition: BxBlock.h:20
uint32_t l1t::BxBlockHeader::raw ( ) const
inline

Definition at line 25 of file BxBlock.h.

References flags_, flags_mask, flags_shift, id_, id_mask, id_shift, n_words, totalBx_, totalBx_mask, and totalBx_shift.

25  { return (((id_ & id_mask) << id_shift) * n_words)
27  | ((flags_ & flags_mask) << flags_shift); };
static const unsigned int totalBx_mask
Definition: BxBlock.h:34
static const unsigned int totalBx_shift
Definition: BxBlock.h:33
unsigned int flags_
Definition: BxBlock.h:40
unsigned int totalBx_
Definition: BxBlock.h:39
static const unsigned int n_words
Definition: BxBlock.h:30
static const unsigned int id_shift
Definition: BxBlock.h:31
static const unsigned int flags_mask
Definition: BxBlock.h:36
static const unsigned int id_mask
Definition: BxBlock.h:32
static const unsigned int flags_shift
Definition: BxBlock.h:35
unsigned int id_
Definition: BxBlock.h:38

Member Data Documentation

unsigned int l1t::BxBlockHeader::flags_
private

Definition at line 40 of file BxBlock.h.

Referenced by getFlags(), and raw().

const unsigned int l1t::BxBlockHeader::flags_mask = 0xffff
staticprivate

Definition at line 36 of file BxBlock.h.

Referenced by raw().

const unsigned int l1t::BxBlockHeader::flags_shift = 0
staticprivate

Definition at line 35 of file BxBlock.h.

Referenced by raw().

unsigned int l1t::BxBlockHeader::id_
private

Definition at line 38 of file BxBlock.h.

Referenced by getBx(), getId(), and raw().

const unsigned int l1t::BxBlockHeader::id_mask = 0xff
staticprivate

Definition at line 32 of file BxBlock.h.

Referenced by raw().

const unsigned int l1t::BxBlockHeader::id_shift = 24
staticprivate

Definition at line 31 of file BxBlock.h.

Referenced by raw().

const unsigned int l1t::BxBlockHeader::n_words = 6
staticprivate

Definition at line 30 of file BxBlock.h.

Referenced by raw().

unsigned int l1t::BxBlockHeader::totalBx_
private

Definition at line 39 of file BxBlock.h.

Referenced by getBx(), getTotalBx(), and raw().

const unsigned int l1t::BxBlockHeader::totalBx_mask = 0xff
staticprivate

Definition at line 34 of file BxBlock.h.

Referenced by raw().

const unsigned int l1t::BxBlockHeader::totalBx_shift = 16
staticprivate

Definition at line 33 of file BxBlock.h.

Referenced by raw().