|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef STOREGATE_DATASTORE_H
6 #define STOREGATE_DATASTORE_H
20 #include "GaudiKernel/ClassID.h"
21 #include "GaudiKernel/SmartIF.h"
22 #include "GaudiKernel/StatusCode.h"
31 #include <unordered_map>
83 typedef std::pair<SG::ConstProxyIterator, SG::ConstProxyIterator>
constProxyRange;
122 std::recursive_mutex&
mutex)
const;
127 const std::string&
key)
const;
160 void t2pRemove(
const void*
const pTrans);
166 void keys(
const CLID&
id, std::vector<std::string>& vkeys,
167 bool includeAlias,
bool onlyValid);
171 const std::vector<DataProxy*>&
proxies()
const;
264 #endif // STOREGATE_DATASTORE
JetConstituentVector::iterator iterator
void setPac(IPageAccessControlSvc *pac)
set IPageAccessControlSvc ptr in T2PMap
Simple (non-deleting) Updater implementation.
int typeCount(const CLID &id) const
Count number of object of a given type in store.
static constexpr CxxUtils::detail::ConcurrentHashmapVal_t s_nullval
Map of hashed sgkey -> DataProxy.
StatusCode t2pRegister(const void *const pTrans, DataProxy *const pPers)
methods to query the T2PMap:
a proxy registry (a read/write dictionary)
uintptr_t ConcurrentHashmapVal_t
Type used for keys and values — an unsigned big enough to hold a pointer.
std::pair< SG::ConstProxyIterator, SG::ConstProxyIterator > constProxyRange
Hash map from integers/pointers allowing concurrent, lockless reads.
StoreMap m_storeMap
Maps locating proxies by clid/key.
virtual StatusCode addToStore(const CLID &id, DataProxy *proxy)
add proxy to store.
StoreMap::const_iterator ConstStoreIterator
void clearStore(bool force, bool hard, MsgStream *pmlog)
If HARD is true, then the bound objects should also clear any data that depends on the identity of th...
Hash functional for sgkey_t.
SG::sgkey_t sgkey_t
Type of the keys.
virtual DataProxy * proxy(const TransientAddress *tAddr) const
return proxy for a given type/key pair if key is empty returns the default proxy (currently last regi...
void setStoreID(StoreID::type id)
StatusCode removeFromKeyMap(DataProxy *proxy)
Remove a proxy from m_keyMap.
StoreMap::iterator StoreIterator
SG::DataProxy * proxy_exact(sgkey_t sgkey) const
get proxy with given key.
Interface to a service that monitors memory page accesses.
std::map< CLID, SG::ProxyMap > StoreMap
std::vector< DataProxy * > m_proxies
All proxies managed by this store.
::StatusCode StatusCode
StatusCode definition for legacy code.
DataProxy * findDummy(CLID id, const std::string &key)
Look for (and convert) a matching dummy proxy.
IProxyDict & m_pool
The string pool associated with this store.
SmartIF< ISGAudSvc > m_pSGAudSvc
DataProxy provides the registry services for StoreGate.
StatusCode addSymLink(const CLID &linkid, DataProxy *proxy)
add symlink to store:
IStringPool::sgkey_t sgkey_t
const std::string DEFAULTKEY
uint32_t CLID
The Class ID type.
std::vector< const DataProxy * > pacReport() const
request an access control report, i.e. a list of proxies that have not been accessed since monitored
virtual StoreID::type storeID() const
StatusCode removeProxyImpl(DataProxy *proxy, int index)
Helper for removing a proxy.
void keys(const CLID &id, std::vector< std::string > &vkeys, bool includeAlias, bool onlyValid)
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
DataProxy * locatePersistent(const void *const pTransient) const
locate the persistent (proxy) for a given T* (void*):
void setPac(IPageAccessControlSvc *pac)
set IPageAccessControlSvc ptr in T2PMap
Simple (non-deleting) Updater implementation.
Hold DataProxy instances associated with a store.
const std::vector< DataProxy * > & proxies() const
All proxies managed by this store.
StatusCode addAlias(const std::string &aliasKey, DataProxy *proxy)
add alias to store
DataStore(IProxyDict &pool)
Constructor.
void t2pRemove(const void *const pTrans)
CxxUtils::ConcurrentMap< sgkey_t, DataProxy *, CxxUtils::SimpleUpdater, SGKeyHash, SGKeyEqual, 0, s_nullval > KeyMap_t
StatusCode pRange(const CLID &id, SG::ConstProxyIterator &f, SG::ConstProxyIterator &e) const
Return an iterator over proxy for a given CLID:
void t2pRemove(const void *const pTrans)
StatusCode removeProxy(DataProxy *proxy, bool forceRemove, bool hard)
remove proxy from store, unless proxy is reset only.
std::vector< const DataProxy * > pacReport() const
request an access control report, i.e. a list of proxies that have not been accessed since under cont...
StatusCode tRange(ConstStoreIterator &f, ConstStoreIterator &e) const
Return an iterator over the StoreMap:
SG::DataProxy * proxy_exact_unlocked(sgkey_t sgkey, std::recursive_mutex &mutex) const
Like proxy_exact, but intended to be called without holding the store lock.
ProxyMap::const_iterator ConstProxyIterator
Comparison functional for sgkey_t.