ATLAS Offline Software
|
The Athena Transient Store API. More...
#include <StoreGateSvc.h>
Classes | |
struct | BadListItem |
Public Member Functions | |
DeclareInterfaceID (IProxyDict, 2, 0) | |
virtual void | boundHandle (IResetable *handle) |
Tell the store that a handle has been bound to a proxy. More... | |
virtual void | unboundHandle (IResetable *handle) |
Tell the store that a handle has been unbound from a proxy. More... | |
DeclareInterfaceID (INamedInterface, 2, 0) | |
DeclareInterfaceID (IHiveStoreMgr, 1, 0) | |
Declare interface ID. More... | |
Basic Client Interface: data object creation | |
template<typename T , typename TKEY , typename... ARGS> | |
SG::WPtr< T > | create (const TKEY &key, ARGS... constructorArgs) |
Create an object with one of its constructors and record it with a key. More... | |
Basic Client Interface: data object registration | |
template<typename T , typename TKEY > | |
StatusCode | record (T *p2BRegistered, const TKEY &key) |
Record an object with a key. More... | |
template<typename T , typename TKEY > | |
StatusCode | record (const T *p2BRegistered, const TKEY &key) |
Record a const object with a key. More... | |
template<typename T , typename TKEY > | |
StatusCode | record (T *p2BRegistered, const TKEY &key, bool allowMods, bool resetOnly=true, bool noHist=false) |
Record an object with a key, allow possibility of specifying const-access. More... | |
template<typename T , typename TKEY > | |
StatusCode | record (std::unique_ptr< T > pUnique, const TKEY &key) |
Record an object with a key, take ownership of the unique_ptr obj. More... | |
template<typename T , typename TKEY > | |
StatusCode | record (std::unique_ptr< const T > pUnique, const TKEY &key) |
Record a const object with a key. More... | |
template<typename T , typename TKEY > | |
StatusCode | record (std::unique_ptr< T > pUnique, const TKEY &key, bool allowMods, bool resetOnly=true, bool noHist=false) |
Record an object with a key, allow possibility of specifying const-access. More... | |
Basic Client Interface: data object access | |
template<typename T > | |
StatusCode | retrieve (const T *&ptr) const |
Retrieve the default object into a const T*. More... | |
template<typename T > | |
StatusCode | retrieve (T *&ptr) const |
Retrieve the default object into a T*. More... | |
template<typename T > | |
T * | retrieve () const |
Variant of the above which doesn't return a status code. More... | |
template<typename T > | |
T * | tryRetrieve () const |
Variant of the above which doesn't print a warning message. More... | |
template<typename T > | |
const T * | tryConstRetrieve () const |
template<typename T , typename TKEY > | |
StatusCode | retrieve (const T *&ptr, const TKEY &key) const |
Retrieve an object with "key", into a const T*. More... | |
template<typename T > | |
StatusCode | retrieve (const T *&ptr, const std::string &key) const |
Retrieve an object with "key", into a const T*. More... | |
template<typename T , typename TKEY > | |
StatusCode | retrieve (T *&ptr, const TKEY &key) const |
Retrieve an object with "key", into a T*. More... | |
template<typename T > | |
StatusCode | retrieve (T *&ptr, const std::string &key) const |
Retrieve an object with "key", into a T*. More... | |
template<typename T , class TKEY > | |
T * | retrieve (const TKEY &key) const |
Variant of the above which doesn't return a status code. More... | |
template<typename T , class TKEY > | |
T * | tryRetrieve (const TKEY &key) const |
Variant of the above which doesn't print a warning message. More... | |
template<typename T , class TKEY > | |
const T * | tryConstRetrieve (const TKEY &key) const |
template<typename T > | |
StatusCode | retrieve (SG::ConstIterator< T > &begin, SG::ConstIterator< T > &end) const |
Retrieve all objects of type T: returns an SG::ConstIterator range. More... | |
template<typename T , typename TKEY > | |
bool | contains (const TKEY &key) const |
Look up a keyed object in TDS (compare also tryRetrieve) returns false if object not available in TDS or persistent stores Usage: if (!p_store->contains<Foo>("fooKey")) { ... More... | |
template<typename T , typename TKEY > | |
StatusCode bind | ATLAS_NOT_THREAD_SAFE (const DataHandle< T > &handle, const TKEY &key) |
A "once-per-job" retrieve that binds a data object to a DataHandle, typically a data member of an Algorithm/AlgTool. More... | |
Advanced Client Interface: data object registration | |
template<typename T , typename TKEY > | |
StatusCode | overwrite (T *p2BRegistered, const TKEY &key) |
Record an object with a key, overwriting any existing object with same key. More... | |
template<typename T , typename TKEY > | |
StatusCode | overwrite (T *p2BRegistered, const TKEY &key, bool allowMods, bool noHist=false) |
Record an object with a key, overwriting any existing object with same key. More... | |
template<typename T , typename TKEY > | |
StatusCode | overwrite (std::unique_ptr< T > pUnique, const TKEY &key, bool allowMods, bool noHist=false) |
Record an object with a key, overwriting any existing object with same key. More... | |
template<typename T , typename TKEY > | |
StatusCode | overwrite (std::unique_ptr< T > pUnique, const TKEY &key) |
Record an object with a key, overwriting any existing object with same key, take ownership of the unique_ptr obj. More... | |
StatusCode | recordAddress (const std::string &skey, IOpaqueAddress *pAddress, bool clearAddressFlag=true) |
Create a proxy object using an IOpaqueAddress and a transient key. More... | |
StatusCode | recordAddress (IOpaqueAddress *pAddress, bool clearAddressFlag=true) |
Create a proxy object using an IOpaqueAddress. More... | |
template<typename T , typename TLINK > | |
StatusCode | symLink (const T *p2BRegistered, TLINK *p2BLinked) |
make a soft link to the object T* already registered (non-const) More... | |
template<typename T , typename TLINK > | |
StatusCode | symLink (const T *p2BRegistered, const TLINK *p2BLinked) |
make a soft link to the object T* already registered (const link) More... | |
template<typename TKEY > | |
StatusCode | symLink (const CLID id, const TKEY &key, const CLID linkid) |
make a soft link to the object pointed by id/key More... | |
template<typename T , typename TKEY , typename AKEY > | |
StatusCode | setAlias (const T *p2BAliased, const TKEY &key, const AKEY &aliasKey) |
make an alias to a DataObject (provide data type and old key) More... | |
template<typename T , typename AKEY > | |
StatusCode | setAlias (const T *p2BAliased, const AKEY &aliasKey) |
make an alias to a DataObject (provide only valid pointer) More... | |
StatusCode | setAlias (SG::DataProxy *proxy, const std::string &aliasKey) |
make an alias to a DataObject (provide valid proxy) More... | |
StatusCode | setConst (const void *pointer) |
prevent downstream clients from modifying the pointed-at dobj More... | |
template<typename T > | |
StatusCode | remove (const T *pObject) |
Remove pObject, will remove its proxy if not reset only. More... | |
template<typename T > | |
StatusCode | removeDataAndProxy (const T *pObject) |
Remove pObject and its proxy no matter what. More... | |
bool | transientSwap (const CLID &id, const std::string &keyA, const std::string &keyB) |
swap the content of 2 keys payload A indexed by keyA will now be accessed via keyB and vice versa Note that the swap is invalidated at event boundaries and/or when somebody clear the store. More... | |
IOVSvc interface | |
template<typename H , typename TKEY > | |
StatusCode regHandle | ATLAS_NOT_THREAD_SAFE (const DataHandle< H > &handle, const TKEY &key) |
template<typename H , typename TKEY > | |
StatusCode | regHandle (DataHandle< H > &handle, const TKEY &key) |
non-const method - will return an error More... | |
template<typename T , typename H , typename TKEY > | |
StatusCode regFcn | ATLAS_NOT_THREAD_SAFE (StatusCode(T::*updFcn)(IOVSVC_CALLBACK_ARGS), const T *obj, const DataHandle< H > &handle, const TKEY &key, bool trigger=false) |
register a callback function, with handle + key More... | |
template<typename T , typename H , typename TKEY > | |
StatusCode regFcn | ATLAS_NOT_THREAD_SAFE (StatusCode(T::*updFcn)(IOVSVC_CALLBACK_ARGS), const T *obj, DataHandle< H > &handle, const TKEY &key, bool trigger=false) |
register a callback function, with handle + key. Non const. Error More... | |
template<typename T1 , typename T2 > | |
StatusCode regFcn | ATLAS_NOT_THREAD_SAFE (StatusCode(T1::*fcn1)(IOVSVC_CALLBACK_ARGS), const T1 *obj1, StatusCode(T2::*fcn2)(IOVSVC_CALLBACK_ARGS), const T2 *obj2, bool trigger=false) |
register a callback function(2) with an already registered function(1) More... | |
template<typename T2 > | |
StatusCode regFcn | ATLAS_NOT_THREAD_SAFE (const std::string &toolName, StatusCode(T2::*fcn2)(IOVSVC_CALLBACK_ARGS), const T2 *obj2, bool trigger=false) |
register a callback function(2) with an already registered AlgTool More... | |
virtual SG::DataProxy * | proxy (const void *const pTransient) const override final |
get proxy for a given data object address in memory More... | |
virtual SG::DataProxy * | proxy (const CLID &id) const final |
get default proxy with given id. Returns 0 to flag failure More... | |
virtual SG::DataProxy * | proxy (const CLID &id, const std::string &key) const override final |
get proxy with given id and key. Returns 0 to flag failure More... | |
SG::DataProxy * | proxy (const CLID &id, const char *key) const |
get proxy with given id and key. More... | |
virtual StatusCode | addToStore (CLID id, SG::DataProxy *proxy) override final |
Raw addition of a proxy to the store. More... | |
virtual SG::DataProxy * | recordObject (SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override final |
Record an object in the store. More... | |
virtual SG::DataProxy * | proxy_exact (SG::sgkey_t sgkey) const override final |
Get proxy given a hashed key+clid. More... | |
more proxy dictionary functionality | |
virtual SG::DataProxy * | proxy (const CLID &id, bool checkValid) const final |
get default proxy with given id, optionally checking validity. More... | |
virtual SG::DataProxy * | proxy (const CLID &id, const std::string &key, bool checkValid) const final |
get proxy with given id and key, optionally checking validity. More... | |
virtual SG::DataProxy * | proxy (const CLID &id, const char *key, bool checkValid) const final |
get proxy with given id and key, optionally checking validity. More... | |
virtual std::vector< const SG::DataProxy * > | proxies () const override final |
return the list of all current proxies in store More... | |
std::vector< CLID > | clids () const |
Return all CLIDs in the store. More... | |
SG::DataProxy * | transientProxy (const CLID &id, const std::string &key) const |
get proxy with given id and key. More... | |
DataObject * | accessData (const CLID &id) const |
find proxy and access its data. Returns 0 to flag failure More... | |
DataObject * | accessData (const CLID &id, const std::string &key) const |
find proxy and access its data. Returns 0 to flag failure More... | |
void | setProxyProviderSvc (IProxyProviderSvc *pPPSvc) |
associate ProxyProviderSvc to this store More... | |
IProxyProviderSvc * | proxyProviderSvc () |
Return current ProxyProviderSvc. More... | |
virtual SG::SourceID | sourceID (const std::string &key="EventSelector") const override |
Return the metadata source ID for the current event slot. More... | |
ElementLink remapping | |
template<class TKEY > | |
void | remap (CLID clid, const TKEY &source, const TKEY &target, off_t index_offset) |
Declare a remapping. More... | |
void | remap_impl (sgkey_t source, sgkey_t target, off_t index_offset) |
Declare a remapping. More... | |
virtual bool | tryELRemap (sgkey_t sgkey_in, size_t index_in, sgkey_t &sgkey_out, size_t &index_out) override final |
Test to see if the target of an ElementLink has moved. More... | |
Gaudi Standard Service constructors/destructors | |
StoreGateSvc (const std::string &name, ISvcLocator *svc) | |
Standard Constructor. More... | |
virtual | ~StoreGateSvc () override |
Standard Destructor. More... | |
Advanced Client Interface: data object access | |
template<typename T , class TKEY > | |
StatusCode | retrieveHighestVersion (SG::ObjectWithVersion< T > &dobjWithVersion, const TKEY &requestedKey) const |
Retrieve version with highest cycle number for a given T,KEY combination If there is only one available version of this data object the returned ObjectWithVersion<T>.versionedKey is set to requestedKey NOTICE that this method is significantly slower than retrieve(const T*, const TKEY&) which returns the last recorded version rather than the one with the highest cycle number. More... | |
template<typename T , class TKEY > | |
StatusCode | retrieveAllVersions (std::list< SG::ObjectWithVersion< T > > &allVersions, const TKEY &requestedKey) const |
Retrieve all versions of a given T,KEY combination sets allVersions, a ref to a vector of ObjectWithVersion<T> If there is only one available version of this dataObject allVersions[0].versionedKey is set to requestedKey. More... | |
template<typename T > | |
std::unique_ptr< T > | retrieveUniquePrivateCopy (const std::string &key) |
EXPERTS ONLY: like readPrivateCopy this method returns your own private copy of a data object of type T and given key, if available and locked. More... | |
template<typename TKEY > | |
CLID | clid (const TKEY &key) const |
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow! More... | |
template<typename TKEY > | |
std::vector< CLID > | clids (const TKEY &key) const |
Retrieve all the CLID s (including symlinks) of the object recorded in StoreGate with the given "key" WARNING: slow! More... | |
template<typename T > | |
int | typeCount () const |
Return the number of instances of an object of type T int i = p_store->typeCount<T>(); Note that this will return the number of proxies in transient memory only, will not check with proxy providers. More... | |
int | typeCount (const CLID &id) const |
Return the number of instances of type T (input CLID) More... | |
template<typename TKEY > | |
bool | contains (const CLID &id, const TKEY &key) const |
Look up a keyed object in TDS by CLID. More... | |
template<typename T , typename TKEY > | |
bool | transientContains (const TKEY &key) const |
Look up a transient data object in TDS only (no Proxy lookup) returns false if object not available in TDS Usage: if (!p_store->contains<Foo>("fooKey")) { ... More... | |
template<typename TKEY > | |
bool | transientContains (const CLID &id, const TKEY &key) const |
Look up a transient data object in TDS only by CLID. More... | |
std::string | dump () const |
dump objects in store. More... | |
void | setStoreID (StoreID::type id) |
set store ID. request forwarded to DataStore: More... | |
StoreID::type | storeID () const |
get store ID. request forwarded to DataStore: More... | |
template<typename T > | |
void | keys (std::vector< std::string > &vkeys, bool includeAlias=false, bool onlyValid=true) const |
provide list of all StoreGate keys associated with an object. More... | |
void | keys (const CLID &id, std::vector< std::string > &vkeys, bool includeAlias=false, bool onlyValid=true) const |
provide list of all StoreGate keys associated with an object. More... | |
virtual ::IProxyDict * | hiveProxyDict () override final |
implements IHiveStore interface More... | |
static StoreGateSvc * | currentStoreGate () |
get current StoreGate More... | |
IHiveStoreMgr implementation | |
virtual StatusCode | clearStore (bool forceRemove=false) override final |
clear DataStore contents: called by the event loop mgrs More... | |
virtual void | commitNewDataObjects () override final |
Reset handles added since the last call to commit. More... | |
void | setDefaultStore (SGImplSvc *pStore) |
set pointer to default event store: used by ActiveStoreSvc More... | |
static void | setSlot (SG::HiveEventSlot *pSlot) |
set the hive event slot pointer: used by the event loop mgrs More... | |
String <-> int key conversions. | |
typedef IStringPool::sgkey_t | sgkey_t |
virtual sgkey_t | stringToKey (const std::string &str, CLID clid) override final |
Find the key for a string/CLID pair. More... | |
virtual const std::string * | keyToString (sgkey_t key) const override final |
Find the string corresponding to a given key. More... | |
virtual const std::string * | keyToString (sgkey_t key, CLID &clid) const override final |
Find the string and CLID corresponding to a given key. More... | |
virtual void | registerKey (sgkey_t key, const std::string &str, CLID clidid) override final |
Remember an additional mapping from key to string/CLID. More... | |
Gaudi IService implementation | |
virtual StatusCode | initialize () override |
Service initialization. More... | |
virtual StatusCode | stop () override |
Service start. More... | |
virtual StatusCode | finalize () override |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) override |
static const InterfaceID & | interfaceID () |
Should rather be in IStoreGateSvc.h if we had one. More... | |
Gaudi IIncidentListener implementation | |
typedef std::unordered_set< BadListItem, DataObjID_Hasher > | BadItemList |
typedef std::mutex | mutex_t |
Protect access to m_bad* members. More... | |
typedef std::lock_guard< mutex_t > | lock_t |
SGImplSvc * | m_defaultStore |
ServiceHandle< IProxyProviderSvc > | m_pPPSHandle |
property More... | |
ServiceHandle< IIncidentSvc > | m_incSvc |
property More... | |
bool | m_DumpStore |
property Dump: triggers dump() at EndEvent More... | |
bool | m_ActivateHistory |
property: activate the history service More... | |
bool | m_DumpArena |
DumpArena Property flag : trigger m_arena->report() at clearStore. More... | |
StoreID::type | m_storeID |
Cache store type in the facade class. More... | |
ServiceHandle< IAlgContextSvc > | m_algContextSvc |
Algorithm context, for tracking bad calls. More... | |
BadItemList m_badRetrieves | ATLAS_THREAD_SAFE |
Remember calls to retrieve and record for a MT store, so we can warn about them during finalize(). More... | |
BadItemList m_badRecords | ATLAS_THREAD_SAFE |
mutex_t | m_badMutex |
class | SG::TestHiveStoreSvc |
class | SG::HiveMgrSvc |
class | AthenaOutputStream |
access proxyRange() More... | |
class | xAODMaker::AuxStoreWrapper |
FIXME: access releaseObject. More... | |
class | PileUpMergeSvc |
access emptyTrash More... | |
class | IOVDbSvc |
access clearProxyPayload More... | |
class | IOVSvcTool |
class | SGDeleteAlg |
class | SG::VarHandleBase |
access typeless_record More... | |
void | AthenaInternal::py_sg_clearProxyPayload (StoreGateSvc *, SG::DataProxy *) |
PyObject * | AthenaInternal::recordObjectToStore (StoreGateSvc *, PyObject *, PyObject *, bool, bool, bool) |
virtual void | handle (const Incident &) override final |
StatusCode | loadEventProxies () |
load proxies at begin event More... | |
virtual StatusCode | createObj (IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override |
Call converter to create an object, with locking. More... | |
void | makeCurrent () |
The current store is becoming the active store. More... | |
static SG::HiveEventSlot * | currentSlot () |
SGImplSvc * | currentStore () const |
returns pointer to the current SGImplSvc More... | |
StatusCode | proxyRange (const CLID &id, SG::ConstProxyIterator &beg, SG::ConstProxyIterator &end) const |
return a range to all proxies of a given CLID More... | |
void | releaseObject (const CLID &id, const std::string &key) |
release object held by proxy, if any. More... | |
void | clearProxyPayload (SG::DataProxy *) |
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method correctly updates SGSvc internals More... | |
StatusCode | typeless_record (DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool resetOnly=true, bool noHist=false) |
type-less recording of an object with a key, allow possibility of specifying const-access and history record More... | |
StatusCode | typeless_overwrite (const CLID &id, DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool noHist=false, const std::type_info *tinfo=0) |
same as typeless_record, allows to overwrite an object in memory or on disk More... | |
template<typename T , typename TKEY > | |
StatusCode | record1 (DataObject *obj, T *pObject, const TKEY &key, bool allowMods, bool resetOnly=true, bool noHist=false) |
template<typename T , typename TKEY > | |
StatusCode | overwrite1 (DataObject *obj, T *pObject, const TKEY &key, bool allowMods, bool noHist=false) |
bool | isSymLinked (const CLID &linkID, SG::DataProxy *dp) |
StatusCode | addSymLink (const CLID &linkid, SG::DataProxy *dp) |
StatusCode | addAlias (const std::string &aliasKey, SG::DataProxy *dp) |
std::string | createKey (const CLID &dataID) |
creates a key internally if none specified by client More... | |
SG::DataProxy * | setupProxy (const CLID &dataID, const std::string &gK, DataObject *pDObj, bool allowMods, bool resetOnly) |
try to locate a proxy or create it if needed More... | |
void | recycle (DataObject *pBadDObj) |
put a bad (unrecordable) dobj away More... | |
void | emptyTrash () |
throw away bad objects More... | |
StatusCode | removeProxy (SG::DataProxy *proxy, const void *pTrans, bool forceRemove=false) |
remove proxy from store, unless it is reset only. More... | |
StatusCode | t2pRegister (const void *const pTrans, SG::DataProxy *const pPers) |
forwarded to DataStore More... | |
void | t2pRemove (const void *const pTrans) |
forwarded to DataStore More... | |
void | msg_update_handler (Gaudi::Details::PropertyBase &outputLevel) |
callback for output level property More... | |
void | addAutoSymLinks (const std::string &key, CLID clid, SG::DataProxy *dp, const std::type_info *tinfo, bool warn_nobib=true) |
Add automatically-made symlinks for DP. More... | |
void | rememberBadRetrieve (CLID clid, const std::string &key) const |
Remember that retrieve() was called for a MT store. More... | |
void | rememberBadRecord (CLID clid, const std::string &key) const |
Remember that retrieve() was called for a MT store. More... | |
void | rememberBad (BadItemList &bad, CLID clid, const std::string &key) const |
Remember that retrieve or record was called for a MT store. More... | |
void | printBadList (const BadItemList &bad, const std::string &what) const |
Print out a list of bad calls during finalization. More... | |
template<class DOBJ > | |
bool | associateAux (DOBJ *, const std::string &key, bool ignoreMissing=true) const |
try to associate a data object to its auxiliary store if ignoreMissing=false More... | |
template<class DOBJ > | |
bool | associateAux (const DOBJ *, const std::string &key, bool ignoreMissing=true) const |
template<class DOBJ , class AUXSTORE > | |
bool | associateAux_impl (DOBJ *ptr, const std::string &key, const AUXSTORE *) const |
template<class DOBJ > | |
bool | associateAux_impl (DOBJ *, const std::string &, const SG::NoAuxStore *) const |
StoreGateSvc (const StoreGateSvc &) | |
StoreGateSvc & | operator= (const StoreGateSvc &) |
The Athena Transient Store API.
Dump | property (default false): set to call dump() at EndEvent |
FolderNameList | property (default ""): data folders to be created in this store Caches a pointer to the currently hive store. In most jobs the hive store is simply the default event store (named "StoreGateSvc"). When doing pile-up (and perhaps later on in multi-threaded jobs, the hive store changes during the event loop execution. It is important, for example, that converters always refer to the hive store rather than to the default one. |
Definition at line 119 of file StoreGateSvc.h.
|
private |
Definition at line 939 of file StoreGateSvc.h.
|
private |
Definition at line 949 of file StoreGateSvc.h.
|
private |
Protect access to m_bad* members.
Definition at line 948 of file StoreGateSvc.h.
Definition at line 646 of file StoreGateSvc.h.
StoreGateSvc::StoreGateSvc | ( | const std::string & | name, |
ISvcLocator * | svc | ||
) |
|
overridevirtual |
|
private |
find proxy and access its data. Returns 0 to flag failure
Definition at line 321 of file StoreGateSvc.cxx.
find proxy and access its data. Returns 0 to flag failure
Definition at line 327 of file StoreGateSvc.cxx.
|
private |
|
private |
Add automatically-made symlinks for DP.
|
private |
|
finaloverridevirtual |
Raw addition of a proxy to the store.
id | CLID of object being added. |
proxy | proxy to add. |
Implements IProxyDict.
Definition at line 260 of file StoreGateSvc.cxx.
|
private |
|
private |
try to associate a data object to its auxiliary store if ignoreMissing=false
key | The key to use for the lookup. |
|
private |
|
private |
StatusCode regHandle StoreGateSvc::ATLAS_NOT_THREAD_SAFE | ( | const DataHandle< H > & | handle, |
const TKEY & | key | ||
) |
StatusCode bind StoreGateSvc::ATLAS_NOT_THREAD_SAFE | ( | const DataHandle< T > & | handle, |
const TKEY & | key | ||
) |
A "once-per-job" retrieve that binds a data object to a DataHandle, typically a data member of an Algorithm/AlgTool.
At the end of every event, or more in general when the data object is not valid anymore, the DataHandle is reset, so that the next time the handle is accessed it will point to the current version of that data object. For example if MyAlg.h has a data member DataHandle<Foo> m_myFoo; after bind is called once per job, usually in MyAlg::initialize: sc = p_store->bind(m_myFoo, "MyFoo"); m_myFoo will provide to access the current MyFoo e.g. in MyAlg::execute(): m_myFoo->useMe();
StatusCode regFcn StoreGateSvc::ATLAS_NOT_THREAD_SAFE | ( | const std::string & | toolName, |
StatusCode(T2::*)(IOVSVC_CALLBACK_ARGS) | fcn2, | ||
const T2 * | obj2, | ||
bool | trigger = false |
||
) |
register a callback function(2) with an already registered AlgTool
StatusCode regFcn StoreGateSvc::ATLAS_NOT_THREAD_SAFE | ( | StatusCode(T1::*)(IOVSVC_CALLBACK_ARGS) | fcn1, |
const T1 * | obj1, | ||
StatusCode(T2::*)(IOVSVC_CALLBACK_ARGS) | fcn2, | ||
const T2 * | obj2, | ||
bool | trigger = false |
||
) |
register a callback function(2) with an already registered function(1)
StatusCode regFcn StoreGateSvc::ATLAS_NOT_THREAD_SAFE | ( | StatusCode(T::*)(IOVSVC_CALLBACK_ARGS) | updFcn, |
const T * | obj, | ||
const DataHandle< H > & | handle, | ||
const TKEY & | key, | ||
bool | trigger = false |
||
) |
register a callback function, with handle + key
StatusCode regFcn StoreGateSvc::ATLAS_NOT_THREAD_SAFE | ( | StatusCode(T::*)(IOVSVC_CALLBACK_ARGS) | updFcn, |
const T * | obj, | ||
DataHandle< H > & | handle, | ||
const TKEY & | key, | ||
bool | trigger = false |
||
) |
register a callback function, with handle + key. Non const. Error
|
virtualinherited |
Tell the store that a handle has been bound to a proxy.
handle | The handle that was bound. The default implementation does nothing. |
Reimplemented in SGImplSvc.
Definition at line 23 of file IProxyDict.cxx.
|
private |
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method correctly updates SGSvc internals
Definition at line 436 of file StoreGateSvc.cxx.
|
finaloverridevirtual |
clear DataStore contents: called by the event loop mgrs
forceRemove | if true remove proxies ignoring their resetOnly flag |
Implements IHiveStoreMgr.
Definition at line 450 of file StoreGateSvc.cxx.
Retrieve the main CLID
of the object recorded in StoreGate
with the given "key" WARNING: slow!
Return all CLIDs in the store.
Definition at line 305 of file StoreGateSvc.cxx.
Retrieve all the CLID
s (including symlinks) of the object recorded in StoreGate
with the given "key" WARNING: slow!
|
finaloverridevirtual |
Reset handles added since the last call to commit.
Implements IHiveStoreMgr.
Definition at line 94 of file StoreGateSvc.cxx.
Look up a keyed object in TDS by CLID.
returns false if object not available in TDS or persistent stores Usage: if (!p_store->contains(FooID, "fooKey")) { ... }
bool StoreGateSvc::contains | ( | const TKEY & | key | ) | const |
Look up a keyed object in TDS (compare also tryRetrieve) returns false if object not available in TDS or persistent stores Usage: if (!p_store->contains<Foo>("fooKey")) { ...
}
SG::WPtr<T> StoreGateSvc::create | ( | const TKEY & | key, |
ARGS... | constructorArgs | ||
) |
Create an object with one of its constructors and record it with a key.
key | a string (or an object convertible to a string) identifying the object within the event |
constructorArgs | a variable list of args passed to the constructor |
creates a key internally if none specified by client
|
overridevirtual |
Call converter to create an object, with locking.
cvt | The converter to call. |
addr | Opaque address information for the object to create. |
refpObject | Reference to location of the pointer of the created object. |
This calls the createObj
method on cvt
to create the referenced transient object, locking the store during the call.
Reimplemented from IProxyDict.
Definition at line 518 of file StoreGateSvc.cxx.
|
staticprivate |
Definition at line 86 of file StoreGateSvc.cxx.
|
static |
|
inherited |
Declare interface ID.
|
inherited |
|
inherited |
std::string StoreGateSvc::dump | ( | ) | const |
dump objects in store.
request forwarded to DataStore this is triggered at EndEvent setting the Dump property to true
Definition at line 376 of file StoreGateSvc.cxx.
|
private |
throw away bad objects
Definition at line 462 of file StoreGateSvc.cxx.
|
overridevirtual |
Definition at line 206 of file StoreGateSvc.cxx.
|
finaloverridevirtual |
Definition at line 199 of file StoreGateSvc.cxx.
|
inlinefinaloverridevirtual |
implements IHiveStore interface
Implements IHiveStore.
Definition at line 479 of file StoreGateSvc.h.
|
overridevirtual |
Service initialization.
Definition at line 119 of file StoreGateSvc.cxx.
|
static |
Should rather be in IStoreGateSvc.h if we had one.
Definition at line 467 of file StoreGateSvc.cxx.
|
private |
void StoreGateSvc::keys | ( | const CLID & | id, |
std::vector< std::string > & | vkeys, | ||
bool | includeAlias = false , |
||
bool | onlyValid = true |
||
) | const |
provide list of all StoreGate keys associated with an object.
usage: p_store->keys(CLID, vkeys, optionalFlags);
id | CLID for which we are requesting list of keys |
vkeys | will be filled with the (possibly empty) list of keys |
includeAlias | (default false) add alias keys as well |
onlyValid | (default true) add only keys of valid dobjs |
void StoreGateSvc::keys | ( | std::vector< std::string > & | vkeys, |
bool | includeAlias = false , |
||
bool | onlyValid = true |
||
) | const |
provide list of all StoreGate keys associated with an object.
usage: p_store->keys<T>(vkeys, optional flags);
vkeys | will be filled with the (possibly empty) list of keys |
includeAlias | (default false) add alias keys as well |
onlyValid | (default true) add only keys of valid dobjs |
Find the string corresponding to a given key.
key | The key to look up. |
stringToKey()
or registerKey()
. Implements IStringPool.
|
finaloverridevirtual |
Find the string and CLID corresponding to a given key.
key | The key to look up. |
clid[out] | The found CLID. |
stringToKey()
or registerKey()
. Implements IStringPool.
StatusCode StoreGateSvc::loadEventProxies | ( | ) |
load proxies at begin event
Definition at line 442 of file StoreGateSvc.cxx.
void StoreGateSvc::makeCurrent | ( | ) |
The current store is becoming the active store.
Switch the allocation arena, and call SG::CurrentEventStore::setStore NOTE: No longer only intended to be called by ActiveStoreSvc.
Make this the current StoreGate, switch the allocation arena, and call sg::currenteventstore::setstore
Definition at line 496 of file StoreGateSvc.cxx.
|
private |
callback for output level property
|
private |
StatusCode StoreGateSvc::overwrite | ( | std::unique_ptr< T > | pUnique, |
const TKEY & | key | ||
) |
Record an object with a key, overwriting any existing object with same key, take ownership of the unique_ptr obj.
StatusCode StoreGateSvc::overwrite | ( | std::unique_ptr< T > | pUnique, |
const TKEY & | key, | ||
bool | allowMods, | ||
bool | noHist = false |
||
) |
Record an object with a key, overwriting any existing object with same key.
StatusCode StoreGateSvc::overwrite | ( | T * | p2BRegistered, |
const TKEY & | key | ||
) |
Record an object with a key, overwriting any existing object with same key.
StatusCode StoreGateSvc::overwrite | ( | T * | p2BRegistered, |
const TKEY & | key, | ||
bool | allowMods, | ||
bool | noHist = false |
||
) |
Record an object with a key, overwriting any existing object with same key.
|
private |
|
private |
Print out a list of bad calls during finalization.
bad | List of bad calls. |
what | Description of the operation. |
Definition at line 555 of file StoreGateSvc.cxx.
|
finaloverridevirtual |
return the list of all current proxies in store
Implements IProxyDict.
Definition at line 298 of file StoreGateSvc.cxx.
|
finalvirtual |
get default proxy with given id. Returns 0 to flag failure
|
finalvirtual |
get default proxy with given id, optionally checking validity.
SG::DataProxy* StoreGateSvc::proxy | ( | const CLID & | id, |
const char * | key | ||
) | const |
get proxy with given id and key.
Returns 0 to flag failure (overload to prevent a char* to be interpreted as a bool.)
|
inlinefinalvirtual |
get proxy with given id and key, optionally checking validity.
Definition at line 607 of file StoreGateSvc.h.
|
finaloverridevirtual |
get proxy with given id and key. Returns 0 to flag failure
Implements IProxyDict.
|
finalvirtual |
get proxy with given id and key, optionally checking validity.
|
finaloverridevirtual |
get proxy for a given data object address in memory
Implements IProxyDict.
|
finaloverridevirtual |
Get proxy given a hashed key+clid.
Find an exact match; no handling of aliases, etc. Returns 0 to flag failure.
Implements IProxyDict.
IProxyProviderSvc* StoreGateSvc::proxyProviderSvc | ( | ) |
Return current ProxyProviderSvc.
|
private |
return a range to all proxies of a given CLID
Definition at line 423 of file StoreGateSvc.cxx.
|
overridevirtual |
Definition at line 471 of file StoreGateSvc.cxx.
StatusCode StoreGateSvc::record | ( | const T * | p2BRegistered, |
const TKEY & | key | ||
) |
Record a const object with a key.
StatusCode StoreGateSvc::record | ( | std::unique_ptr< const T > | pUnique, |
const TKEY & | key | ||
) |
Record a const object with a key.
StatusCode StoreGateSvc::record | ( | std::unique_ptr< T > | pUnique, |
const TKEY & | key | ||
) |
Record an object with a key, take ownership of the unique_ptr obj.
StatusCode StoreGateSvc::record | ( | std::unique_ptr< T > | pUnique, |
const TKEY & | key, | ||
bool | allowMods, | ||
bool | resetOnly = true , |
||
bool | noHist = false |
||
) |
Record an object with a key, allow possibility of specifying const-access.
StatusCode StoreGateSvc::record | ( | T * | p2BRegistered, |
const TKEY & | key | ||
) |
Record an object with a key.
StatusCode StoreGateSvc::record | ( | T * | p2BRegistered, |
const TKEY & | key, | ||
bool | allowMods, | ||
bool | resetOnly = true , |
||
bool | noHist = false |
||
) |
Record an object with a key, allow possibility of specifying const-access.
|
private |
StatusCode StoreGateSvc::recordAddress | ( | const std::string & | skey, |
IOpaqueAddress * | pAddress, | ||
bool | clearAddressFlag = true |
||
) |
Create a proxy object using an IOpaqueAddress and a transient key.
StatusCode StoreGateSvc::recordAddress | ( | IOpaqueAddress * | pAddress, |
bool | clearAddressFlag = true |
||
) |
Create a proxy object using an IOpaqueAddress.
|
finaloverridevirtual |
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. If the object has been recorded under a different key, then make an alias. If the object has been recorded under a different clid, then make a link. |
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.
Implements IProxyDict.
Definition at line 287 of file StoreGateSvc.cxx.
|
private |
put a bad (unrecordable) dobj away
StatusCode StoreGateSvc::regHandle | ( | DataHandle< H > & | handle, |
const TKEY & | key | ||
) |
non-const method - will return an error
|
finaloverridevirtual |
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.
Implements IStringPool.
Definition at line 404 of file StoreGateSvc.cxx.
release object held by proxy, if any.
Gives up ownership (somebody else must take charge)
Definition at line 431 of file StoreGateSvc.cxx.
void StoreGateSvc::remap | ( | CLID | clid, |
const TKEY & | source, | ||
const TKEY & | target, | ||
off_t | index_offset | ||
) |
Declare a remapping.
clid Class ID of the container being remapped.
source Key of the container being remapped.
target Key of the container being remapped to.
index_offset Amount by which the index should be adjusted between the two containers.
This can be used to change the container to which ElementLink's
(and DataLink's
) point on output.
For example, suppose you have two containers of type T, A and B. There possibly are ElementLink's
pointing at elements contained in them. You want to change to a single container C, containing the contents of A and B concatenated. To get ElementLink's
updated on output, you can do:
Declare a remapping.
source Key hash of the container being remapped.
target Key hash of the container being remapped to.
index_offset Amount by which the index should be adjusted between the two containers.
Definition at line 410 of file StoreGateSvc.cxx.
|
private |
Remember that retrieve or record was called for a MT store.
bad | The list on which to store the operation. |
clid | CLID of the operation. |
key | Key of the operation. |
Definition at line 532 of file StoreGateSvc.cxx.
Remember that retrieve() was called for a MT store.
clid | CLID of the operation. |
key | Key of the operation. |
Remember that retrieve() was called for a MT store.
clid | CLID of the operation. |
key | Key of the operation. |
StatusCode StoreGateSvc::remove | ( | const T * | pObject | ) |
Remove pObject, will remove its proxy if not reset only.
StatusCode StoreGateSvc::removeDataAndProxy | ( | const T * | pObject | ) |
Remove pObject and its proxy no matter what.
|
private |
remove proxy from store, unless it is reset only.
provide pTrans!=0 (must match proxy...) to save time
forceRemove | remove the proxy no matter what DO NOT USE THIS FUNCTION! IT IS UNSAFE AND IS LIKELY TO BE REMOVED! |
Definition at line 501 of file StoreGateSvc.cxx.
T* StoreGateSvc::retrieve | ( | ) | const |
Variant of the above which doesn't return a status code.
Just returns null if the object isn't found.
StatusCode StoreGateSvc::retrieve | ( | const T *& | ptr | ) | const |
Retrieve the default object into a const T*.
StatusCode StoreGateSvc::retrieve | ( | const T *& | ptr, |
const std::string & | key | ||
) | const |
Retrieve an object with "key", into a const T*.
Overload for std::string KEY type
StatusCode StoreGateSvc::retrieve | ( | const T *& | ptr, |
const TKEY & | key | ||
) | const |
Retrieve an object with "key", into a const T*.
T* StoreGateSvc::retrieve | ( | const TKEY & | key | ) | const |
Variant of the above which doesn't return a status code.
Just returns null if the object isn't found.
StatusCode StoreGateSvc::retrieve | ( | SG::ConstIterator< T > & | begin, |
SG::ConstIterator< T > & | end | ||
) | const |
Retrieve all objects of type T: returns an SG::ConstIterator range.
StatusCode StoreGateSvc::retrieve | ( | T *& | ptr | ) | const |
Retrieve the default object into a T*.
StatusCode StoreGateSvc::retrieve | ( | T *& | ptr, |
const std::string & | key | ||
) | const |
Retrieve an object with "key", into a T*.
Overload for std::string KEY type
StatusCode StoreGateSvc::retrieve | ( | T *& | ptr, |
const TKEY & | key | ||
) | const |
Retrieve an object with "key", into a T*.
StatusCode StoreGateSvc::retrieveAllVersions | ( | std::list< SG::ObjectWithVersion< T > > & | allVersions, |
const TKEY & | requestedKey | ||
) | const |
Retrieve all versions of a given T,KEY combination sets allVersions, a ref to a vector of ObjectWithVersion<T> If there is only one available version of this dataObject allVersions[0].versionedKey is set to requestedKey.
StatusCode StoreGateSvc::retrieveHighestVersion | ( | SG::ObjectWithVersion< T > & | dobjWithVersion, |
const TKEY & | requestedKey | ||
) | const |
Retrieve version with highest cycle number for a given T,KEY combination If there is only one available version of this data object the returned ObjectWithVersion<T>.versionedKey is set to requestedKey NOTICE that this method is significantly slower than retrieve(const T*, const TKEY&) which returns the last recorded version rather than the one with the highest cycle number.
std::unique_ptr<T> StoreGateSvc::retrieveUniquePrivateCopy | ( | const std::string & | key | ) |
EXPERTS ONLY: like readPrivateCopy this method returns your own private copy of a data object of type T and given key, if available and locked.
The difference is that it will return you also an object in SG transient memory. Since we are taking ownership of it, the object in SG will be released after retrievePrivateCopy returns, making all cached references to the object potentially invalid and obviously preventing it from being written out. Sequencing becomes critical. Caveat emptor!
key | The key to use for the lookup. |
StatusCode StoreGateSvc::setAlias | ( | const T * | p2BAliased, |
const AKEY & | aliasKey | ||
) |
make an alias to a DataObject (provide only valid pointer)
StatusCode StoreGateSvc::setAlias | ( | const T * | p2BAliased, |
const TKEY & | key, | ||
const AKEY & | aliasKey | ||
) |
make an alias to a DataObject (provide data type and old key)
StatusCode StoreGateSvc::setAlias | ( | SG::DataProxy * | proxy, |
const std::string & | aliasKey | ||
) |
make an alias to a DataObject (provide valid proxy)
StatusCode StoreGateSvc::setConst | ( | const void * | pointer | ) |
prevent downstream clients from modifying the pointed-at dobj
Definition at line 112 of file StoreGateSvc.cxx.
void StoreGateSvc::setDefaultStore | ( | SGImplSvc * | pStore | ) |
set pointer to default event store: used by ActiveStoreSvc
Definition at line 55 of file StoreGateSvc.cxx.
void StoreGateSvc::setProxyProviderSvc | ( | IProxyProviderSvc * | pPPSvc | ) |
associate ProxyProviderSvc to this store
|
static |
set the hive event slot pointer: used by the event loop mgrs
Definition at line 62 of file StoreGateSvc.cxx.
void StoreGateSvc::setStoreID | ( | StoreID::type | id | ) |
set store ID. request forwarded to DataStore:
set store id in DataStore:
Definition at line 359 of file StoreGateSvc.cxx.
|
private |
try to locate a proxy or create it if needed
|
overridevirtual |
Return the metadata source ID for the current event slot.
key | SG key of the DataHeader to query. Returns an empty string if no source has been set. |
The default version always returns an empty string.
Reimplemented from IProxyDict.
|
overridevirtual |
Service start.
Definition at line 183 of file StoreGateSvc.cxx.
StoreID::type StoreGateSvc::storeID | ( | ) | const |
get store ID. request forwarded to DataStore:
|
finaloverridevirtual |
Find the key for a string/CLID pair.
str | The string to look up. |
clid | The CLID associated with the string. |
Implements IStringPool.
Definition at line 389 of file StoreGateSvc.cxx.
StatusCode StoreGateSvc::symLink | ( | const CLID | id, |
const TKEY & | key, | ||
const CLID | linkid | ||
) |
make a soft link to the object pointed by id/key
StatusCode StoreGateSvc::symLink | ( | const T * | p2BRegistered, |
const TLINK * | p2BLinked | ||
) |
make a soft link to the object T* already registered (const link)
StatusCode StoreGateSvc::symLink | ( | const T * | p2BRegistered, |
TLINK * | p2BLinked | ||
) |
make a soft link to the object T* already registered (non-const)
|
private |
forwarded to DataStore
bool StoreGateSvc::transientContains | ( | const CLID & | id, |
const TKEY & | key | ||
) | const |
Look up a transient data object in TDS only by CLID.
returns false if object not available in TDS
bool StoreGateSvc::transientContains | ( | const TKEY & | key | ) | const |
Look up a transient data object in TDS only (no Proxy lookup) returns false if object not available in TDS Usage: if (!p_store->contains<Foo>("fooKey")) { ...
}
SG::DataProxy * StoreGateSvc::transientProxy | ( | const CLID & | id, |
const std::string & | key | ||
) | const |
get proxy with given id and key.
Does not query ProxyProviderSvc.
Definition at line 314 of file StoreGateSvc.cxx.
bool StoreGateSvc::transientSwap | ( | const CLID & | id, |
const std::string & | keyA, | ||
const std::string & | keyB | ||
) |
swap the content of 2 keys payload A indexed by keyA will now be accessed via keyB and vice versa Note that the swap is invalidated at event boundaries and/or when somebody clear the store.
Definition at line 332 of file StoreGateSvc.cxx.
const T* StoreGateSvc::tryConstRetrieve | ( | ) | const |
const T* StoreGateSvc::tryConstRetrieve | ( | const TKEY & | key | ) | const |
|
finaloverridevirtual |
Test to see if the target of an ElementLink has moved.
sgkey_in | Original hashed key of the EL. |
index_in | Original index of the EL. |
sgkey_out[out] | New hashed key for the EL. |
index_out[out] | New index for the EL. |
Reimplemented from IProxyDict.
Definition at line 417 of file StoreGateSvc.cxx.
T* StoreGateSvc::tryRetrieve | ( | ) | const |
Variant of the above which doesn't print a warning message.
Just returns null if the object isn't found. Compare to contains
T* StoreGateSvc::tryRetrieve | ( | const TKEY & | key | ) | const |
Variant of the above which doesn't print a warning message.
Just returns null if the object isn't found. Compare to contains
int StoreGateSvc::typeCount | ( | ) | const |
Return the number of instances of an object of type T int i = p_store->typeCount<T>();
Note that this will return the number of proxies in transient memory only, will not check with proxy providers.
Return the number of instances of type T (input CLID)
|
private |
same as typeless_record, allows to overwrite an object in memory or on disk
Definition at line 348 of file StoreGateSvc.cxx.
|
private |
type-less recording of an object with a key, allow possibility of specifying const-access and history record
Definition at line 340 of file StoreGateSvc.cxx.
|
virtualinherited |
Tell the store that a handle has been unbound from a proxy.
handle | The handle that was unbound. The default implementation does nothing. |
Reimplemented in SGImplSvc.
Definition at line 33 of file IProxyDict.cxx.
|
friend |
|
friend |
|
friend |
access proxyRange()
Definition at line 823 of file StoreGateSvc.h.
|
friend |
access clearProxyPayload
Definition at line 839 of file StoreGateSvc.h.
|
friend |
Definition at line 840 of file StoreGateSvc.h.
|
friend |
access emptyTrash
Definition at line 837 of file StoreGateSvc.h.
|
friend |
Definition at line 817 of file StoreGateSvc.h.
|
friend |
Definition at line 814 of file StoreGateSvc.h.
|
friend |
access typeless_record
Definition at line 851 of file StoreGateSvc.h.
|
friend |
Definition at line 841 of file StoreGateSvc.h.
|
friend |
FIXME: access releaseObject.
Definition at line 830 of file StoreGateSvc.h.
|
mutableprivate |
Remember calls to retrieve and record for a MT store, so we can warn about them during finalize().
Definition at line 944 of file StoreGateSvc.h.
|
mutableprivate |
Definition at line 945 of file StoreGateSvc.h.
|
private |
property: activate the history service
Definition at line 921 of file StoreGateSvc.h.
|
private |
Algorithm context, for tracking bad calls.
Definition at line 928 of file StoreGateSvc.h.
|
mutableprivate |
Definition at line 950 of file StoreGateSvc.h.
|
private |
Definition at line 809 of file StoreGateSvc.h.
|
private |
DumpArena Property flag : trigger m_arena->report() at clearStore.
Definition at line 922 of file StoreGateSvc.h.
|
private |
property Dump: triggers dump() at EndEvent
Definition at line 920 of file StoreGateSvc.h.
|
private |
property
Definition at line 811 of file StoreGateSvc.h.
|
private |
property
Definition at line 810 of file StoreGateSvc.h.
|
private |
Cache store type in the facade class.
Definition at line 925 of file StoreGateSvc.h.