26#include "GaudiKernel/ThreadLocalContext.h"
88 if (link_clid !=
m_proxy->clID() && !
m_proxy->transientID (link_clid)) {
89 if (
m_proxy->clID() != CLID_NULL)
98 if (link_sgkey !=
m_proxy->sgkey())
189 CLID clid = CLID_NULL;
190 const std::string* key =
nullptr;
196 if (link_clid != CLID_NULL && clid != link_clid)
213 else if (link_clid != CLID_NULL &&
214 m_proxy->clID() != CLID_NULL &&
215 !
m_proxy->transientID(link_clid))
235 static const std::string dummy;
265 if (!isConst &&
m_proxy->isConst()) {
285 if (
m_proxy->transientID (clid)) {
337 if (s_inputRenameMap) {
340 auto it =
r->find (sgkey);
342 sgkey = it->second.m_sgkey;
427 size_t index_s =
index;
428 bool ret =
tryRemap (sgkey, index_s);
458 size_t index_s =
index;
459 bool ret =
tryRemap (sgkey, index_s);
461 index =
static_cast<uint32_t
>(index_s);
481 size_t index_out = 0;
519 const std::size_t persIdx = dec->
index(
index );
529 if (
index != persIdx) {
549 CLID clid = CLID_NULL;
574 (
reinterpret_cast<unsigned long> (
m_proxy) & ~1UL);
576 if (
proxy == 0 && !nothrow)
588 if (
m_proxy == other.m_proxy)
return true;
597 proxy = other.m_proxy;
600 ptr = other.objpointer();
620 s_inputRenameMap =
map;
Exceptions that can be thrown from AthLinks.
Helpers for checking error return status codes and reporting errors.
Manage DataProxy reference in ElementLink/DataLink.
Helpers for retrieving the payload held by a DataProxy.
uint32_t CLID
The Class ID type.
Hold thinning decisions for one container.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
#define ATLAS_THREAD_SAFE
Helper to read data from a RCUObject.
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
virtual bool tryELRemap(sgkey_t sgkey_in, size_t index_in, sgkey_t &sgkey_out, size_t &index_out)
Test to see if the target of an ElementLink has moved.
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy)=0
Add a new proxy to the store.
virtual SG::DataProxy * proxy(const CLID &id, const std::string &key) const =0
Get proxy with given id and key.
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const =0
Get proxy given a hashed key+clid.
virtual sgkey_t stringToKey(const std::string &str, CLID clid)=0
Find the key for a string/CLID pair.
virtual const std::string * keyToString(sgkey_t key) const =0
Find the string corresponding to a given key.
static IProxyDict * store()
Fetch the current store.
bool toPersistent(sgkey_t &sgkey, uint64_t &index)
Prepare this link for writing.
SG::DataProxy * m_proxy
The DataProxy referring to our object, if the LSB is clear; pointer to the object which we're referen...
bool isObjpointer() const
Test to see if we're pointing directly at an object.
SG::DataProxy * proxy1(bool nothrow) const
Helper for proxy(), for the case of a direct object pointer.
sgkey_t toIdentifiedObject(const ID_type &dataID, CLID link_clid, IProxyDict *sg)
Set the link to an object given by a string key.
bool operator==(const DataProxyHolder &other) const
Compare for equality.
SG::sgkey_t sgkey_t
Type of hashed keys.
sgkey_t toStorableObject(const_pointer_t obj, CLID link_clid, IProxyDict *sg)
Set the link to an object given by a pointer.
void toPersistentNoRemap(sgkey_t &sgkey)
Prepare this link for writing.
IProxyDict * source1()
Return the data source for this reference.
pointer_t objpointer() const
Return a pointer to the object we're pointing at directly.
static bool thin(sgkey_t &sgkey, size_t &index, const SG::ThinningCache *thinningCache)
Adjust for thinning, with explicitly provided thinning cache.
void throwInvalidLink(sgkey_t sgkey) const
Throw a ExcInvalidLink exception for this link.
void storeObjpointer(const_pointer_t p)
Store a direct pointer to an object.
void * castfn_t(SG::DataProxy *)
Function casting from a SG::DataProxy to a pointer.
bool tryRemap(sgkey_t &sgkey, size_t &index)
Test to see if the link has been remapped.
void * storableBase(castfn_t *castfn, CLID clid, bool isConst) const
Return a pointer to the currently-referenced object.
SG::DataProxy * proxy(bool nothrow=false) const
Return the DataProxy for this link.
std::string ID_type
Type of string keys.
DataProxyHolder()
Default constructor.
IProxyDict * source() const
Return the data source for this reference.
const ID_type & dataID() const
Return the SG key that we reference, as a string.
void toTransient(sgkey_t sgkey, IProxyDict *sg=0)
Finish initialization after link has been read.
const void * const_pointer_t
Exception — Attempt to set DataLink / ElementLink with CLID <clid> to object with CLID <clid>.
Exception – Tried to retrieve const storable as a non-const pointer.
Exception — Attempt to dereference invalid DataLink / ElementLink ".
Exception — The object referenced by a DataLink / ElementLink is not registered in SG.
Cache thinning decisions for converters.
const ThinningDecisionBase * thinning(const std::string &key) const
Return thinning for key.
Hold thinning decisions for one container.
static const std::size_t RemovedIdx
Flag used to show that an index has been thinned away.
size_t index(size_t ndxOrig) const
Return the index corresponding to ndxOrig after thinning.
void setSGKey(sgkey_t sgkey)
check if it is a transient ID (primary or symLinked):
SG::SGKeyMap< InputRenameEntry > InputRenameMap_t
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies