![]() |
ATLAS Offline Software
|
A service that caches a pointer to the currently active store. More...
#include <ActiveStoreSvc.h>
Public Member Functions | |
| StoreGateSvc * | activeStore () const |
| returns pointer to the active store as StoreGateSvc | |
| StoreGateSvc * | operator-> () const |
| dereference operator to access the active store | |
| void | setStore (StoreGateSvc *s) |
| set the active store pointer: used by the event loop mgrs | |
| virtual SG::DataProxy * | proxy (const void *const pTransient) const override |
| get proxy for a given data object address in memory | |
| virtual SG::DataProxy * | proxy (const CLID &id, const std::string &key) const override |
| get proxy with given id and key. Returns 0 to flag failure | |
| virtual SG::DataProxy * | proxy_exact (SG::sgkey_t sgkey) const override |
| Get proxy given a hashed key+clid. | |
| virtual std::vector< const SG::DataProxy * > | proxies () const override |
| return the list of all current proxies in store | |
| StatusCode | addToStore (CLID id, SG::DataProxy *proxy) override |
| Raw addition of a proxy to the store. | |
| virtual SG::DataProxy * | recordObject (SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override |
| Record an object in the store. | |
| virtual sgkey_t | stringToKey (const std::string &str, CLID clid) override |
| Find the key for a string/CLID pair. | |
| virtual const std::string * | keyToString (sgkey_t key) const override |
| Find the string corresponding to a given key. | |
| virtual const std::string * | keyToString (sgkey_t key, CLID &clid) const override |
| Find the string and CLID corresponding to a given key. | |
| virtual void | registerKey (sgkey_t key, const std::string &str, CLID clid) override |
| Remember an additional mapping from key to string/CLID. | |
| virtual StatusCode | initialize () override |
| Service initialization. | |
Private Member Functions | |
| StoreGateSvc * | activeStoreOOL () const |
Private Attributes | |
| Gaudi::Property< std::string > | m_storeName {this, "StoreName", StoreID::storeName(StoreID::EVENT_STORE), "StoreGate instance name"} |
A service that caches a pointer to the currently active store.
It also implements the IProxyDict store interface
In most jobs the active store is simply the default event store (named "StoreGateSvc"). When doing pile-up (and perhaps later on in multi-threaded jobs, the active store changes during the event loop execution. It is important, for example, that converters always refer to the active store rather than to the default one.
Definition at line 29 of file ActiveStoreSvc.h.
|
inline |
returns pointer to the active store as StoreGateSvc
Definition at line 36 of file ActiveStoreSvc.h.
|
private |
Definition at line 154 of file ActiveStoreSvc.cxx.
|
override |
Raw addition of a proxy to the store.
Definition at line 60 of file ActiveStoreSvc.cxx.
|
overridevirtual |
Service initialization.
Definition at line 17 of file ActiveStoreSvc.cxx.
|
overridevirtual |
Find the string corresponding to a given key.
| key | The key to look up. |
stringToKey() or registerKey(). Definition at line 113 of file ActiveStoreSvc.cxx.
Find the string and CLID corresponding to a given key.
| key | The key to look up. |
| clid[out] | The found CLID. |
stringToKey() or registerKey(). Definition at line 127 of file ActiveStoreSvc.cxx.
|
inline |
dereference operator to access the active store
Definition at line 43 of file ActiveStoreSvc.h.
|
overridevirtual |
return the list of all current proxies in store
Definition at line 54 of file ActiveStoreSvc.cxx.
|
overridevirtual |
get proxy with given id and key. Returns 0 to flag failure
Definition at line 43 of file ActiveStoreSvc.cxx.
|
overridevirtual |
get proxy for a given data object address in memory
Definition at line 37 of file ActiveStoreSvc.cxx.
|
overridevirtual |
Get proxy given a hashed key+clid.
Find an exact match; no handling of aliases, etc. Returns 0 to flag failure.
Definition at line 47 of file ActiveStoreSvc.cxx.
|
overridevirtual |
Record an object in the store.
| obj | The data object to store. |
| key | The key as which it should be stored. |
| allowMods | If false, the object will be recorded as const. |
| returnExisting | If true, return proxy if this key already exists. |
Full-blown record. obj should usually be something deriving from SG::DataBucket.
Returns the proxy for the recorded object; nullptr on failure. If the requested CLID/key combination already exists in the store, the behavior is controlled by returnExisting. If true, then the existing proxy is returned; otherwise, nullptr is returned. In either case, obj is destroyed.
Definition at line 83 of file ActiveStoreSvc.cxx.
|
overridevirtual |
Remember an additional mapping from key to string/CLID.
| key | The key to enter. |
| str | The string to enter. |
| clid | The CLID associated with the string. |
key already corresponds to a different string.This registers an additional mapping from a key to a string; it can be found later through lookup() on the string. Logs an error if key already corresponds to a different string.
Definition at line 146 of file ActiveStoreSvc.cxx.
| void ActiveStoreSvc::setStore | ( | StoreGateSvc * | s | ) |
set the active store pointer: used by the event loop mgrs
Definition at line 31 of file ActiveStoreSvc.cxx.
Find the key for a string/CLID pair.
| str | The string to look up. |
| clid | The CLID associated with the string. |
Definition at line 100 of file ActiveStoreSvc.cxx.
|
private |
Definition at line 149 of file ActiveStoreSvc.h.