15#ifndef ATHLINKS_ELEMENTLINK_H
16#define ATHLINKS_ELEMENTLINK_H
20#include "AthLinks/DataLink.h"
120template <
class STORABLE>
198 const EventContext& ctx);
250 const EventContext& ctx);
282 const EventContext& ctx);
306 const EventContext& ctx);
346 const EventContext& ctx);
515 const EventContext& ctx);
553 const EventContext& ctx);
605 const EventContext& ctx);
629 const EventContext& ctx);
653 const EventContext& ctx);
710template <
typename STORABLE>
720template <
typename STORABLE>
730template <
typename STORABLE>
740template <
typename STORABLE>
832template <
typename CONT,
typename T2>
846 template <
class U,
class V>
855 pair (
const CONT& child_container,
863 pair (
const CONT& child_container,
881#include "AthLinks/ElementLink.icc"
bool operator<(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Ordering relation for ElementLink (less-than)
bool operator>(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Ordering relation for ElementLink (greater-than)
bool operator!=(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Inequality relation for ElementLink.
bool operator==(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Equality relation for ElementLink.
Determine dependent types for ElementLink classes.
uint32_t CLID
The Class ID type.
char data[hepevt_bytes_allocation_ATLAS]
Object reference supporting deferred reading from StoreGate.
ElementLink implementation for ROOT usage.
BaseConstReference getStorableObjectRef() const
Return a reference to the currently-referenced container object.
bool toIndexedElement(BaseConstReference data, index_type elemID, const EventContext &ctx)
Set the link to an element given by index and pointer to container.
bool setElement(ElementType element)
Set to point to an element.
const ID_type & dataID() const
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
ElementLink(const ElementLink< U > &other)
Constructor allowing a derived -> base conversion.
ElementLink(const DataLink< STORABLE > &dlink, index_type index)
Construct a link from a DataLink and an index.
IndexingPolicy::ElementConstPointer ElementConstPointer
ElementLink(sgkey_t key, index_type elemID, const EventContext &ctx)
Construct a link from a hashed storable key and an index.
const DataLink< STORABLE > getDataLink() const
Return a link to the currently-referenced container object.
IndexingPolicy::ElementType ElementType
IndexingPolicy::ElementConstReference ElementConstReference
ElementLink(sgkey_t key, index_type elemID, ElementType pEl, const EventContext &ctx)
Construct from a hashed storable key, index, AND pointer to element.
ElementConstPointer operator->() const
Return a pointer to the referenced element.
ElementLink(const ElementLink &other, index_type elemID)
Construct a link from another link, changing the index.
const cont_type * BaseConstPointer
BaseConstPointer getStorableObjectPointer() const
Return a pointer to the currently-referenced container object.
void resetWithKeyAndIndex(sgkey_t key, index_type elemID, const EventContext &ctx)
Set the link to an element given by string key and index.
static const CLID & classID()
Return the CLID for the class that we reference.
ElementLink(const ElementType &element, BaseConstReference data, const EventContext &ctx)
Construct from an element and reference to the container.
bool setStorableObject(BaseConstReference data, bool replace=false, IProxyDict *sg=0)
Set link to point to a new container (storable).
ElementLink & operator=(const ElementLink &)=default
ElementLink(const ID_type &dataID, index_type elemID, ElementType pEl, const EventContext &ctx)
Construct from a string storable key, index, AND pointer to element.
IndexingPolicy::index_type index_type
bool toContainedElement(BaseConstReference data, ElementType element, const EventContext &ctx)
Set from element pointer and a reference to the container (storable)
ElementLink(const ElementType &element, BaseConstReference data, IProxyDict *sg=0)
Construct from an element and reference to the container.
const_pointer getDataPtr() const
Return a pointer to the currently-referenced container object.
ElementLink(const ID_type &dataID, index_type elemID, ElementType pEl, IProxyDict *sg=0)
Construct from a string storable key, index, AND pointer to element.
ElementConstPointer cptr() const
Return a pointer to the referenced element.
ElementLink(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Construct a link from a string storable key and an index.
ElementLink(const ID_type &dataID, index_type elemID, const EventContext &ctx)
Construct a link from a string storable key and an index.
ElementConstReference operator*() const
Return a reference to the referenced element.
bool operator!() const
Test to see if the link can not be dereferenced.
Traits::Base Base
Base class (factoring out code that doesn't directly depend on STORABLE).
bool isValid() const
Test to see if the link can be dereferenced.
const void * storable() const
Return a (void) pointer to the currently-referenced container object.
void * storableNonConst()
Return a (void) pointer to the currently-referenced container object.
const cont_type & BaseConstReference
DataLink< STORABLE > getDataLink()
Return a link to the currently-referenced container object.
SG::ElementLinkTraits< cont_type > Traits
ElementLink(BaseConstReference data, index_type elemID, const EventContext &ctx)
Construct a link from an index and reference to the container.
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, const EventContext &ctx)
Set the link to an element given by string key and index.
ElementLink(const ElementLink &)=default
pointer getDataNonConstPtr()
Return a pointer to the currently-referenced container object.
ElementLink()
Default constructor.
Traits::IndexingPolicy IndexingPolicy
const cont_type * const_pointer
ElementLink(sgkey_t key, index_type elemID, ElementType pEl, IProxyDict *sg=0)
Construct from a hashed storable key, index, AND pointer to element.
ElementLink(sgkey_t key, index_type elemID, IProxyDict *sg=0)
Construct a link from a hashed storable key and an index.
void resetWithKeyAndIndex(sgkey_t key, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
ElementLink(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Construct a link from an index and reference to the container.
bool setStorableObject(BaseConstReference data, bool replace, const EventContext &ctx)
Set link to point to a new container (storable).
ElementType cachedElement() const
Return the cached element, if any.
ElementLinkTraits class to specialize.
ElementLinkTraits1< STORABLE >::IndexingPolicy IndexingPolicy
ElementLinkTraits1< STORABLE >::Base Base
SG::DataProxyHolder::sgkey_t sgkey_t
void * castfn_t(SG::DataProxy *)
SG::DataProxyHolder::ID_type ID_type
std::string replace(std::string s, const std::string &s2, const std::string &s3)
bool checkForRemap(IProxyDict *sg, SG::sgkey_t sgkey_in, size_t index_in, SG::sgkey_t &sgkey_out, size_t &index_out)
See if an EL is being remapped.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)
pair(const pair< U, V > &p)
ElementLink< CONT > first_type
pair(const first_type &x, const second_type &y)
SG::GenerateIndexingPolicy< CONT >::type::index_type external_index_type
pair(const CONT &child_container, const external_index_type &index, const T2 &y)
pair(const CONT &child_container, const external_index_type &index, IProxyDict *sg, const T2 &y)