![]() |
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. More... | |
| size_type | unpackToIndex (Identifier id) const |
| Unpack a single field index of the id. More... | |
| void | pack (int value, Identifier &id) const |
| void | reset (Identifier &id) const |
| const IdDictRange * | range () const |
| Accessors. More... | |
| 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. More... | |
| 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 57 of file IdDictFieldImplementation.h.
Definition at line 62 of file IdDictFieldImplementation.h.
Definition at line 61 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 124 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 202 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 208 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 231 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 191 of file IdDictFieldImplementation.h.
|
inlineprivate |
Definition at line 236 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 214 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 294 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 196 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 173 of file IdDictFieldImplementation.h.
| const IdDictRange * IdDictFieldImplementation::range | ( | ) | const |
Accessors.
@fileIdDictFieldImplementation.cxx
Definition at line 20 of file IdDictFieldImplementation.cxx.
|
inline |
Definition at line 183 of file IdDictFieldImplementation.h.
Definition at line 278 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 269 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 288 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 251 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 259 of file IdDictFieldImplementation.h.
| void IdDictFieldImplementation::set_range | ( | const IdDictRange * | range | ) |
Modifiers.
Definition at line 23 of file IdDictFieldImplementation.cxx.
|
inline |
Definition at line 226 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 147 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 164 of file IdDictFieldImplementation.h.
|
inline |
Definition at line 220 of file IdDictFieldImplementation.h.
|
private |
Definition at line 111 of file IdDictFieldImplementation.h.
|
private |
Definition at line 112 of file IdDictFieldImplementation.h.
|
private |
Definition at line 116 of file IdDictFieldImplementation.h.
|
private |
Definition at line 109 of file IdDictFieldImplementation.h.
|
private |
Definition at line 113 of file IdDictFieldImplementation.h.
|
private |
Definition at line 110 of file IdDictFieldImplementation.h.
|
private |
Definition at line 108 of file IdDictFieldImplementation.h.
|
private |
Definition at line 115 of file IdDictFieldImplementation.h.
|
private |
Definition at line 114 of file IdDictFieldImplementation.h.
1.8.18