![]() |
ATLAS Offline Software
|
a special column type that behaves like an OptObjectId, but applies an internal cast in xAOD mode More...
#include <LinkColumn.h>
Static Public Attributes | |
| static constexpr unsigned | numLinkTypes = detail::LinkDistinctTypeCount<detail::LinkClidType<LT>,detail::LinkClidType<ELT>,detail::LinkClidType<ExtraELT>...>::value |
| the number of keys a key+index link accepts for its target, i.e. | |
a special column type that behaves like an OptObjectId, but applies an internal cast in xAOD mode
In general there are three types involved in a link column, each serving a different role:
All these types are identified via a ContainerId. Except for LT the ContainerId is only used to identify the xAOD type and it doesn't matter e.g. whether you pass Particle0Def or Particle1Def. Making them all ContainerId makes type handling somewhat more uniform, and means we encapsulate the concrete types a bit more in columnar code.
For xAOD-mode code the only types used are the link type and the ElementLink type. It will retrieve the link using the ElementLink type and then immediately cast to the link type. This is needed because xAOD decorations have an exact type, and it is not always the type we use a link as.
For array-mode the main type used is the link type, which directly indicates the type we use. The other types are however also used and important, as they are used to deduce the possible sgkey values in the on-disk representation.
WARNING: For "variant" links there is no check that your list of types is complete. If a type is missing and that's what the link is saved as, it will just be ignored and assumed to belong to an unenumerated target container.
IMPORTANT: The exact handling of keys and types for keys is still in flux (30 Oct 26). Should we find that this way of handling links is too inflexible it may change in the future.
Definition at line 94 of file LinkColumn.h.
|
staticconstexpr |
the number of keys a key+index link accepts for its target, i.e.
the number of distinct types among the target container, ELT and ExtraELT...
This relies on distinct types having distinct CLIDs, which is the same assumption the keys themselves rely on. It mirrors the CLIDs collected by the link accessor (the CLID of the target container followed by the CLIDs of the link types).
Definition at line 107 of file LinkColumn.h.