14#ifndef ATHCONTAINERS_PACKEDLINKCONSTACCESSOR_H
15#define ATHCONTAINERS_PACKEDLINKCONSTACCESSOR_H
26#include "AthLinks/ElementLink.h"
27#include "AthLinks/DataLink.h"
69template <
class CONT,
class ALLOC>
78 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
138 template <IsConstAuxElement ELT>
203 const std::string& clsname,
253template <
class CONT,
class ALLOC,
class VALLOC>
261 using VElt_t = std::vector<SG::PackedLink<CONT>, VALLOC>;
263 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
329 template <IsConstAuxElement ELT>
366 template <IsConstAuxElement ELT>
414 const std::string& clsname,
Allow customizing how aux data types are treated.
Base class for elements of a container that can have aux data.
Basic definitions for auxiliary types.
Helper class to provide constant type-safe access to aux data.
Base class usable for accessors for variables with linked variables.
Conversions between PackedLink and ElementLink.
Definition of PackedLink type.
Object reference supporting deferred reading from StoreGate.
ElementLink implementation for ROOT usage.
Allow customizing how aux data types are treated.
CxxUtils::span< const container_value_type > const_span
Manage lookup of vectors of auxiliary data.
typename AuxDataTraits< PackedLink< CONT >, ALLOC >::const_span const_PackedLink_span
Spans over the objects that are actually stored.
const DLink_t * getDataLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
ConstAccessor(const std::string &name)
Constructor.
ConstAccessor(const std::string &name, const std::string &clsname)
Constructor.
typename std::allocator_traits< ALLOC >::template rebind_alloc< DLink_t > DLinkAlloc_t
ConstAccessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
SG::PackedLink< CONT > PLink_t
const_span getDataSpan(const AuxVectorData &container) const
Get a span of ElementLinks.
Link_t resolveLink(const AuxVectorData &container, size_t index) const
Helper to resolve a PackedLink to an ElementLink.
ConstAccessor(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
Constructor.
detail::PackedLinkConstConverter< CONT > ConstConverter_t
Converter from PackedLink -> ElementLink.
CxxUtils::transform_view_with_at< const_PackedLink_span, ConstConverter_t > const_span
Transform a span over PackedLink to a span over ElementLink.
void const_container_pointer_type
Not supported.
Link_t element_type
Type the user sees.
ElementLink< CONT > Link_t
element_type const_reference_type
Type referencing an item.
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::const_span const_DataLink_span
const_DataLink_span getDataLinkSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks.
const PLink_t * getPackedLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the array of PackedLinks.
const_PackedLink_span getPackedLinkSpan(const AuxVectorData &container) const
Get a span over the array of PackedLinks.
std::vector< SG::PackedLink< CONT >, VALLOC > VElt_t
ElementLink< CONT > Link_t
const VElt_t * getPackedLinkVectorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of vectors of PackedLinks.
element_type const_reference_type
Type referencing an item.
SG::PackedLink< CONT > PLink_t
const_PackedLink_span getPackedLinkSpan(const ELT &e) const
Get a span over the vector of PackedLinks for a given element.
const_PackedLink_span getPackedLinkSpan(const AuxVectorData &container, size_t index) const
Get a span over the vector of PackedLinks for a given element.
typename ConstVectorTransform_t::value_type const_elt_span
detail::PackedLinkVectorConstConverter< CONT > ConstVectorTransform_t
Converter from vector of PackedLink to a span over ElementLinks.
ConstAccessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::const_span const_DataLink_span
const_DataLink_span getDataLinkSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks.
const DLink_t * getDataLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
ConstAccessor(const std::string &name, const std::string &clsname)
Constructor.
ConstAccessor(const std::string &name)
Constructor.
void const_container_pointer_type
Not supported.
const_span getDataSpan(const AuxVectorData &container) const
Get a span over spans of ElementLinks.
CxxUtils::transform_view_with_at< const_PackedLinkVector_span, ConstVectorTransform_t > const_span
Transform a span over vector of PackedLink to a span over span over ElementLink.
typename std::allocator_traits< ALLOC >::template rebind_alloc< DLink_t > DLinkAlloc_t
typename AuxDataTraits< PackedLink< CONT >, VALLOC >::const_span const_PackedLink_span
And a span over PackedLink objects.
typename AuxDataTraits< VElt_t, ALLOC >::const_span const_PackedLinkVector_span
Spans over the objects that are actually stored.
const_PackedLinkVector_span getPackedLinkVectorSpan(const AuxVectorData &container) const
Get a span over the vectors of PackedLinks.
const_elt_span element_type
Type the user sees.
ConstAccessor(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
Constructor.
const_reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a const reference.
SG::auxid_t auxid() const
Base class usable for accessors for variables with linked variables.
Helper: Convert a PackedLink to an ElementLink.
Helper: Convert a vector of PackedLink to a span over ElementLinks.
CxxUtils::range_with_conv< CxxUtils::transform_view_with_at< const_PackedLink_span, detail::PackedLinkConstConverter< CONT > > > value_type
Transform the span of PackedLinks to a span of ElementLinks.
range_with_at< std::ranges::transform_view< SPAN, XFORM > > transform_view_with_at
Helper to add at() methods to a transform_view.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
size_t auxid_t
Identifier for a particular aux data item.
Add at() methods to a range class.
Add to a range class conversions to containers.
A packed version of ElementLink.