14#ifndef ATHCONTAINERS_PACKEDLINKDECORATOR_H
15#define ATHCONTAINERS_PACKEDLINKDECORATOR_H
29#include "AthLinks/DataLink.h"
73template <
class CONT,
class ALLOC>
79 using Link_t = ElementLink<CONT>;
80 using PLink_t = SG::PackedLink<CONT>;
81 using DLink_t = DataLink<CONT>;
82 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
86 using const_PackedLink_span =
typename AuxDataTraits<PackedLink<CONT>, ALLOC>
::const_span;
87 using const_DataLink_span =
typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>
::const_span;
89 using DataLink_span =
typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>
::span;
93 using ConstConverter_t = detail::PackedLinkConstConverter<CONT>;
102 using ELProxy = detail::ELProxyT<detail::ELProxyValBase<CONT> >;
122 using rhs_const_reference_type =
const Link_t&;
145 Decorator (
const std::string& name,
const std::string& clsname);
168 template <IsConstAuxElement ELT>
195 template <IsConstAuxElement ELT>
254 const_PackedLink_span
316 template <IsConstAuxElement ELT>
337 const std::string& clsname,
390template <
class CONT,
class ALLOC,
class VALLOC>
391class Decorator<
std::
vector<PackedLink<CONT>, VALLOC>, ALLOC>
392 :
public detail::LinkedVarAccessorBase
398 using VElt_t = std::vector<SG::PackedLink<CONT>, VALLOC>;
400 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
404 using const_DataLink_span =
typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>
::const_span;
406 using DataLink_span =
typename AuxDataTraits<DataLink<CONT>, DLinkAlloc_t>
::span;
409 using const_PackedLink_span =
typename AuxDataTraits<PackedLink<CONT>, VALLOC>
::const_span;
410 using PackedLink_span =
typename AuxDataTraits<PackedLink<CONT>, VALLOC>
::span;
414 using ConstVectorTransform_t = detail::PackedLinkVectorConstConverter<CONT>;
460 Decorator (
const std::string& name,
const std::string& clsname);
483 template <IsConstAuxElement ELT>
510 template <IsConstAuxElement ELT, detail::ElementLinkRange<CONT> RANGE>
511 void set (
const ELT& e,
const RANGE&
x)
const;
520 template <detail::ElementLinkRange<CONT> RANGE>
562 template <IsConstAuxElement ELT>
563 const_PackedLink_span
572 const_PackedLink_span
589 const_PackedLinkVector_span
618 template <IsConstAuxElement ELT>
646 PackedLinkVector_span
683 template <IsConstAuxElement ELT>
704 const std::string& clsname,
Allow customizing how aux data types are treated.
Handle mappings between names and auxid_t.
Basic definitions for auxiliary types.
Manage lookup of vectors of auxiliary data.
Helper class to provide type-safe access to aux data.
Helpers for proxying ElementLink for PackedLink accessors.
Flag that a class may have auxiliary data associated with it.
Helper class to provide constant type-safe access to aux data, specialized for PackedLink.
Definition of PackedLink type.
Factory object that creates vectors using AuxTypeVector, specialized for PackedLink.
Define macros for attributes used to control the static checker.
Object reference supporting deferred reading from StoreGate.
ElementLink implementation for ROOT usage.
CxxUtils::span< container_value_type > span
CxxUtils::span< const container_value_type > const_span
Manage lookup of vectors of auxiliary data.
Converter from a vector of PackedLink to a range of ElementLink proxies.
Proxy for a span of ElementLinks.
Base class usable for accessors for variables with linked variables.
range_with_at< std::ranges::transform_view< SPAN, XFORM > > transform_view_with_at
Helper to add at() methods to a transform_view.
detail::ELProxyConverter< detail::ELProxyInSpan< CONT > > ELProxyInSpanConverter
Converter producing a proxy — meant to be used when we have a proxy as a member of a span.
typename AuxDataTraits< PackedLink< CONT >, PLINK_ALLOC >::span PackedLink_span
A span over PackedLink.
detail::ELSpanConverter< CONT, VALLOC > ELSpanConverter
Transform a span over vector of PackedLink to a span over span over ElementLink proxies.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
PackedLink_span getPackedLinkDecorSpan(const AuxVectorData &container) const
Get a span over the array of PackedLinks, as a decoration.
DataLink_span getDataLinkDecorSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks, as a decoration.
const_PackedLinkVector_span getPackedLinkVectorSpan(const AuxVectorData &container) const
Get a span over the vectors of PackedLinks.
detail::ELSpanProxy< CONT, VALLOC > elt_span
Presents a vector of PackedLink as a range of ElementLink proxies.
const_PackedLink_span getPackedLinkSpan(const AuxVectorData &container) const
Get a span over the array of PackedLinks.
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
SG::auxid_t auxid() const
Return the aux id for this variable.
const PLink_t * getPackedLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the array of PackedLinks.
void set(const ELT &e, const element_type &x) const
Set the variable for one element.
const_DataLink_span getDataLinkSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks.
reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a non-const reference.
PackedLinkVector_span getPackedLinkVectorDecorSpan(const AuxVectorData &container) const
Get a span over the vectors of PackedLinks, as a decoration.
CxxUtils::transform_view_with_at< PackedLinkVector_span, ELSpanConverter > span
void const_container_pointer_type
DLink_t * getDataLinkDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks, as a decoration.
elt_span reference_type
Type referencing an item.
const SG::AuxVectorData * container() const
Return the container holding this element.
CxxUtils::transform_view_with_at< const_PackedLinkVector_span, ConstVectorTransform_t > const_span
Helper class to provide constant type-safe access to aux data, specialized for a vector of PackedLink...
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable(const std::string &name, const std::string &clsname="")
Check if an aux variable is available for writing.
VElt_t * getPackedLinkVectorDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of vectors of PackedLinks, as a decoration.
PLink_t * getPackedLinkDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of PackedLinks, as a decoration.
const_span getDataSpan(const AuxVectorData &container) const
Get a span over the auxiliary data array.
elt_span element_type
Type the user sees.
const DLink_t * getDataLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
const VElt_t * getPackedLinkVectorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of vectors of PackedLinks.
span getDecorationSpan(const AuxVectorData &container) const
Get a span over the auxiliary data array.
void container_pointer_type
Not supported.
size_t auxid_t
Identifier for a particular aux data item.
A packed version of ElementLink.