|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #ifndef ATHLINKS_ELEMENTLINK_H
16 #define ATHLINKS_ELEMENTLINK_H
20 #include "AthLinks/DataLink.h"
120 template <
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);
710 template <
typename STORABLE>
720 template <
typename STORABLE>
730 template <
typename STORABLE>
740 template <
typename STORABLE>
833 template <
typename CONT,
typename T2>
847 template <
class U,
class V>
856 pair (
const CONT& child_container,
864 pair (
const CONT& child_container,
882 #include "AthLinks/ElementLink.icc"
885 #endif // not ATHLINKS_ELEMENTLINK_H
ElementType cachedElement() const
Return the cached element, if any.
std::string replace(std::string s, const std::string &s2, const std::string &s3)
IndexingPolicy::ElementConstReference ElementConstReference
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.
char data[hepevt_bytes_allocation_ATLAS]
ElementLink(const DataLink< STORABLE > &dlink, index_type index)
Construct a link from a DataLink and an index.
ElementLink(sgkey_t key, index_type elemID, ElementType pEl, const EventContext &ctx)
Construct from a hashed storable key, index, AND pointer to element.
Base::sgkey_t sgkey_t
Type of hashed keys.
ElementLink(const ElementLink &)=default
const DataLink< STORABLE > getDataLink() const
Return a link to the currently-referenced container object.
ElementLink(const ElementType &element, BaseConstReference data, IProxyDict *sg=0)
Construct from an element and reference to the container.
ElementLink(sgkey_t key, index_type elemID, ElementType pEl, IProxyDict *sg=0)
Construct from a hashed storable key, index, AND pointer to element.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
ElementLink(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Construct a link from an index and reference to the container.
ElementConstReference operator*() const
Return a reference to the referenced element.
void * storableNonConst()
Return a (void) pointer to the currently-referenced container object.
BaseConstPointer getStorableObjectPointer() const
Return a pointer to the currently-referenced container object.
Determine dependent types for ElementLink classes.
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
ElementLink< CONT > first_type
SG::GenerateIndexingPolicy< CONT >::type::index_type external_index_type
Base::ID_type ID_type
Type of string keys.
sgkey_t key() const
Get the key that we reference, as a hash.
IndexingPolicy::ElementConstPointer ElementConstPointer
const STORABLE * BaseConstPointer
const_pointer getDataPtr() const
Return a pointer to the currently-referenced container object.
pair(const CONT &child_container, const external_index_type &index, const T2 &y)
Traits::Base Base
Base class (factoring out code that doesn't directly depend on STORABLE).
bool toIndexedElement(BaseConstReference data, index_type elemID, const EventContext &ctx)
Set the link to an element given by index and pointer to container.
void resetWithKeyAndIndex(sgkey_t key, index_type elemID, const EventContext &ctx)
Set the link to an element given by string key and index.
bool toContainedElement(BaseConstReference data, ElementType element, const EventContext &ctx)
Set from element pointer and a reference to the container (storable)
bool isValid() const
Test to see if the link can be dereferenced.
const ID_type & dataID() const
Get the key that we reference, as a string.
SG::DataProxyHolder::ID_type ID_type
Type of string keys.
Generic base class for ElementLinks.
pair(const CONT &child_container, const external_index_type &index, IProxyDict *sg, const T2 &y)
const STORABLE & BaseConstReference
SG::ElementLinkTraits< STORABLE > Traits
Traits class, from which to derive types.
ElementLink(BaseConstReference data, index_type elemID, const EventContext &ctx)
Construct a link from an index and reference to the container.
ElementLink(const ElementLink< U > &other)
Constructor allowing a derived -> base conversion.
bool operator>(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Ordering relation for ElementLink (greater-than)
ElementLinkTraits1< STORABLE >::IndexingPolicy IndexingPolicy
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
DataLink< STORABLE > getDataLink()
Return a link to the currently-referenced container object.
ElementLinkTraits class to specialize.
ElementConstPointer operator->() const
Return a pointer to the referenced element.
INDEXING_POLICY::index_type index_type
The index type presented to and returned from the link.
SG::DataProxyHolder::sgkey_t sgkey_t
Type of hashed keys.
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, const EventContext &ctx)
Set the link to an element given by string key and index.
Object reference supporting deferred reading from StoreGate.
bool operator<(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Ordering relation for ElementLink (less-than)
ElementLink & operator=(const ElementLink &)=default
STORABLE value_type
Type of container (storable) and derived types.
ElementLink(const ID_type &dataID, index_type elemID, ElementType pEl, IProxyDict *sg=0)
Construct from a string storable key, index, AND pointer to element.
uint32_t CLID
The Class ID type.
Traits::IndexingPolicy IndexingPolicy
The indexing policy.
ElementLink implementation for ROOT usage.
bool operator==(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Equality relation for ElementLink.
IndexingPolicy::ElementType ElementType
Container element and derived types.
bool setElement(ElementType element)
Set to point to an element.
pointer getDataNonConstPtr()
Return a pointer to the currently-referenced container object.
bool setStorableObject(BaseConstReference data, bool replace=false, IProxyDict *sg=0)
Set link to point to a new container (storable).
INDEXING_POLICY::ElementConstPointer ElementConstPointer
ElementLink()
Default constructor.
BaseConstReference getStorableObjectRef() const
Return a reference to the currently-referenced container object.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
ElementConstPointer cptr() const
Return a pointer to the referenced element.
bool operator!() const
Test to see if the link can not be dereferenced.
ElementLink(const ElementLink &other, index_type elemID)
Construct a link from another link, changing the index.
bool setStorableObject(BaseConstReference data, bool replace, const EventContext &ctx)
Set link to point to a new container (storable).
pair(const first_type &x, const second_type &y)
const void * storable() const
Return a (void) pointer to the currently-referenced container object.
ElementLink(const ElementType &element, BaseConstReference data, const EventContext &ctx)
Construct from an element and reference to the container.
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
The index type presented to and returned from the link.
const STORABLE * const_pointer
pair(const pair< U, V > &p)
ElementLink(sgkey_t key, index_type elemID, const EventContext &ctx)
Construct a link from a hashed 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.
bool operator!=(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Inequality relation for ElementLink.
ElementLink(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Construct a link from a string storable key and an index.
Base::castfn_t castfn_t
Function casting from a SG::DataProxy to a pointer.
INDEXING_POLICY::ElementType ElementType
Generic pointer to an element.
void * castfn_t(SG::DataProxy *)
Function casting from a SG::DataProxy to a pointer.
static const CLID & classID()
Return the CLID for the class that we reference.
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.