CMS 3D CMS Logo

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

#include <Block.h>

Public Member Functions

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

Private Attributes

unsigned int capID_
 
unsigned int flags_
 
unsigned int id_
 
unsigned int size_
 
block_t type_
 

Static Private Attributes

static constexpr unsigned capID_mask = 0xff
 
static constexpr unsigned capID_shift = 8
 
static constexpr unsigned CTP7_mask = 0xffff
 
static constexpr unsigned CTP7_shift = 0
 
static constexpr unsigned flags_mask = 0xff
 
static constexpr unsigned flags_shift = 0
 
static constexpr unsigned ID_mask = 0xff
 
static constexpr unsigned ID_shift = 24
 
static constexpr unsigned size_mask = 0xff
 
static constexpr unsigned size_shift = 16
 

Detailed Description

Definition at line 29 of file Block.h.

Constructor & Destructor Documentation

◆ BlockHeader() [1/2]

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

Definition at line 31 of file Block.h.

32  : id_(id), size_(size), capID_(capID), flags_(flags), type_(type){};

◆ BlockHeader() [2/2]

l1t::BlockHeader::BlockHeader ( const uint32_t *  data)
inline

Definition at line 34 of file Block.h.

35  : id_((data[0] >> ID_shift) & ID_mask),
36  size_((data[0] >> size_shift) & size_mask),
37  capID_((data[0] >> capID_shift) & capID_mask),
38  flags_((data[0] >> flags_shift) & flags_mask),
39  type_(MP7){};

Member Function Documentation

◆ getCapID()

unsigned int l1t::BlockHeader::getCapID ( ) const
inline

Definition at line 45 of file Block.h.

45 { return capID_; };

References capID_.

◆ getFlags()

unsigned int l1t::BlockHeader::getFlags ( ) const
inline

Definition at line 46 of file Block.h.

46 { return flags_; };

References flags_.

◆ getID()

unsigned int l1t::BlockHeader::getID ( ) const
inline

Definition at line 43 of file Block.h.

43 { return id_; };

References id_.

Referenced by operator<().

◆ getSize()

unsigned int l1t::BlockHeader::getSize ( ) const
inline

Definition at line 44 of file Block.h.

44 { return size_; };

References size_.

◆ getType()

block_t l1t::BlockHeader::getType ( void  ) const
inline

Definition at line 47 of file Block.h.

47 { return type_; };

References type_.

◆ operator<()

bool l1t::BlockHeader::operator< ( const BlockHeader o) const
inline

Definition at line 41 of file Block.h.

41 { return getID() < o.getID(); };

References getID(), and EcalTangentSkim_cfg::o.

◆ raw()

uint32_t l1t::BlockHeader::raw ( ) const

Definition at line 23 of file Block.cc.

23  {
24  if (type_ == MP7) {
25  LogTrace("L1T") << "Writing MP7 link header";
26  return ((id_ & ID_mask) << ID_shift) | ((size_ & size_mask) << size_shift) |
28  } else if (type_ == CTP7) {
29  LogTrace("L1T") << "Writing CTP7 link header";
30  return flags_;
31  }
32  // if (type_ == MTF7) {
33  // LogTrace("L1T") << "Writing MTF7 link header";
34  // return ((id_ & ID_mask) << ID_shift) | ((size_ & size_mask) << size_shift) | ((capID_ & capID_mask) << capID_shift);
35  // }
36  LogTrace("L1T") << "Writing meaningless link header";
37  return 0;
38  }

References capID_, capID_mask, capID_shift, l1t::CTP7, flags_, flags_mask, flags_shift, id_, ID_mask, ID_shift, LogTrace, l1t::MP7, size_, size_mask, size_shift, and type_.

Member Data Documentation

◆ capID_

unsigned int l1t::BlockHeader::capID_
private

Definition at line 65 of file Block.h.

Referenced by getCapID(), and raw().

