|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHCONTAINERS_ELPROXY_H
14 #define ATHCONTAINERS_ELPROXY_H
21 #include "AthLinks/DataLink.h"
22 #include "AthLinks/ElementLink.h"
123 template <
class BASE>
201 #define ELPROXY(M) auto M() const { return this->m_cnv (m_pl).M(); }
205 ELPROXY(getStorableObjectPointer)
213 #ifndef XAOD_STANDALONE
223 #ifndef XAOD_STANDALONE
243 template <
class PROXY>
273 using Base::operator();
286 template <
class CONT>
292 template <
class CONT>
301 template <
class CONT,
class PLINK_ALLOC>
306 template <
class CONT,
class PLINK_ALLOC>
309 std::reference_wrapper<detail::ELProxyInSpanConverter<CONT> > >;
328 template <
class CONT,
class PLINK_ALLOC>
346 using VElt_t = std::vector<SG::PackedLink<CONT>, PLINK_ALLOC>;
368 template <ElementLinkRange<CONT> RANGE>
375 template <
class VALLOC>
376 operator std::vector<Link_t, VALLOC>()
const;
388 template <
class VALLOC>
452 template <CxxUtils::detail::InputValIterator<ElementLink<CONT> > ITERATOR>
461 template <ElementLinkRange<CONT> RANGE>
469 template <ElementLinkRange<CONT> RANGE>
492 template <CxxUtils::detail::InputValIterator<ElementLink<CONT> > ITERATOR>
501 template <ElementLinkRange<CONT> RANGE>
521 template <
class CONT,
class PLINK_ALLOC>
564 #endif // not ATHCONTAINERS_ELPROXY_H
PackedLinkConverter< CONT > m_cnv
The contained converter.
span(T *ptr, std::size_t sz) -> span< T >
A couple needed deduction guides.
ELProxyConverter(const Base &cnv)
Constructor.
void insert(iterator pos, ITERATOR first, ITERATOR last)
Insert a range of links into this vector of links.
Base class for ELProxyT, with the converter held by reference.
ElementLink< CONT > Link_t
The ElementLink class we resolve to.
ELProxyConverter(AuxVectorData &container, SG::auxid_t auxid, SG::auxid_t linked_auxid)
Constructor.
bool operator==(const Link_t &l) const
Equality comparison with ElementLink.
Factory object that creates vectors using AuxTypeVector, specialized for PackedLink.
std::vector< SG::PackedLink< CONT >, PLINK_ALLOC > VElt_t
The vector of @PackedLink that we proxy.
Extend PackedLinkConverter with a (non-const) conversion from PackedLink to a proxy object.
auxid_t m_linkedAuxid
The ID of the linked DataLinks.
xAOD::TruthMetaDataContainer Cont_t
Helper: Convert a PackedLink to an ElementLink and vice-versa.
ELProxyInSpanConverter< CONT > m_cnv
The converter to use for the span.
void assign(ITERATOR first, ITERATOR last)
Set this vector of links to a range of links.
void resize(size_t n, const Link_t &l=Link_t())
Resize this vector of links.
ELProxyT(PLink_t &pl, PackedLinkConverter< Cont_t > &cnv)
Constructor.
void append_range(const RANGE &range)
Append a range of links to the end of this vector of links.
CONT Cont_t
The Storable object referred to by links.
PLink_t & m_pl
The proxied PackedLink.
ELProxyT & operator=(const ELProxyT &)=delete
void assign_range(const RANGE &range)
Set this vector of links to a range of links.
Conversions between PackedLink and ElementLink.
void clear()
Clear this vector of links.
void insert(iterator pos, size_t n, const Link_t &l)
Insert copies of a new link into this vector of links.
size_t auxid_t
Identifier for a particular aux data item.
ELSpanConverter(AuxVectorData &container, auxid_t auxid, auxid_t linked_auxid)
typename value_type::VElt_t VElt_t
ELProxyValBase(PackedLinkConverter< CONT > &cnv)
Constructor.
ELProxyT(PLink_t &pl, AuxVectorData &container, SG::auxid_t auxid, SG::auxid_t linked_auxid)
Constructor.
Converter from a vector of PackedLink to a range of ElementLink proxies.
void assign(size_t n, const Link_t &l)
Set this vector of links to copies of a new link.
ELProxyT(const ELProxyT &)=delete
Don't allow these proxy objects to be copied.
Allow customizing how aux data types are treated.
value_type operator()(VElt_t &velt) const
Convert from a PackedLink vector to a proxy for the span.
typename BASE::Cont_t Cont_t
Get the Storable from the base class.
Proxy for a span of ElementLinks.
SG::PackedLink< CONT > PLink_t
The PackedLink class we proxy.
Allow customizing how aux data types are treated.
void insert(iterator pos, const Link_t &l)
Insert a new link into this vector of links.
detail::PackedLink_span< CONT, PLINK_ALLOC > PackedLink_span
A span over PackedLink.
ElementLink< Cont_t > Link_t
The ElementLink class we provide.
Manage lookup of vectors of auxiliary data.
void push_back(const Link_t &l)
Add a new link to this vector of links.
ElementLink implementation for ROOT usage.
PROXY operator()(PLink_t &pl)
Produce a proxy object for a given PackedLink.
PackedLinkConverter< CONT > & m_cnv
Converter reference.
SG::PackedLink< Cont_t > PLink_t
The PackedLink class we proxy.
AuxVectorData & m_container
Container holding the variables.
void erase(iterator pos)
Erase one element from this vector of links.
void erase(iterator first, iterator last)
Erase a range of elements from this vector of links.
Base class for ELProxyT, with the converter held by value.
bool operator==(const std::vector< Link_t, VALLOC > &v) const
Equality testing.
std::ranges::iterator_t< Base > iterator
Iterator type for this range.
ELSpanProxy(VElt_t &velt, AuxVectorData &container, SG::auxid_t auxid, SG::auxid_t linked_auxid)
Constructor.
Add at() methods to a range class.
Add at() methods to a range class.
CONT Cont_t
The Storable object referred to by links.
auxid_t m_auxid
The ID of the PackedLink variable.
std::vector< Link_t > asVector() const
Convert to a vector of ElementLink.
void operator=(const RANGE &r)
Assign from a range of ElementLink.
ELProxyValBase(AuxVectorData &container, SG::auxid_t auxid, SG::auxid_t linked_auxid)
Constructor.
void pop_back()
Remove the last element in this vector of links.
void insert_range(iterator pos, const RANGE &range)
Insert a range of links into this vector of links.
Manage lookup of vectors of auxiliary data.
typename AuxDataTraits< PackedLink< CONT >, PLINK_ALLOC >::span PackedLink_span
A span over PackedLink.
typename PROXY::Link_t Link_t
Define macros for attributes used to control the static checker.
ELProxyRefBase(PackedLinkConverter< CONT > &cnv)
Constructor.
typename PROXY::PLink_t PLink_t
VElt_t & m_velt
The vector of PackedLink that we proxy.