ATLAS Offline Software
|
Auxiliary variable type allowing to store ElementLinks
as packed 32-bit values.
More...
#include "AthContainers/PackedLinkImpl.h"
#include "AthContainers/tools/PackedLinkVectorFactory.h"
#include "AthContainers/PackedLinkConstAccessor.h"
#include "AthContainers/PackedLinkAccessor.h"
#include "AthContainers/PackedLinkDecorator.h"
Go to the source code of this file.
Auxiliary variable type allowing to store ElementLinks
as packed 32-bit values.
ElementLinks
as an auxiliary variable that is a 32-bit integer. Individual links are stored as a 24-bit index and an 8-bit container index, which is an index into a linked variable of DataLinks. This saves space, but will add time overhead when accessing the variable due to conversions back and forth from ElementLink
.The usual way of declaring a packed link variable in an xAOD container class is to use the macros defined in xAODCore/PackedLink.h:
This will declare the auxilary variable clink
to be a packed link to elements of Container
, and cvec
to ba a vector of such packed links.
Packed link variables are accessed using Accesor
classes as usual, where the type is given as SG::PackedLink<Container>
. So one can write, for example,
ConstAccessor
and Decorator
should work as expected. The accessors can also be used to create dynamic packed link variables.
For each packed link variable, there is an additional ‘linked’ variable created automatically. In the example above, these would be named clink_linked
and cvec_linked
. Normally you don't need to refer to these directly, but you may need to name them if you are selecting individual variables to write.
Definition in file Control/AthContainers/AthContainers/PackedLink.h.