ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
LVL1BS::BitField Class Reference

#include <WordDecoder.h>

Collaboration diagram for LVL1BS::BitField:

Public Member Functions

 BitField (const std::string &name, uint8_t begin, uint8_t size)
 
template<typename T >
get (const uint32_t &word) const
 

Static Public Member Functions

template<typename T >
static T get (const uint32_t &word, uint8_t offset, uint8_t size)
 
static uint32_t mask (uint32_t word, uint8_t offset, uint32_t mask)
 

Private Attributes

std::string m_name
 
uint32_t m_mask
 
uint8_t m_shift
 

Detailed Description

Definition at line 14 of file WordDecoder.h.

Constructor & Destructor Documentation

◆ BitField()

BitField::BitField ( const std::string &  name,
uint8_t  begin,
uint8_t  size 
)

Definition at line 13 of file WordDecoder.cxx.

13  :
14  m_name(name) {
15  m_shift = begin;
16  m_mask = (1 << size) - 1;
17 }

Member Function Documentation

◆ get() [1/2]

template<typename T >
T LVL1BS::BitField::get ( const uint32_t &  word) const
inline

Definition at line 22 of file WordDecoder.h.

22  {
23  return T((word >> m_shift) & m_mask);
24  }

◆ get() [2/2]

template<typename T >
static T LVL1BS::BitField::get ( const uint32_t &  word,
uint8_t  offset,
uint8_t  size 
)
inlinestatic

Definition at line 26 of file WordDecoder.h.

26  {
27  return T((word >> offset) & ((1 << size) - 1));
28  }

◆ mask()

static uint32_t LVL1BS::BitField::mask ( uint32_t  word,
uint8_t  offset,
uint32_t  mask 
)
inlinestatic

Definition at line 30 of file WordDecoder.h.

30  {
31  return (word >> offset) & mask;
32  }

Member Data Documentation

◆ m_mask

uint32_t LVL1BS::BitField::m_mask
private

Definition at line 17 of file WordDecoder.h.

◆ m_name

std::string LVL1BS::BitField::m_name
private

Definition at line 16 of file WordDecoder.h.

◆ m_shift

uint8_t LVL1BS::BitField::m_shift
private

Definition at line 18 of file WordDecoder.h.


The documentation for this class was generated from the following files:
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LVL1BS::BitField::m_shift
uint8_t m_shift
Definition: WordDecoder.h:18
LVL1BS::BitField::mask
static uint32_t mask(uint32_t word, uint8_t offset, uint32_t mask)
Definition: WordDecoder.h:30
LVL1BS::BitField::m_mask
uint32_t m_mask
Definition: WordDecoder.h:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
LVL1BS::BitField::m_name
std::string m_name
Definition: WordDecoder.h:16
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35