|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHLINKS_ELEMENTLINK_H
6 #define ATHLINKS_ELEMENTLINK_H
15 #include "AthLinks/ElementLinkBase.h"
16 #include "AthLinks/tools/selection_ns.h"
21 template<
typename STORABLE >
40 template<
typename STORABLE >
209 ROOT_SELECTION_NS::ElementLink< STORABLE >::self
DictSel;
213 template <
typename STORABLE>
217 template <
typename STORABLE>
226 template<
typename STORABLE >
236 ROOT_SELECTION_NS::MemberAttributes< kTransient >
m_element;
238 ROOT_SELECTION_NS::MemberAttributes< kTransient >
m_event;
248 #endif // ATHLINKS_ELEMENTLINK_H
Base interface for getting objects out of the input file.
ElementType cachedElement() const
Access the currently cached element. Doesn't trigger lookup.
std::string replace(std::string s, const std::string &s2, const std::string &s3)
IndexingPolicy::ElementConstReference ElementConstReference
char data[hepevt_bytes_allocation_ATLAS]
TypeTools::Copy< value_type >::type ElementType
Type of the elements in the container.
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.
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_container
Mark all transient members:
bool m_elementCached
Status of the cached pointer.
ElementLink & operator=(const ElementLink &rhs)
Assignment operator.
ElementType m_element
Cached pointer to the object.
bool toContainedElement(BaseConstReference container, ElementType element)
Set link to point to given element (slowest)
size_t index_type
Type of the index used on the container.
ElementConstReference operator*() const
Get a reference to the object in question.
BaseConstPointer getStorableObjectPointer() const
Retrieve storable object pointer.
void findIdentifier()
Find the identifier of the object being pointed to.
void findIndex()
Find the index of an element inside the container.
STORABLE::value_type value_type
Type of the values inside the container.
sgkey_t key() const
Get the key that we reference, as a hash.
IndexingPolicy::ElementConstPointer ElementConstPointer
const STORABLE * BaseConstPointer
Constant pointer to the container.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
bool operator!=(const ElementLink &rhs) const
Comparison operator.
bool setStorableObject(BaseConstReference data, bool replace=false)
Set link storable to data object pointed by data (slower)
BaseConstPointer m_container
Cached pointer to the container.
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_elementCached
ElementLink(sgkey_t id, index_type index, xAOD::TVirtualEvent *event=0)
Construct object from storable id and element index (fastest)
bool isValid() const
Check if the element can be found.
const ID_type & dataID() const
Get the key that we reference, as a string.
TypeTools::Copy< value_type >::const_reference ElementConstReference
Constant reference to an element in the container.
STORABLE::const_iterator const_iterator
Constant iterator type for the container.
std::string ID_type
Type of the "regular" identifiers in the event.
SG::DataProxyHolder::ID_type ID_type
Type of string keys.
Base class for ElementLinks to vectors of pointers.
const STORABLE & BaseConstReference
Constant reference to the container.
ROOT_SELECTION_NS::ElementLink< STORABLE >::self DictSel
Needed to take the Reflex/Cling specifications into account.
uint32_t sgkey_t
Integer identifier for the object in the event.
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_element
void resetWithKeyAndIndex(const ID_type &key, index_type index, xAOD::TVirtualEvent *event=0)
Reset with storable key and element index (fast)
ElementConstPointer operator->() const
Access the object as a smart pointer.
POOL::TEvent event(POOL::TEvent::kClassAccess)
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.
bool toIndexedElement(BaseConstReference container, index_type index)
Set link to point to given index (slower)
xAOD::TVirtualEvent * m_event
Pointer to the event object.
void resetWithKeyAndIndex(sgkey_t id, index_type index, xAOD::TVirtualEvent *event=0)
Reset with storable id and element index (fastest)
ElementLink(BaseConstReference container, index_type index, xAOD::TVirtualEvent *event=0)
Construct from a container reference and element index (slower)
ElementLink(const ID_type &key, index_type index, xAOD::TVirtualEvent *event=0)
Construct object from storable key and element index (fast)
ElementLink(xAOD::TVirtualEvent *event)
Constructor setting up the link with a specific event object.
TypeTools::Copy< value_type >::const_pointer ElementConstPointer
Constant pointer to an element in the container.
ElementLink implementation for ROOT usage.
bool setElement(ElementType element)
Set link to point to an Element (slowest)
bool operator==(const ElementLink &rhs) const
Comparison operator.
INDEXING_POLICY::ElementConstPointer ElementConstPointer
ElementLink()
Default constructor.
virtual bool toTransient()
Reset the object's internal cache.
BaseConstReference getStorableObjectRef() const
Retrieve storable object reference.
void reset()
Reset to default state.
ElementConstPointer cptr() const
Return a pointer to the referenced element.
ElementLink(const ElementLink &parent)
Copy-constructor.
bool operator!() const
Operator checking the validity of the link.
ElementLink(ElementType element, BaseConstReference container, xAOD::TVirtualEvent *event=0)
Construct from a container reference and element pointer (slowest)
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_event
index_type index() const
Get the index of the element inside of its container.
xAOD::TVirtualEvent * source() const
Get the data source for the reference.
bool toPersistent()
Dummy function provinding the offline interface.
bool operator>(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
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 operator<(const ElementLink< STORABLE > &lhs, const ElementLink< STORABLE > &rhs)
INDEXING_POLICY::ElementType ElementType
Generic pointer to an element.
bool hasCachedElement() const
Check if the link has a cached element pointer.