27 std::cout <<
"proxies\n"; std::abort();
33 return m_stringPool.keyToString (key);
41 std::cout <<
"registerKey\n"; std::abort();
46 const std::string& key,
51 const void* raw_ptr = obj.get();
53 raw_ptr = bucket->object();
56 CLID clid = obj->clID();
67 sgkey_t sgkey = m_stringPool.stringToKey (key, obj->clID());
70 if (obj->clID() ==
proxy->clID()) {
74 proxy->setAlias (key);
77 if (key ==
proxy->name()) {
81 proxy->setTransientID (obj->clID());
98 static const std::string nm =
"TestStore";
113 tmap_t::const_iterator i =
m_tmap.find (pTransient);
130 sgkey_t sgkey = m_stringPool.stringToKey (key,
id);
131 kmap_t::const_iterator i =
m_kmap.find (sgkey);
134 m_missedProxies.emplace_back (
id, key);
142 kmap_t::const_iterator i =
m_kmap.find (sgkey);
152 return m_stringPool.stringToKey (
str, clid);
159 return m_stringPool.keyToString (key, clid);
164 sgkey_t& sgkey_out,
size_t& index_out)
168 if (i ==
m_remap.end())
return false;
169 sgkey_out = i->second.key;
170 index_out = i->second.index;
178 proxy->setStore (
this);
181 return StatusCode::SUCCESS;
195 std::vector<IResetable*>::iterator it =
203 CLID clid,
const std::string& key)
205 sgkey_t sgkey = m_stringPool.stringToKey (key, clid);
209 if (dp->clID() == CLID_NULL)
210 dp->setID (clid, key);
221 dp->setSGKey (sgkey);
227 size_t index_in,
size_t index_out)
236 const std::string& newKey)
239 sgkey_t sgkey = m_stringPool.stringToKey (newKey,
proxy->clID());
242 proxy->setAlias (newKey);
248 SG::CurrentEventStore::setStore (&
store);
255 auto store = std::make_unique<TestStore>();
256 SG::CurrentEventStore::setStore (
store.get());
uint32_t CLID
The Class ID type.
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
Dummy event store, for regression tests.
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
virtual void boundHandle(IResetable *handle) override
std::vector< IResetable * > m_boundHandles
virtual const std::string * keyToString(sgkey_t) const override
virtual void registerKey(sgkey_t, const std::string &, CLID) override
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
virtual bool tryELRemap(sgkey_t sgkey_in, size_t index_in, sgkey_t &sgkey_out, size_t &index_out) override
virtual sgkey_t stringToKey(const std::string &str, CLID clid) override
void alias(SG::DataProxy *proxy, const std::string &newKey)
virtual const std::string & name() const override
virtual SG::DataProxy * proxy(const void *const pTransient) const override
SG::DataProxy * record1(lock_t &, const void *p, DataObject *obj, CLID clid, const std::string &key)
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
void remap(sgkey_t sgkey_in, sgkey_t sgkey_out, size_t index_in=0, size_t index_out=0)
virtual std::vector< const SG::DataProxy * > proxies() const override
virtual void unboundHandle(IResetable *handle) override
virtual StatusCode addToStore(CLID, SG::DataProxy *proxy) override
std::lock_guard< mutex_t > lock_t
void setProxyDictInEventContext(IProxyDict *sg)
Update the IProxyDict in the current EventContext.
void initTestStore ATLAS_NOT_THREAD_SAFE()
std::unique_ptr< TestStore > getTestStore()
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Some out-of-line helpers for ExtendedEventContext.