1#ifndef DETDESCR_IDFIELD_H
2#define DETDESCR_IDFIELD_H
34 IDField(std::string name,
unsigned index,
unsigned startBit,
unsigned endBit);
71 static unsigned createBitMask(
unsigned startBit,
unsigned endBit);
Provides information about a field within a DetectorID.
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.
std::map< std::string, IDField * > IDFieldMap
Map of name to field.
unsigned getIndex()
Get the index of the field.
std::vector< IDField * > IDFieldList
List of fields.
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.