|
ATLAS Offline Software
|
Go to the documentation of this file.
21 BitField(
unsigned int offset_,
unsigned int bits_ );
39 if(
value >= m_maxValue ) {
return false;}
45 id |= (
value<<m_offset);
53 return (
id & m_mask) >> m_offset;
BitField(unsigned int offset_, unsigned int bits_)
constructor, taking the offset (position of the first bit) and the number of bits No range checking i...
unsigned int m_mask
maximum allow value
A class managing bits belonging to a range of bits.
bool encode(unsigned int value, T &id) const
encode a value into id, return false if the value is out of range
unsigned int m_bits
position of the first bit manipulated by the BitField
Ensure that the ATLAS eigen extensions are properly loaded.
unsigned int decode(T id) const
returns the result of decode the input id
unsigned int m_maxValue
number of m_bits that the BitField is allowed to manipulate