40 std::println (
"proxies"); std::abort();
46 return m_stringPool.keyToString (key);
54 std::println (
"registerKey"); std::abort();
59 const std::string& key,
64 const void* raw_ptr = obj.get();
66 raw_ptr = bucket->object();
69 CLID clid = obj->clID();
80 sgkey_t sgkey = m_stringPool.stringToKey (key, obj->clID());
83 if (obj->clID() ==
proxy->clID()) {
87 proxy->setAlias (key);
90 if (key ==
proxy->name()) {
94 proxy->setTransientID (obj->clID());
111 static const std::string nm =
"TestStore";
126 tmap_t::const_iterator i =
m_tmap.find (pTransient);
143 sgkey_t sgkey = m_stringPool.stringToKey (key,
id);
144 kmap_t::const_iterator i =
m_kmap.find (sgkey);
147 m_missedProxies.emplace_back (
id, key);
155 kmap_t::const_iterator i =
m_kmap.find (sgkey);
165 return m_stringPool.stringToKey (
str, clid);
172 return m_stringPool.keyToString (key, clid);
177 sgkey_t& sgkey_out,
size_t& index_out)
181 if (i ==
m_remap.end())
return false;
182 sgkey_out = i->second.key;
183 index_out = i->second.index;
191 proxy->setStore (
this);
194 return StatusCode::SUCCESS;
208 std::vector<IResetable*>::iterator it =
216 CLID clid,
const std::string& key)
218 sgkey_t sgkey = m_stringPool.stringToKey (key, clid);
222 if (dp->clID() == CLID_NULL)
223 dp->setID (clid, key);
234 dp->setSGKey (sgkey);
240 size_t index_in,
size_t index_out)
249 const std::string& newKey)
252 sgkey_t sgkey = m_stringPool.stringToKey (newKey,
proxy->clID());
255 proxy->setAlias (newKey);
261 SG::CurrentEventStore::setStore (&
store);
268 auto store = std::make_unique<TestStore>();
269 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
virtual StoreID::type storeID() const 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
TestStore(StoreID::type id=StoreID::EVENT_STORE)
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.