14#ifndef ATHCONTAINERS_PACKEDLINKDECORATOR_H
15#define ATHCONTAINERS_PACKEDLINKDECORATOR_H
29#include "AthLinks/DataLink.h"
73template <
class CONT,
class ALLOC>
82 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
138 Decorator (
const std::string& name,
const std::string& clsname);
161 template <IsConstAuxElement ELT>
188 template <IsConstAuxElement ELT>
309 template <IsConstAuxElement ELT>
330 const std::string& clsname,
383template <
class CONT,
class ALLOC,
class VALLOC>
391 using VElt_t = std::vector<SG::PackedLink<CONT>, VALLOC>;
393 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
453 Decorator (
const std::string& name,
const std::string& clsname);
476 template <IsConstAuxElement ELT>
503 template <IsConstAuxElement ELT, detail::ElementLinkRange<CONT> RANGE>
504 void set (
const ELT& e,
const RANGE&
x)
const;
513 template <detail::ElementLinkRange<CONT> RANGE>
555 template <IsConstAuxElement ELT>
611 template <IsConstAuxElement ELT>
676 template <IsConstAuxElement ELT>
697 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.
Allow customizing how aux data types are treated.
CxxUtils::span< container_value_type > span
CxxUtils::span< const container_value_type > const_span
Manage lookup of vectors of auxiliary data.
Decorator(const std::string &name)
Constructor.
DLink_t * getDataLinkDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks, as a decoration.
void container_pointer_type
Not supported.
Decorator(const SG::auxid_t auxid)
Constructor taking an auxid directly.
bool isAvailableWritable(const AuxVectorData &c) const
Test to see if this variable exists in the store and is writable.
void const_container_pointer_type
ELProxy reference_type
Type referencing an item.
const_PackedLink_span getPackedLinkSpan(const AuxVectorData &container) const
Get a span over the array of PackedLinks.
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::span DataLink_span
typename AuxDataTraits< PackedLink< CONT >, ALLOC >::span PackedLink_span
DataLink_span getDataLinkDecorSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks, as a decoration.
typename AuxDataTraits< PackedLink< CONT >, ALLOC >::const_span const_PackedLink_span
Spans over the objects that are actually stored.
detail::ELProxyT< detail::ELProxyValBase< CONT > > ELProxy
Writable proxy for PackedLink appearing like an ElementLink.
Decorator(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
Constructor.
const_DataLink_span getDataLinkSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks.
span getDecorationSpan(const AuxVectorData &container) const
Get a span of ElementLink proxies, as a decoration.
const DLink_t * getDataLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
const_span getDataSpan(const AuxVectorData &container) const
Get a span of ElementLinks.
Link_t element_type
Type the user sees.
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 &l) const
Set the variable for one element.
ElementLink< CONT > Link_t
PLink_t * getPackedLinkDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of PackedLinks, as a decoration.
detail::PackedLinkConstConverter< CONT > ConstConverter_t
Converter from PackedLink -> ElementLink.
typename std::allocator_traits< ALLOC >::template rebind_alloc< DLink_t > DLinkAlloc_t
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::const_span const_DataLink_span
SG::PackedLink< CONT > PLink_t
bool isAvailableWritable(const ELT &e) const
Test to see if this variable exists in the store and is writable.
PackedLink_span getPackedLinkDecorSpan(const AuxVectorData &container) const
Get a span over the array of PackedLinks, as a decoration.
void set(const AuxVectorData &container, size_t index, const Link_t &x) const
Set the variable for one element.
CxxUtils::transform_view_with_at< const_PackedLink_span, ConstConverter_t > const_span
Transform a span over PackedLink to a span over ElementLink.
Decorator(const std::string &name, const std::string &clsname)
Constructor.
CxxUtils::transform_view_with_at< PackedLink_span, detail::ELProxyInSpanConverter< CONT > > span
Transform a non-const span of PackedLink to a range of ElementLink proxies.
DataLink_span getDataLinkDecorSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks, as a decoration.
const_PackedLink_span getPackedLinkSpan(const ELT &e) const
Get a span over the vector of PackedLinks for a given element.
detail::ELSpanProxy< CONT, VALLOC > elt_span
Presents a vector of PackedLink as a range of ElementLink proxies.
typename AuxDataTraits< VElt_t, ALLOC >::const_span const_PackedLinkVector_span
Spans over the objects that are actually stored.
void container_pointer_type
Not supported.
typename std::allocator_traits< ALLOC >::template rebind_alloc< DLink_t > DLinkAlloc_t
const_span getDataSpan(const AuxVectorData &container) const
Get a span over spans of ElementLinks.
SG::PackedLink< CONT > PLink_t
const DLink_t * getDataLinkArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
typename AuxDataTraits< VElt_t, ALLOC >::span PackedLinkVector_span
std::vector< SG::PackedLink< CONT >, VALLOC > VElt_t
detail::PackedLinkVectorConstConverter< CONT > ConstVectorTransform_t
Converter from vector of PackedLink to a span over ElementLinks.
elt_span element_type
Type the user sees.
void set(const ELT &e, const RANGE &x) const
Set the variable for one element.
PackedLinkVector_span getPackedLinkVectorDecorSpan(const AuxVectorData &container) const
Get a span over the vectors of PackedLinks, as a decoration.
elt_span reference_type
Type referencing an item.
const_DataLink_span getDataLinkSpan(const AuxVectorData &container) const
Get a span over the array of DataLinks.
const_PackedLinkVector_span getPackedLinkVectorSpan(const AuxVectorData &container) const
Get a span over the vectors of PackedLinks.
CxxUtils::transform_view_with_at< PackedLinkVector_span, ELSpanConverter > span
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.
bool isAvailableWritable(const ELT &e) const
Test to see if this variable exists in the store and is writable.
Decorator(const std::string &name)
Constructor.
PackedLink_span getPackedLinkDecorSpan(const ELT &e) const
Get a span over the vector of PackedLinks for a given element, as a decoration.
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::span DataLink_span
DLink_t * getDataLinkDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks, as a decoration.
typename AuxDataTraits< PackedLink< CONT >, VALLOC >::span PackedLink_span
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::const_span const_DataLink_span
const_PackedLink_span getPackedLinkSpan(const AuxVectorData &container, size_t index) const
Get a span over the vector of PackedLinks for a given element.
Decorator(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
Constructor.
Decorator(const std::string &name, const std::string &clsname)
Constructor.
bool isAvailableWritable(const AuxVectorData &e) const
Test to see if this variable exists in the store and is writable.
Decorator(const SG::auxid_t auxid)
Constructor taking an auxid directly.
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 spans of ElementLink proxies, as a decoration.
void const_container_pointer_type
PackedLink_span getPackedLinkSpan(AuxVectorData &container, size_t index) const
Get a span over the vector of PackedLinks for a given element.
VElt_t * getPackedLinkVectorDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of vectors of PackedLinks, as a decoration.
PackedLink_span getPackedLinkDecorSpan(const AuxVectorData &container, size_t index) const
Get a span over the vector of PackedLinks for a given element, as a decoration.
void set(const AuxVectorData &container, size_t index, const RANGE &r) const
Set the variable for one element.
typename AuxDataTraits< PackedLink< CONT >, VALLOC >::const_span const_PackedLink_span
And spans over PackedLink objects.
detail::ELSpanConverter< CONT, VALLOC > ELSpanConverter
Transform a span over vector of PackedLink to a span over span over ElementLink proxies.
ElementLink< CONT > Link_t
SG::auxid_t auxid() const
reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a non-const reference.
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.
Helper: Convert a PackedLink to an ElementLink.
Helper: Convert a vector of PackedLink to a span over ElementLinks.
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.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
size_t auxid_t
Identifier for a particular aux data item.
A packed version of ElementLink.