5#ifndef ATHLINKS_ELEMENTLINK_H
6#define ATHLINKS_ELEMENTLINK_H
13#include <RootMetaSelection.h>
16#include "AthLinks/ElementLinkBase.h"
21 template<
typename STORABLE >
38template<
typename STORABLE >
211template <
typename STORABLE>
215template <
typename STORABLE>
223namespace ROOT {
namespace Meta {
namespace Selection {
224template<
typename STORABLE >
233 ROOT::Meta::Selection::MemberAttributes< kTransient >
m_container;
234 ROOT::Meta::Selection::MemberAttributes< kTransient >
m_element;
236 ROOT::Meta::Selection::MemberAttributes< kTransient >
m_event;
bool operator<(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
bool operator>(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
char data[hepevt_bytes_allocation_ATLAS]
Base class for ElementLinks to vectors of pointers.
stored_index_type persIndex() const
Return the index of the link.
sgkey_t persKey() const
Return the SG key that we reference, as a hash.
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.
ROOT::Meta::Selection::ElementLink< cont_type >::self DictSel
virtual bool toTransient()
Reset the object's internal cache.
IndexingPolicy::ElementConstPointer ElementConstPointer
ElementLink(xAOD::TVirtualEvent *event)
Constructor setting up the link with a specific event object.
ElementLink(const ID_type &key, index_type index, ElementType element, xAOD::TVirtualEvent *event=0)
Construct from a storable key and element index, taking the element object from the user.
ElementLink(const ElementLink &parent)
Copy-constructor.
IndexingPolicy::ElementType ElementType
IndexingPolicy::ElementConstReference ElementConstReference
BaseConstPointer m_container
ElementConstPointer operator->() const
Access the object as a smart pointer.
const cont_type * BaseConstPointer
BaseConstPointer getStorableObjectPointer() const
Retrieve storable object pointer.
bool toContainedElement(BaseConstReference container, ElementType element)
Set link to point to given element (slowest)
IndexingPolicy::index_type index_type
bool toPersistent()
Dummy function provinding the offline interface.
ElementConstPointer cptr() const
Return a pointer to the referenced element.
void resetWithKeyAndIndex(sgkey_t id, index_type index, xAOD::TVirtualEvent *event=0)
Reset with storable id and element index (fastest)
index_type index() const
Get the index of the element inside of its container.
ElementConstReference operator*() const
Get a reference to the object in question.
ElementLink(sgkey_t id, index_type index, xAOD::TVirtualEvent *event=0)
Construct object from storable id and element index (fastest)
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.
bool operator!=(const ElementLink &rhs) const
Comparison operator.
void resetWithKeyAndIndex(const ID_type &key, index_type index, xAOD::TVirtualEvent *event=0)
Reset with storable key and element index (fast)
ElementLink(sgkey_t id, index_type index, ElementType element, xAOD::TVirtualEvent *event=0)
Construct from a storable id and element index, taking the element object from the user.
bool isValid() const
Check if the element can be found.
ElementLink & operator=(const ElementLink &rhs)
Assignment operator.
xAOD::TVirtualEvent * source() const
Get the data source for the reference.
const cont_type & BaseConstReference
ElementLink(const ID_type &key, index_type index, xAOD::TVirtualEvent *event=0)
Construct object from storable key and element index (fast)
xAOD::TVirtualEvent * m_event
bool operator==(const ElementLink &rhs) const
Comparison operator.
bool hasCachedElement() const
Check if the link has a cached element pointer.
ElementLink(ElementType element, BaseConstReference container, xAOD::TVirtualEvent *event=0)
Construct from a container reference and element pointer (slowest)
ElementLink()
Default constructor.
void findIdentifier()
Find the identifier of the object being pointed to.
ElementLink(BaseConstReference container, index_type index, xAOD::TVirtualEvent *event=0)
Construct from a container reference and element index (slower)
bool setStorableObject(BaseConstReference data, bool replace=false)
Set link storable to data object pointed by data (slower)
cont_type::const_iterator const_iterator
void reset()
Reset to default state.
void findIndex()
Find the index of an element inside the container.
ElementType cachedElement() const
Access the currently cached element. Doesn't trigger lookup.
Base interface for getting objects out of the input file.
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Selection rules: declare transient members.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.