|
LDMX Software
|
Provides information about a field within a DetectorID. More...
#include <IDField.h>
Public Types | |
| typedef std::map< std::string, IDField * > | IDFieldMap |
| Map of name to field. | |
| typedef std::vector< IDField * > | IDFieldList |
| List of fields. | |
Public Member Functions | |
| IDField (std::string name, unsigned index, unsigned startBit, unsigned endBit) | |
| Class constructor. | |
| const std::string & | getFieldName () |
| Get the name of the field. | |
| unsigned | getIndex () |
| Get the index of the field. | |
| unsigned | getStartBit () |
| Get the start bit of the field. | |
| unsigned | getEndBit () |
| Get the end bit of the field. | |
| unsigned | getBitMask () |
| Get a bit mask for this field. | |
Static Public Member Functions | |
| static unsigned | createBitMask (unsigned startBit, unsigned endBit) |
| Utility for creating a bit mask from a start to end bit. | |
| static unsigned | countOnes (unsigned mask) |
| Utility for counting number of 1 in a mask. | |
Private Attributes | |
| std::string | field_name_ |
| The name of the field. | |
| unsigned | index_ |
| The index of the field. | |
| unsigned | start_bit_ |
| The start bit of the field. | |
| unsigned | end_bit_ |
| The end bit of the field. | |
| unsigned | bit_mask_ |
| The bit mask of the field. | |
Provides information about a field within a DetectorID.
| std::vector<IDField*> ldmx::IDField::IDFieldList |
| std::map<std::string, IDField*> ldmx::IDField::IDFieldMap |
| ldmx::IDField::IDField | ( | std::string | name, |
| unsigned | index, | ||
| unsigned | startBit, | ||
| unsigned | endBit ) |
Class constructor.
| name | The name of the field. |
| index | The index of the field in the ID. |
| startBit | The start bit of the field. |
| endBit | The end bit of the field. |
Definition at line 5 of file IDField.cxx.
References bit_mask_, and createBitMask().
|
static |
Utility for counting number of 1 in a mask.
| startBit | The start bit. |
| endBit | The end bit. |
Definition at line 33 of file IDField.cxx.
|
static |
Utility for creating a bit mask from a start to end bit.
| startBit | The start bit. |
| endBit | The end bit. |
Definition at line 25 of file IDField.cxx.
Referenced by IDField().
| unsigned ldmx::IDField::getBitMask | ( | ) |
Get a bit mask for this field.
Definition at line 23 of file IDField.cxx.
References bit_mask_.
Referenced by ldmx::DetectorIDInterpreter::getFieldValue().
| unsigned ldmx::IDField::getEndBit | ( | ) |
Get the end bit of the field.
Definition at line 21 of file IDField.cxx.
References end_bit_.
| const std::string & ldmx::IDField::getFieldName | ( | ) |
Get the name of the field.
Definition at line 15 of file IDField.cxx.
References field_name_.
| unsigned ldmx::IDField::getIndex | ( | ) |
Get the index of the field.
Definition at line 17 of file IDField.cxx.
References index_.
| unsigned ldmx::IDField::getStartBit | ( | ) |
Get the start bit of the field.
Definition at line 19 of file IDField.cxx.
References start_bit_.
Referenced by ldmx::DetectorIDInterpreter::getFieldValue().
|
private |
The bit mask of the field.
Definition at line 104 of file IDField.h.
Referenced by getBitMask(), and IDField().
|
private |
|
private |
|
private |
|
private |