14#ifndef ATHLINKS_DATALINK_H
15#define ATHLINKS_DATALINK_H
18#include "AthLinks/DataLinkBase.h"
90template <
class STORABLE>
443#include "AthLinks/DataLink.icc"
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
uint32_t CLID
The Class ID type.
char data[hepevt_bytes_allocation_ATLAS]
SG::DataProxyHolder::sgkey_t sgkey_t
Type of hashed keys.
DataLinkBase()
Default constructor.
SG::DataProxyHolder::ID_type ID_type
Type of string keys.
const_pointer operator->() const
Dereference the link.
DataLink(const_reference data, const EventContext &ctx)
Constructor — link to a STORABLE using a transient ref to it.
const ID_type & dataID() const
bool toTransient(const ID_type &dataID, const EventContext &ctx)
Finish initialization like the link as just been read from root, but with a specified key.
void toStorableObject(const_reference data, IProxyDict *sg=0)
Set the link to an object given by a reference.
DataLink(sgkey_t key, const SG::DataProxyHolder &holder)
Constructor from a hashed key and a proxy holder object.
DataLinkBase::ID_type ID_type
const_reference operator*() const
Dereference the link.
void toIdentifiedObject(const ID_type &dataID, const EventContext &ctx)
Set the link to an object given by a string key.
DataLink(sgkey_t key, IProxyDict *sg=0)
Constructor — link to a STORABLE using a hashed ID.
pointer getDataNonConstPtr()
Return a pointer to the currently-referenced object.
DataLinkBase::sgkey_t sgkey_t
const_pointer getDataPtr() const
Return a pointer to the currently-referenced object.
const CONT * const_pointer
DataLink(const_pointer pdata, IProxyDict *sg=0)
Constructor — link to a STORABLE using a transient pointer to it.
static const CLID & classID()
Return the CLID for the class that we reference.
void toIdentifiedObject(sgkey_t key, const EventContext &ctx)
Set the link to an object given by a hashed key.
bool toTransient(const EventContext &ctx)
Finish initialization after link has been read.
DataLink(const_pointer pdata, const EventContext &ctx)
Constructor — link to a STORABLE using a transient pointer to it.
DataLink(const ID_type &dataID, const EventContext &ctx)
Constructor — link to a STORABLE using a string ID.
bool operator!() const
True if the link is not dereferencable.
void * storableNonConst()
Return a (void) pointer to the currently-referenced object.
bool toTransient(const ID_type &dataID, IProxyDict *sg=0)
Finish initialization like the link as just been read from root, but with a specified key.
DataLink(sgkey_t key, const EventContext &ctx)
Constructor — link to a STORABLE using a hashed ID.
void toIdentifiedObject(sgkey_t key, IProxyDict *sg=0)
Set the link to an object given by a hashed key.
DataLink()
Default constructor — gives the equivalent of a NULL pointer.
void toStorableObject(const_reference data, const EventContext &ctx)
Set the link to an object given by a reference.
void toIdentifiedObject(const ID_type &dataID, IProxyDict *sg=0)
Set the link to an object given by a string key.
void toDefaultObject(IProxyDict *sg=0)
Set the link to the default object of this type.
const_pointer cptr() const
Dereference the link.
bool isValid() const
Test to see if the link is dereferencable.
const void * storable() const
Return a (void) pointer to the currently-referenced object.
DataLink(const ID_type &dataID, IProxyDict *sg=0)
Constructor — link to a STORABLE using a string ID.
void toDefaultObject(const EventContext &ctx)
Set the link to the default object of this type.
DataLink(const_reference data, IProxyDict *sg=0)
Constructor — link to a STORABLE using a transient ref to it.
bool toTransient(IProxyDict *sg=0)
Finish initialization after link has been read.
const CONT & const_reference
Manage DataProxy reference in ElementLink/DataLink.