|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #ifndef ATHLINKS_GENERICELEMENTLINKBASE_H
16 #define ATHLINKS_GENERICELEMENTLINKBASE_H
20 #include "AthLinks/tools/selection_ns.h"
21 #include "AthLinks/DataLinkBase.h"
31 template<
class INDEXING_POLICY >
32 struct GenericElementLinkBase;
37 template <
class POLICY>
75 template <
class INDEXING_POLICY>
76 class GenericElementLinkBase
343 template <
class OTHER_INDEXING_POLICY,
class FROM_TRAITS,
class TO_TRAITS>
345 FROM_TRAITS*, TO_TRAITS*);
502 template <
class INDEX>
504 std::convertible_to<size_t, INDEX>)
523 std::convertible_to<
size_t, INDEX>))
559 template <
class INDEXING_POLICY>
574 #endif // not ATHLINKS_GENERICELEMENTLINKBASE_H
GenericElementLinkBase(sgkey_t key, CLID link_clid, const index_type &elemID, const ElementType &elt, IProxyDict *sg)
Construct a link from a hashed key, index, AND pointer to element.
bool thin(const SG::ThinningCache *thinningCache)
Adjust for thinning.
std::string replace(std::string s, const std::string &s2, const std::string &s3)
char data[hepevt_bytes_allocation_ATLAS]
sgkey_t key() const
Return the SG key that we reference, as a hash.
ROOT_SELECTION_NS::TRANSIENT m_proxy
GenericElementLinkBase & operator=(const GenericElementLinkBase &)=default
const SG::DataProxy * proxy() const
Return the SG proxy for the container holding this element.
const SG::ThinningCache * thinningCache
GenericElementLinkBase()
Default constructor.
void resetWithKeyAndIndex(sgkey_t key, CLID link_clid, const index_type &elemID, IProxyDict *sg)
Set the link to an element given by string key and index.
GenericElementLinkBase(const DataLinkBase &dlink, const index_type &index)
Construct a link from a DataLink and an index.
const stored_index_type & storedIndex() const
Return the stored representation of the link index.
IProxyDict * source() const
Return the data source for this reference.
bool toTransient(IProxyDict *sg=0)
Finish initialization after link has been read.
Manage DataProxy reference in ElementLink/DataLink.
const SG::DataProxyHolder & proxyHolder() const
Return the internal proxy holder object.
void * storableBase(castfn_t *castfn, const CLID &clid, bool isConst) const
Return a pointer to the currently-referenced container object.
void setIndex(const index_type &index)
Set the index part of the link.
bool hasCachedElement() const
Test to see if this link has a cached element pointer.
bool const RAWDATA *ch2 const
index_type index() const
Return the index of the link.
SG::DataProxyHolder m_proxy
SG proxy for this link.
GenericElementLinkBase(const_pointer_t obj, CLID link_clid, const index_type &elemID, IProxyDict *sg)
Construct a link from an index and pointer to the container.
bool isDefaultIndex() const
Test the index validity.
SG::DataProxyHolder::ID_type ID_type
Type of string keys.
Generic base class for ElementLinks.
bool thin()
Adjust for thinning.
SG::DataProxyHolder::const_pointer_t const_pointer_t
Generic pointer to the container (storable).
GenericElementLinkBase(const GenericElementLinkBase &)=default
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.
Manage DataProxy reference in ElementLink/DataLink.
void setCachedElement(const ElementType &elt) const
Set the cached element stored in the link.
GenericElementLinkBase(const ID_type &dataID, CLID link_clid, const index_type &elemID, const ElementType &elt, IProxyDict *sg)
Construct a link from a string key, index, AND pointer to element.
GenericElementLinkBase(const ID_type &dataID, CLID link_clid, const index_type &elemID, IProxyDict *sg)
Construct a link from a string key and an index.
Helpers to retrieve the current thinning cache from the event context.
stored_index_type m_index
The index of the element within the container for this link.
void storeCachedElement(const ElementType &elt)
Set the cached element stored in the link.
uint32_t CLID
The Class ID type.
INDEXING_POLICY::stored_index_type stored_index_type
The type of the index as it is stored internally.
Cached value with atomic update.
INDEXING_POLICY::ElementConstPointer ElementConstPointer
bool toPersistent()
Prepare this link for writing.
CxxUtils::CachedValue< ElementType > m_element
Transient.
bool isDefault() const
Test to see if this link is in the default state.
bool getCachedElement(ElementConstPointer &elt) const
Retrieve the cached element from the link.
GenericElementLinkBase(const GenericElementLinkBase< OTHER_INDEXING_POLICY > &other, FROM_TRAITS *, TO_TRAITS *)
Constructor from a link referencing a different type.
bool setStorableObject(const_pointer_t data, CLID link_clid, bool replace, IProxyDict *sg)
Set the container referenced by the link to data.
const ID_type & dataID() const
Return the SG key that we reference, as a string.
SG::sgkey_t m_key
The hashed key for this link.
GenericElementLinkBase(const GenericElementLinkBase &other, const index_type &elemID)
Construct a link from another link, changing the index.
const void * const_pointer_t
ROOT_SELECTION_NS::TRANSIENT m_element
GenericElementLinkBase(sgkey_t key, CLID link_clid, const index_type &elemID, IProxyDict *sg)
Construct a link from a hashed key and an index.
IStringPool::sgkey_t sgkey_t
Type of hashed keys.
void resetWithKeyAndIndex(const ID_type &dataID, CLID link_clid, const index_type &elemID, IProxyDict *sg)
Set the link to an element given by string key and index.
void reset()
Reset the link to a null state.
Define macros for attributes used to control the static checker.
requires(std::convertible_to< INDEX, size_t > &&std::convertible_to< size_t, INDEX >) bool thin1(INDEX &persIndex
Adjust for thinning.
ROOT_SELECTION_NS::TRANSIENT m_cacheValid
setBGCode setTAP setLVL2ErrorBits bool
Cache thinning decisions for converters.
INDEXING_POLICY::ElementType ElementType
Generic pointer to an element.
bool toIndexedElement(const_pointer_t obj, CLID link_clid, const index_type &elemID, IProxyDict *sg)
Set the to an element given by index and pointer to container.
void * castfn_t(SG::DataProxy *)
Function casting from a SG::DataProxy to a pointer.
Type-independent part of DataLink; holds the persistent state.
std::string ID_type
Type of string keys.
ROOT_SELECTION_NS::SG::GenericElementLinkBase< INDEXING_POLICY >::self DictSel
Transient.