ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
SG::detail::ELProxyT< BASE > Class Template Reference

Proxy for ElementLink. More...

#include <ELProxy.h>

Inheritance diagram for SG::detail::ELProxyT< BASE >:
Collaboration diagram for SG::detail::ELProxyT< BASE >:

Public Types

using Cont_t = typename BASE::Cont_t
 Get the Storable from the base class. More...
 
using Link_t = ElementLink< Cont_t >
 The ElementLink class we provide. More...
 
using PLink_t = SG::PackedLink< Cont_t >
 The PackedLink class we proxy. More...
 

Public Member Functions

 ELProxyT (const ELProxyT &)=delete
 Don't allow these proxy objects to be copied. More...
 
ELProxyToperator= (const ELProxyT &)=delete
 
 ELProxyT (PLink_t &pl, PackedLinkConverter< Cont_t > &cnv)
 Constructor. More...
 
 ELProxyT (PLink_t &pl, AuxVectorData &container, SG::auxid_t auxid, SG::auxid_t linked_auxid)
 Constructor. More...
 
 operator const Link_t () const
 Convert the held PackedLink to an ElementLink. More...
 
const Link_t operator= (const Link_t &link)
 Update the held PackedLink from an ElementLink. More...
 
bool operator== (const Link_t &l) const
 Equality comparison with ElementLink. More...
 
bool operator== (const ELProxyT &p) const
 Equality comparison with another proxy. More...
 

Private Attributes

PLink_tm_pl
 The proxied PackedLink. More...
 

Detailed Description

template<class BASE>
class SG::detail::ELProxyT< BASE >

Proxy for ElementLink.

We want to be able to do things like:

That means that the Accessor cannot return an ElementLink directly. Rather, it needs to return a proxy object. This proxy should both be convertible to an ElementLink and be able to be assigned from an ElementLnk. In the latter case, it should then update the underlying PackedLink value.

This object can be used as such a proxy. It holds a reference to the PackedLink and also (via the base class) an appropriate converter. It handles conversions to ElementLink and assignment from ElementLink. It also proxies all the const methods of ElementLink.

Now, in the case where we have an proxy by itself, we want the proxy to hold a converter by value. But if the proxy is part of a span, then we want it to have just a reference to the converter, with the converter itself being stored in the span (that would be in the ELSpanProxy object below). That's not just to save space — the converter holds a span over the DataLinks, and if that changes, we want it visible by all members of the proxy span. So how we hold the converter is factored out into the BASE class, which will be one of the two classes above.

Definition at line 124 of file ELProxy.h.

Member Typedef Documentation

◆ Cont_t

template<class BASE >
using SG::detail::ELProxyT< BASE >::Cont_t = typename BASE::Cont_t

Get the Storable from the base class.

Definition at line 129 of file ELProxy.h.

◆ Link_t

template<class BASE >
using SG::detail::ELProxyT< BASE >::Link_t = ElementLink<Cont_t>

The ElementLink class we provide.

Definition at line 132 of file ELProxy.h.

◆ PLink_t

template<class BASE >
using SG::detail::ELProxyT< BASE >::PLink_t = SG::PackedLink<Cont_t>

The PackedLink class we proxy.

Definition at line 135 of file ELProxy.h.

Constructor & Destructor Documentation

◆ ELProxyT() [1/3]

template<class BASE >
SG::detail::ELProxyT< BASE >::ELProxyT ( const ELProxyT< BASE > &  )
delete

Don't allow these proxy objects to be copied.

◆ ELProxyT() [2/3]

template<class BASE >
SG::detail::ELProxyT< BASE >::ELProxyT ( PLink_t pl,
PackedLinkConverter< Cont_t > &  cnv 
)

Constructor.

Parameters
plPackedLink object to proxy.
cnvConverter to use.

◆ ELProxyT() [3/3]

template<class BASE >
SG::detail::ELProxyT< BASE >::ELProxyT ( PLink_t pl,
AuxVectorData container,
SG::auxid_t  auxid,
SG::auxid_t  linked_auxid 
)

Constructor.

Parameters
containerContainer holding the variables.
auxidThe ID of the PackedLink variable.
linked_auxidThe ID of the linked DataLinks.

This constructor can only be used if the converter is being held by value.

Member Function Documentation

◆ operator const Link_t()

template<class BASE >
SG::detail::ELProxyT< BASE >::operator const Link_t ( ) const

Convert the held PackedLink to an ElementLink.

◆ operator=() [1/2]

template<class BASE >
ELProxyT& SG::detail::ELProxyT< BASE >::operator= ( const ELProxyT< BASE > &  )
delete

◆ operator=() [2/2]

template<class BASE >
const Link_t SG::detail::ELProxyT< BASE >::operator= ( const Link_t link)

Update the held PackedLink from an ElementLink.

Parameters
linkThe ElementLink from which to update.

◆ operator==() [1/2]

template<class BASE >
bool SG::detail::ELProxyT< BASE >::operator== ( const ELProxyT< BASE > &  p) const

Equality comparison with another proxy.

Parameters
lThe proxy with which to compare.

(Default conversions don't suffice to make this work.)

◆ operator==() [2/2]

template<class BASE >
bool SG::detail::ELProxyT< BASE >::operator== ( const Link_t l) const

Equality comparison with ElementLink.

Parameters
lThe link with which to compare.

(Default conversions don't suffice to make this work.)

Member Data Documentation

◆ m_pl

template<class BASE >
PLink_t& SG::detail::ELProxyT< BASE >::m_pl
private

The proxied PackedLink.

Definition at line 232 of file ELProxy.h.


The documentation for this class was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16