![]() |
ATLAS Offline Software
|
Helper for packing into/out of a bit field. More...
#include <CaloCellPackerUtils.h>
Public Member Functions | |
Bitfield (unsigned int mask=1) | |
Constructor. More... | |
unsigned int | in (unsigned int x) const |
Shift and mask a value into the bitfield. More... | |
unsigned int | out (unsigned int x) const |
Extract a value from the bitfield. More... | |
Protected Attributes | |
unsigned int | m_mask |
Bitmask. Lower bit should be 1. More... | |
unsigned int | m_shift |
Shift count. More... | |
Helper for packing into/out of a bit field.
The bitfield is identified by a bitmask, which should contain a contiguous string of 1's. The in
function will then take a value and shift and mask it appropriately for the bitfield. The out
function will extract a value from the bitfield.
Definition at line 36 of file CaloCellPackerUtils.h.
CaloCellPackerUtils::Bitfield::Bitfield | ( | unsigned int | mask = 1 | ) |
Constructor.
The | bit mask. Should contain a single contiguous string of 1's. |
Definition at line 25 of file CaloCellPackerUtils.cxx.
unsigned int CaloCellPackerUtils::Bitfield::in | ( | unsigned int | x | ) | const |
Shift and mask a value into the bitfield.
x | The input value. |
unsigned int CaloCellPackerUtils::Bitfield::out | ( | unsigned int | x | ) | const |
Extract a value from the bitfield.
x | The input bitfield. |
|
protected |
Bitmask. Lower bit should be 1.
Definition at line 64 of file CaloCellPackerUtils.h.
|
protected |
Shift count.
Definition at line 67 of file CaloCellPackerUtils.h.