|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef SGTOOLS_TESTSTORE_H
14 #define SGTOOLS_TESTSTORE_H
22 #include <unordered_map>
35 :
key (the_key),
index (the_index) {}
46 {
return m.key +
m.index; }
51 :
public implements<IProxyDict>
54 virtual std::vector<const SG::DataProxy*>
proxies()
const override;
62 virtual const std::string&
name()
const override;
69 sgkey_t& sgkey_out,
size_t& index_out)
override;
75 const std::string&
key,
77 bool returnExisting)
override;
85 DataObject*
obj = SG::asStorable<T>(p_nc);
96 DataObject*
obj = SG::asStorable<T>(std::move (
up));
103 size_t index_in = 0,
size_t index_out = 0);
107 void remap (
const std::string& key_in,
const std::string& key_out,
108 size_t index_in = 0,
size_t index_out = 0)
113 remap (sgkey_in, sgkey_out, index_in, index_out);
118 typedef std::unordered_map<const void*, SG::DataProxy*>
tmap_t;
124 typedef std::unordered_map<TestStoreRemap, TestStoreRemap, TestStoreRemapHash>
remap_t;
141 CLID clid,
const std::string&
key);
157 #endif // not SGTOOLS_TESTSTORE_H
TestStoreRemap(SG::sgkey_t the_key=0, size_t the_index=0)
virtual void boundHandle(IResetable *handle) override
SG::DataProxy * record1(lock_t &, const void *p, DataObject *obj, CLID clid, const std::string &key)
std::lock_guard< mutex_t > lock_t
bool operator==(const TestStoreRemap &other) const
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const 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 remap(sgkey_t sgkey_in, sgkey_t sgkey_out, size_t index_in=0, size_t index_out=0)
void remap(const std::string &key_in, const std::string &key_out, size_t index_in=0, size_t index_out=0)
virtual StatusCode addToStore(CLID, SG::DataProxy *proxy) override
virtual SG::DataProxy * proxy(const void *const pTransient) const override
static const CLID & ID()
the CLID of T
a resetable object (e.g. a SG DataHandle)
std::vector< std::pair< CLID, std::string > > m_missedProxies ATLAS_THREAD_SAFE
::StatusCode StatusCode
StatusCode definition for legacy code.
size_t operator()(const TestStoreRemap &m) const
std::vector< IResetable * > m_boundHandles
virtual std::vector< const SG::DataProxy * > proxies() const override
Maintain a mapping of strings to 64-bit ints.
virtual const std::string & name() const override
virtual void unboundHandle(IResetable *handle) override
uint32_t CLID
The Class ID type.
void initTestStore ATLAS_NOT_THREAD_SAFE()
std::unordered_map< TestStoreRemap, TestStoreRemap, TestStoreRemapHash > remap_t
virtual const std::string * keyToString(sgkey_t) const override
virtual void registerKey(sgkey_t, const std::string &, CLID) override
SG::SGKeyMap< SG::DataProxy * > kmap_t
void record(const T *p, const std::string &key)
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
SG::StringPool m_stringPool ATLAS_THREAD_SAFE
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
std::unique_ptr< TestStore > getTestStore()
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
Smart pointer to manage DataObject reference counts.
std::unordered_map< const void *, SG::DataProxy * > tmap_t
Define macros for attributes used to control the static checker.
void record(std::unique_ptr< T > up, const std::string &key)
void alias(SG::DataProxy *proxy, const std::string &newKey)