◆ capID_mask

constexpr unsigned l1t::BlockHeader::capID_mask = 0xff
staticconstexprprivate

Definition at line 59 of file Block.h.

Referenced by raw().

◆ capID_shift

constexpr unsigned l1t::BlockHeader::capID_shift = 8
staticconstexprprivate

Definition at line 58 of file Block.h.

Referenced by raw().

◆ CTP7_mask

constexpr unsigned l1t::BlockHeader::CTP7_mask = 0xffff
staticconstexprprivate

Definition at line 53 of file Block.h.

◆ CTP7_shift

constexpr unsigned l1t::BlockHeader::CTP7_shift = 0
staticconstexprprivate

Definition at line 52 of file Block.h.

◆ flags_

unsigned int l1t::BlockHeader::flags_
private

Definition at line 66 of file Block.h.

Referenced by getFlags(), and raw().

◆ flags_mask

constexpr unsigned l1t::BlockHeader::flags_mask = 0xff
staticconstexprprivate

Definition at line 61 of file Block.h.

Referenced by raw().

◆ flags_shift

constexpr unsigned l1t::BlockHeader::flags_shift = 0
staticconstexprprivate

Definition at line 60 of file Block.h.

Referenced by raw().

◆ id_

unsigned int l1t::BlockHeader::id_
private

Definition at line 63 of file Block.h.

Referenced by getID(), and raw().

◆ ID_mask

constexpr unsigned l1t::BlockHeader::ID_mask = 0xff
staticconstexprprivate

Definition at line 55 of file Block.h.

Referenced by raw().

◆ ID_shift

constexpr unsigned l1t::BlockHeader::ID_shift = 24
staticconstexprprivate

Definition at line 54 of file Block.h.

Referenced by raw().

◆ size_

unsigned int l1t::BlockHeader::size_
private

Definition at line 64 of file Block.h.

Referenced by getSize(), and raw().

◆ size_mask

constexpr unsigned l1t::BlockHeader::size_mask = 0xff
staticconstexprprivate

Definition at line 57 of file Block.h.

Referenced by raw().

◆ size_shift

constexpr unsigned l1t::BlockHeader::size_shift = 16
staticconstexprprivate

Definition at line 56 of file Block.h.

Referenced by raw().

◆ type_

block_t l1t::BlockHeader::type_
private
l1t::BlockHeader::flags_shift
static constexpr unsigned flags_shift
Definition: Block.h:60
l1t::BlockHeader::type_
block_t type_
Definition: Block.h:67
l1t::BlockHeader::flags_
unsigned int flags_
Definition: Block.h:66
l1t::CTP7
Definition: Block.h:11
l1t::BlockHeader::capID_mask
static constexpr unsigned capID_mask
Definition: Block.h:59
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
l1t::BlockHeader::flags_mask
static constexpr unsigned flags_mask
Definition: Block.h:61
l1t::BlockHeader::ID_mask
static constexpr unsigned ID_mask
Definition: Block.h:55
l1t::MP7
Definition: Block.h:11
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
l1t::BlockHeader::id_
unsigned int id_
Definition: Block.h:63
l1t::BlockHeader::ID_shift
static constexpr unsigned ID_shift
Definition: Block.h:54
l1t::BlockHeader::size_
unsigned int size_
Definition: Block.h:64
l1t::BlockHeader::size_mask
static constexpr unsigned size_mask
Definition: Block.h:57
l1t::BlockHeader::capID_
unsigned int capID_
Definition: Block.h:65
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
l1t::BlockHeader::capID_shift
static constexpr unsigned capID_shift
Definition: Block.h:58
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
l1t::BlockHeader::size_shift
static constexpr unsigned size_shift
Definition: Block.h:56
HLT_FULL_cff.flags
flags
Definition: HLT_FULL_cff.py:13216
l1t::BlockHeader::getID
unsigned int getID() const
Definition: Block.h:43
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443