1#include "DetDescr/IDField.h"
7 : fieldName_(fieldName),
27 for (
int i = startBit; i <= endBit; i++) {
35 for (
int i = 0; i < 32; i++)
36 if (
mask & (1 << i)) rv++;
unsigned endBit_
The end bit of the field.
unsigned getStartBit()
Get the start bit of the field.
static unsigned countOnes(unsigned mask)
Utility for counting number of 1 in a mask.
unsigned startBit_
The start bit of the field.
unsigned getIndex()
Get the index of the field.
IDField(std::string name, unsigned index, unsigned startBit, unsigned endBit)
Class constructor.
static unsigned createBitMask(unsigned startBit, unsigned endBit)
Utility for creating a bit mask from a start to end bit.
unsigned bitMask_
The bit mask of the field.
std::string fieldName_
The name of the field.
unsigned index_
The index of the field.
unsigned getBitMask()
Get a bit mask for this field.
const std::string & getFieldName()
Get the name of the field.
unsigned getEndBit()
Get the end bit of the field.