28 std::cout <<
"proxies\n"; std::abort();
34 return m_stringPool.keyToString (key);
42 std::cout <<
"registerKey\n"; std::abort();
47 const std::string& key,
52 const void* raw_ptr = obj.get();
54 raw_ptr = bucket->object();
57 CLID clid = obj->clID();
68 sgkey_t sgkey = m_stringPool.stringToKey (key, obj->clID());
71 if (obj->clID() ==
proxy->clID()) {
75 proxy->setAlias (key);
78 if (key ==
proxy->name()) {
82 proxy->setTransientID (obj->clID());
99 static const std::string nm =
"TestStore";
107 return proxy (lock, pTransient);
114 tmap_t::const_iterator i =
m_tmap.find (pTransient);
124 return proxy (lock,
id, key);
131 sgkey_t sgkey = m_stringPool.stringToKey (key,
id);
132 kmap_t::const_iterator i =
m_kmap.find (sgkey);
135 m_missedProxies.emplace_back (
id, key);
143 kmap_t::const_iterator i =
m_kmap.find (sgkey);
153 return m_stringPool.stringToKey (
str, clid);
160 return m_stringPool.keyToString (key, clid);
165 sgkey_t& sgkey_out,
size_t& index_out)
169 if (i ==
m_remap.end())
return false;
170 sgkey_out = i->second.key;
171 index_out = i->second.index;
179 proxy->setStore (
this);
182 return StatusCode::SUCCESS;
196 std::vector<IResetable*>::iterator it =
204 CLID clid,
const std::string& key)
206 sgkey_t sgkey = m_stringPool.stringToKey (key, clid);
210 if (dp->clID() == CLID_NULL)
211 dp->setID (clid, key);
222 dp->setSGKey (sgkey);
228 size_t index_in,
size_t index_out)
237 const std::string& newKey)
240 sgkey_t sgkey = m_stringPool.stringToKey (newKey,
proxy->clID());
243 proxy->setAlias (newKey);
255 auto store = std::make_unique<TestStore>();
uint32_t CLID
The Class ID type.
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
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
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.