14#ifndef ATHCONTAINERS_PACKEDLINKACCESSOR_H
15#define ATHCONTAINERS_PACKEDLINKACCESSOR_H
74template <
class CONT,
class ALLOC>
84 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
114 using Base::operator();
115 using Base::getPackedLinkArray;
116 using Base::getDataLinkArray;
117 using Base::getPackedLinkSpan;
118 using Base::getDataLinkSpan;
138 Accessor (
const std::string& name,
const std::string& clsname);
157 template <IsAuxElement ELT>
292template <
class CONT,
class ALLOC,
class VALLOC>
294 :
public ConstAccessor<std::vector<PackedLink<CONT>, VALLOC>, ALLOC>
301 using VElt_t = std::vector<SG::PackedLink<CONT>, VALLOC>;
303 using DLinkAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<DLink_t>;
335 using Base::operator();
336 using Base::getPackedLinkVectorArray;
337 using Base::getDataLinkArray;
338 using Base::getPackedLinkSpan;
339 using Base::getPackedLinkVectorSpan;
341 using Base::getDataLinkSpan;
360 Accessor (
const std::string& name,
const std::string& clsname);
379 template <IsAuxElement ELT>
401 template <detail::ElementLinkRange<CONT> RANGE>
411 template <detail::ElementLinkRange<CONT> RANGE>
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.
Define macros for attributes used to control the static checker.
Object reference supporting deferred reading from StoreGate.
ElementLink implementation for ROOT usage.
typename AuxDataTraits< PackedLink< CONT >, ALLOC >::span PackedLink_span
Spans over the objects that are actually stored.
bool isAvailableWritable(AuxElement &e) const
Test to see if this variable exists in the store and is writable.
ConstAccessor< PackedLink< CONT >, ALLOC > Base
Accessor(const std::string &name)
Constructor.
DataLink_span getDataLinkSpan(AuxVectorData &container) const
Get a span over the array of DataLinks.
detail::ELProxyT< detail::ELProxyValBase< CONT > > ELProxy
Writable proxy for PackedLink appearing like an ElementLink.
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::span DataLink_span
void set(AuxElement &e, const Link_t &l) const
Set the variable for one element.
ElementLink< CONT > Link_t
typename std::allocator_traits< ALLOC >::template rebind_alloc< DLink_t > DLinkAlloc_t
void container_pointer_type
Not supported.
void const_container_pointer_type
CxxUtils::transform_view_with_at< PackedLink_span, detail::ELProxyInSpanConverter< CONT > > span
Transform a non-const span of PackedLink to a range of ElementLink proxies.
bool isAvailableWritable(AuxVectorData &c) const
Test to see if this variable exists in the store and is writable.
void set(AuxVectorData &container, size_t index, const Link_t &x) const
Set the variable for one element.
Link_t element_type
Type the user sees.
ELProxy reference_type
Type referencing an item.
Accessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
Accessor(const std::string &name, const std::string &clsname)
Constructor.
PLink_t * getPackedLinkArray(AuxVectorData &container) const
Get a pointer to the start of the array of PackedLinks.
PackedLink_span getPackedLinkSpan(AuxVectorData &container) const
Get a span over the array of PackedLinks.
span getDataSpan(AuxVectorData &container) const
Get a span of ElementLink proxies.
SG::PackedLink< CONT > PLink_t
DLink_t * getDataLinkArray(AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
void set(AuxVectorData &container, size_t index, const RANGE &x) const
Set the variable for one element.
void container_pointer_type
Not supported.
PackedLinkVector_span getPackedLinkVectorSpan(AuxVectorData &container) const
Get a span over the vectors of PackedLinks.
elt_span element_type
Type the user sees.
Accessor(const std::string &name, const std::string &clsname)
Constructor.
span getDataSpan(AuxVectorData &container) const
Get a span over spans of ElementLink proxies.
Accessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
DLink_t * getDataLinkArray(AuxVectorData &container) const
Get a pointer to the start of the linked array of DataLinks.
CxxUtils::transform_view_with_at< PackedLinkVector_span, ELSpanConverter > span
std::vector< SG::PackedLink< CONT >, VALLOC > VElt_t
bool isAvailableWritable(AuxElement &e) const
Test to see if this variable exists in the store and is writable.
ElementLink< CONT > Link_t
detail::ELSpanConverter< CONT, VALLOC > ELSpanConverter
Transform a span over vector of PackedLink to a span over span over ElementLink proxies.
bool isAvailableWritable(AuxVectorData &e) const
Test to see if this variable exists in the store and is writable.
PackedLink_span getPackedLinkSpan(AuxVectorData &container, size_t index) const
Get a span over the vector of PackedLinks for a given element.
typename std::allocator_traits< ALLOC >::template rebind_alloc< DLink_t > DLinkAlloc_t
void set(AuxElement &e, const RANGE &r) const
Set the variable for one element.
typename AuxDataTraits< PackedLink< CONT >, VALLOC >::span PackedLink_span
And a span over PackedLink objects.
void const_container_pointer_type
typename AuxDataTraits< DataLink< CONT >, DLinkAlloc_t >::span DataLink_span
SG::PackedLink< CONT > PLink_t
elt_span reference_type
Type referencing an item.
PackedLink_span getPackedLinkSpan(AuxElement &e) const
Get a span over the vector of PackedLinks for a given element.
VElt_t * getPackedLinkVectorArray(AuxVectorData &container) const
Get a pointer to the start of the array of vectors of PackedLinks.
DataLink_span getDataLinkSpan(AuxVectorData &container) const
Get a span over the array of DataLinks.
detail::ELSpanProxy< CONT, VALLOC > elt_span
Presents a vector of PackedLink as a range of ElementLink proxies.
Accessor(const std::string &name)
Constructor.
ConstAccessor< std::vector< PackedLink< CONT >, VALLOC >, ALLOC > Base
typename AuxDataTraits< VElt_t, ALLOC >::span PackedLinkVector_span
Spans over the objects that are actually stored.
reference_type operator()(ELT &e) const
Fetch the variable for one element, as a non-const reference.
Allow customizing how aux data types are treated.
CxxUtils::span< container_value_type > span
Base class for elements of a container that can have aux data.
Manage lookup of vectors of auxiliary data.
const_span getDataSpan(const AuxVectorData &container) const
ConstAccessor(const std::string &name)
SG::auxid_t auxid() const
Converter from a vector of PackedLink to a range of ElementLink proxies.
Proxy for 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.
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.
size_t auxid_t
Identifier for a particular aux data item.
A packed version of ElementLink.