![]() |
ATLAS Offline Software
|
A packed version of ElementLink.
More...
#include <PackedLinkImpl.h>
Public Member Functions | |
| PackedLinkBase () | |
| Default constructor. More... | |
| PackedLinkBase (unsigned int collection, unsigned int index) | |
| Constructor. More... | |
| bool | operator== (const PackedLinkBase &other) const |
| Comparison. More... | |
| unsigned int | collection () const |
| Unpack the collection index from the link. More... | |
| unsigned int | index () const |
| Unpack the element index from the link. More... | |
| void | setCollection (unsigned int collection) |
| Set the collection index;. More... | |
| void | setIndex (unsigned int index) |
| Set the element index;. More... | |
Static Public Attributes | |
| static constexpr unsigned | NBITS = 32 |
| static constexpr unsigned | COLLECTION_NBITS = 8 |
| static constexpr unsigned | INDEX_NBITS = NBITS - COLLECTION_NBITS |
| static constexpr uint32_t | COLLECTION_MAX = CxxUtils::ones<uint32_t> (COLLECTION_NBITS) |
| static constexpr uint32_t | INDEX_MAX = CxxUtils::ones<uint32_t> (INDEX_NBITS) |
Private Attributes | |
| uint32_t | m_packed |
| The packed form of the link. More... | |
A packed version of ElementLink.
This is a packed form of ElementLink, which can be used as an auxiliary variable. It occupies 32 bits. The high 8 bits specify the collection, as an index into a linked vector of DataLink. The remainder gives the element index. A PackedLinkBase that's 0 represents a null link.
This non-templated base class holds the actual packed value. However, users should use the PackedLink<STORABLE> derived types, to allow specifying the target of the links.
Definition at line 46 of file PackedLinkImpl.h.
| SG::PackedLinkBase::PackedLinkBase | ( | ) |
Default constructor.
Initialize a null link.
| SG::PackedLinkBase::PackedLinkBase | ( | unsigned int | collection, |
| unsigned int | index | ||
| ) |
Constructor.
| collection | The index of the collection in the DataLink vector, |
| index | The index of the element within the collection. |
| unsigned int SG::PackedLinkBase::collection | ( | ) | const |
Unpack the collection index from the link.
| unsigned int SG::PackedLinkBase::index | ( | ) | const |
Unpack the element index from the link.
| bool SG::PackedLinkBase::operator== | ( | const PackedLinkBase & | other | ) | const |
Comparison.
| other | The link with which to compare. |
| void SG::PackedLinkBase::setCollection | ( | unsigned int | collection | ) |
Set the collection index;.
| collection | The index of the collection in the DataLink vector, |
| void SG::PackedLinkBase::setIndex | ( | unsigned int | index | ) |
Set the element index;.
| index | The index of the element within the collection. |
|
staticconstexpr |
Definition at line 51 of file PackedLinkImpl.h.
|
staticconstexpr |
Definition at line 49 of file PackedLinkImpl.h.
|
staticconstexpr |
Definition at line 52 of file PackedLinkImpl.h.
|
staticconstexpr |
Definition at line 50 of file PackedLinkImpl.h.
|
private |
The packed form of the link.
Definition at line 105 of file PackedLinkImpl.h.
|
staticconstexpr |
Definition at line 48 of file PackedLinkImpl.h.
1.8.18