15#ifndef ATHLINKS_ELEMENTLINK_H
16#define ATHLINKS_ELEMENTLINK_H
20#include "AthLinks/DataLink.h"
120template <
class STORABLE>
126 typedef SG::ElementLinkTraits<STORABLE> Traits;
129 typedef typename Traits::Base Base;
132 typedef typename Base::castfn_t
castfn_t;
137 typedef typename Traits::IndexingPolicy IndexingPolicy;
140 typedef typename IndexingPolicy::index_type
index_type;
143 typedef typename Base::sgkey_t
sgkey_t;
146 typedef typename Base::ID_type
ID_type;
150 typedef STORABLE* pointer;
151 typedef const STORABLE* const_pointer;
157 typedef typename IndexingPolicy::ElementType
ElementType;
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).
DataLink< STORABLE > getDataLink()
Return a link to the currently-referenced container object.
bool operator>(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Ordering relation for ElementLink (greater-than).
const_pointer getDataPtr() const
Return a pointer to the currently-referenced container object.
bool operator!=(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Inequality relation for ElementLink.
void * storableNonConst()
Return a (void) pointer to the currently-referenced container object.
const void * storable() const
Return a (void) pointer to the currently-referenced container object.
bool operator==(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
Equality relation for ElementLink.
pointer getDataNonConstPtr()
Return a pointer to the currently-referenced container object.
Determine dependent types for ElementLink classes.
uint32_t CLID
The Class ID type.
char data[hepevt_bytes_allocation_ATLAS]
doing TRTHTH Hypo selection
Object reference supporting deferred reading from StoreGate.
void * castfn_t(SG::DataProxy *)
Function casting from a SG::DataProxy to a pointer.
ElementLink implementation for ROOT usage.
BaseConstReference getStorableObjectRef() const
Retrieve storable object reference.
bool setElement(ElementType element)
Set link to point to an Element (slowest).
const ID_type & dataID() const
Get the key that we reference, as a string.
ElementConstPointer operator->() const
Access the object as a smart pointer.
const STORABLE * BaseConstPointer
Constant pointer to the container.
BaseConstPointer getStorableObjectPointer() const
Retrieve storable object pointer.
STORABLE::value_type value_type
Type of the values inside the container.
bool toContainedElement(BaseConstReference container, ElementType element)
Set link to point to given element (slowest).
uint32_t sgkey_t
Integer identifier for the object in the event.
TypeTools::Copy< value_type >::const_pointer ElementConstPointer
Constant pointer to an element in the container.
ElementConstPointer cptr() const
Get a constant pointer to the referenced object.
ElementConstReference operator*() const
Get a reference to the object in question.
bool toIndexedElement(BaseConstReference container, index_type index)
Set link to point to given index (slower).
bool operator!() const
Operator checking the validity of the link.
TypeTools::Copy< value_type >::const_reference ElementConstReference
Constant reference to an element in the container.
std::string ID_type
Type of the "regular" identifiers in the event.
void resetWithKeyAndIndex(const ID_type &key, index_type index, xAOD::TVirtualEvent *event=0)
Reset with storable key and element index (fast).
bool isValid() const
Check if the element can be found.
sgkey_t key() const
Get the key that we reference, as a hash.
ElementLink & operator=(const ElementLink &rhs)
Assignment operator.
const STORABLE & BaseConstReference
Constant reference to the container.
size_t index_type
Type of the index used on the container.
ElementLink()
Default constructor.
TypeTools::Copy< value_type >::type ElementType
Type of the elements in the container.
bool setStorableObject(BaseConstReference data, bool replace=false)
Set link storable to data object pointed by data (slower).
ElementType cachedElement() const
Access the currently cached element. Doesn't trigger lookup.
ElementLinkTraits class to specialize.
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)