![]() |
ATLAS Offline Software
|
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier. More...
#include <IdDictFieldImplementation.h>
Public Types | |
| enum | bit_defs { NBITS = sizeof(value_type) * 8 , MAX_BIT = (static_cast<value_type>(1) << (NBITS - 1)) , ALL_BITS = ~(static_cast<value_type>(0)) } |
| typedef Identifier::value_type | value_type |
| typedef Identifier::size_type | size_type |
Public Member Functions | |
| IdDictFieldImplementation () | |
| int | unpack (Identifier id) const |
| Identifier manipulation methods. | |
| size_type | unpackToIndex (Identifier id) const |
| Unpack a single field index of the id. | |
| void | pack (int value, Identifier &id) const |
| void | reset (Identifier &id) const |
| const IdDictRange * | range () const |
| Accessors. | |
| const Range::field & | field () const |
| const Range::field & | ored_field () const |
| size_type | bits () const |
| size_type | bits_offset () const |
| size_type | mask () const |
| value_type | zeroing_mask () const |
| size_type | shift () const |
| bool | decode_index () const |
| void | set_range (const IdDictRange *range) |
| Modifiers. | |
| void | set_field (const Range::field &field) |
| void | set_ored_field (const Range::field &ored_field) |
| void | set_bits_offset (size_type bits_offset) |
| void | set_bits (size_type bits, size_type bits_offset) |
| void | set_decode_index (bool decode_index) |
| void | optimize (void) |
| void | show (void) const |
| std::string | show_to_string (void) const |
Private Member Functions | |
| void | initialize () |
Private Attributes | |
| const IdDictRange * | m_range |
| Range::field | m_field |
| Range::field | m_ored_field |
| size_type | m_bits |
| size_type | m_bits_offset |
| size_type | m_mask |
| value_type | m_zeroing_mask |
| size_type | m_shift |
| bool | m_decode_index |
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
This class is primarily used to extract or set the field of an identifier:
int unpack (Identifier id) const; // access to field value size_type unpackToIndex (Identifier id) const; // access to field index, i.e. from 0 void pack (int value, Identifier& id) const; void reset (Identifier& id) const; // reset field bits
This class is normally filled during the parsing of the identifier dictionary. The parsing uses the set_ored_field method where the the internal variables are set to optimize the calculations. One may also build a new object by simply using:
void set_bits (size_type bits, size_type bits_offset);
This as well sets all internal variables.
The meaning of the varibles is:
size_type bits() - number of bits for this field size_type bits_offset() - bits offset relative to 1st field size_type mask() - mask: (xxx >> shift) & mask value_type zeroing_mask() - used to reset field to 0 size_type shift() - shift: (xxx >> shift) & mask bool decode_index() - true == need to lookup value
// Primarily for internal use: const IdDictRange* range() - points to the generating IdDictRange Range::field field() - derived from IdDictRange Range::field ored_field() - "expanded" field to account for other overlapping fields
Definition at line 58 of file IdDictFieldImplementation.h.
| typedef Identifier::size_type IdDictFieldImplementation::size_type |
Definition at line 63 of file IdDictFieldImplementation.h.
| typedef Identifier::value_type IdDictFieldImplementation::value_type |
Definition at line 62 of file IdDictFieldImplementation.h.
| Enumerator | |
|---|---|
| NBITS | |
| MAX_BIT | |
| ALL_BITS | |
Definition at line 65 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 129 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 207 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 213 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 236 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 196 of file IdDictFieldImplementation.h.
|
inlineprivate |
Definition at line 241 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 219 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 299 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 201 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 178 of file IdDictFieldImplementation.h.
| const IdDictRange * IdDictFieldImplementation::range | ( | ) | const |
Accessors.
@fileIdDictFieldImplementation.cxx
Definition at line 20 of file IdDictFieldImplementation.cxx.
|
inline |
Definition at line 188 of file IdDictFieldImplementation.h.
Definition at line 283 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 274 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 293 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 256 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 264 of file IdDictFieldImplementation.h.
| void IdDictFieldImplementation::set_range | ( | const IdDictRange * | range | ) |
Modifiers.
Definition at line 23 of file IdDictFieldImplementation.cxx.
|
inline |
Definition at line 231 of file IdDictFieldImplementation.h.
| void IdDictFieldImplementation::show | ( | void | ) | const |
Definition at line 28 of file IdDictFieldImplementation.cxx.
| std::string IdDictFieldImplementation::show_to_string | ( | void | ) | const |
Definition at line 32 of file IdDictFieldImplementation.cxx.
|
inline |
Identifier manipulation methods.
Unpack a single field of the bits32 id.
One specifies the pointer to the field implementation to be used for decoding. The first_field_index is normally 0. It is non-zero when fields 0 to first_field_index -1 are missing from the compact
Definition at line 152 of file IdDictFieldImplementation.h.
|
inline |
Unpack a single field index of the id.
The value unpacked above may differ from the index if the values are enumerated rather than simply 0 to N-1.
Definition at line 169 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 225 of file IdDictFieldImplementation.h.
|
private |
Definition at line 112 of file IdDictFieldImplementation.h.
|
private |
Definition at line 113 of file IdDictFieldImplementation.h.
|
private |
Definition at line 117 of file IdDictFieldImplementation.h.
|
private |
Definition at line 110 of file IdDictFieldImplementation.h.
|
private |
Definition at line 114 of file IdDictFieldImplementation.h.
|
private |
Definition at line 111 of file IdDictFieldImplementation.h.
|
private |
Definition at line 109 of file IdDictFieldImplementation.h.
|
private |
Definition at line 116 of file IdDictFieldImplementation.h.
|
private |
Definition at line 115 of file IdDictFieldImplementation.h.