ATLAS Offline Software
Classes | Public Member Functions | List of all members
StoreGateSvc Class Reference

The Athena Transient Store API. More...

#include <StoreGateSvc.h>

Inheritance diagram for StoreGateSvc:
Collaboration diagram for StoreGateSvc:

Classes

struct  BadListItem
 

Public Member Functions

 DeclareInterfaceID (IProxyDict, 2, 0)
 
 DeclareInterfaceID (INamedInterface, 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)
 
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::DataProxyproxy (const void *const pTransient) const override final
 get proxy for a given data object address in memory More...
 
virtual SG::DataProxyproxy (const CLID &id) const final
 get default proxy with given id. Returns 0 to flag failure More...
 
virtual SG::DataProxyproxy (const CLID &id, const std::string &key) const override final
 get proxy with given id and key. Returns 0 to flag failure More...
 
SG::DataProxyproxy (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::DataProxyrecordObject (SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override final
 Record an object in the store. More...
 
virtual SG::DataProxyproxy_exact (SG::sgkey_t sgkey) const override final
 Get proxy given a hashed key+clid. More...
 
more proxy dictionary functionality
virtual SG::DataProxyproxy (const CLID &id, bool checkValid) const final
 get default proxy with given id, optionally checking validity. More...
 
virtual SG::DataProxyproxy (const CLID &id, const std::string &key, bool checkValid) const final
 get proxy with given id and key, optionally checking validity. More...
 
virtual SG::DataProxyproxy (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< CLIDclids () const
 Return all CLIDs in the store. More...
 
SG::DataProxytransientProxy (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...
 
IProxyProviderSvcproxyProviderSvc ()
 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< CLIDclids (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 ::IProxyDicthiveProxyDict () override final
 implements IHiveStore interface More...
 
static StoreGateSvccurrentStoreGate ()
 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_tlock_t
 
SGImplSvcm_defaultStore
 
ServiceHandle< IProxyProviderSvcm_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 PerfMon::StorePayloadMon
 
class SG::VarHandleBase
 access typeless_record More...
 
void AthenaInternal::py_sg_clearProxyPayload (StoreGateSvc *, SG::DataProxy *)
 
PyObjectAthenaInternal::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::HiveEventSlotcurrentSlot ()
 
SGImplSvccurrentStore () 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::DataProxysetupProxy (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 &)
 
StoreGateSvcoperator= (const StoreGateSvc &)
 

Detailed Description

The Athena Transient Store API.

Parameters
Dumpproperty (default false): set to call dump() at EndEvent
FolderNameListproperty (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.
Author
ATLAS Collaboration
Id
SGStoreGateSvc.h 549999 2013-06-06 00:26:39Z calaf

Definition at line 122 of file StoreGateSvc.h.

Member Typedef Documentation

◆ BadItemList

typedef std::unordered_set<BadListItem, DataObjID_Hasher> StoreGateSvc::BadItemList
private

Definition at line 943 of file StoreGateSvc.h.

◆ lock_t

typedef std::lock_guard<mutex_t> StoreGateSvc::lock_t
private

Definition at line 953 of file StoreGateSvc.h.

◆ mutex_t

typedef std::mutex StoreGateSvc::mutex_t
private

Protect access to m_bad* members.

Definition at line 952 of file StoreGateSvc.h.

◆ sgkey_t

Definition at line 649 of file StoreGateSvc.h.

Constructor & Destructor Documentation

◆ StoreGateSvc() [1/2]

StoreGateSvc::StoreGateSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Standard Constructor.

Definition at line 28 of file StoreGateSvc.cxx.

28  :
29  Service(name,svc),
30  m_defaultStore(0),
31  m_pPPSHandle("ProxyProviderSvc", name),
32  m_incSvc("IncidentSvc", name),
34  m_algContextSvc ("AlgContextSvc", name)
35 {
36 
37 
38  //our properties
39  //properties of SGImplSvc
40  declareProperty("Dump", m_DumpStore=false, "Dump contents at EndEvent");
41  declareProperty("ActivateHistory", m_ActivateHistory=false, "record DataObjects history");
42  declareProperty("DumpArena", m_DumpArena=false, "Dump Arena usage stats");
43  declareProperty("ProxyProviderSvc", m_pPPSHandle);
44  declareProperty("IncidentSvc", m_incSvc);
45 
46  //add handler for Service base class property
47  //FIXME m_outputLevel.declareUpdateHandler(&SGImplSvc::msg_update_handler, this);
48 }

◆ ~StoreGateSvc()

StoreGateSvc::~StoreGateSvc ( )
overridevirtual

Standard Destructor.

Definition at line 51 of file StoreGateSvc.cxx.

52 {}

◆ StoreGateSvc() [2/2]

StoreGateSvc::StoreGateSvc ( const StoreGateSvc )
private

Member Function Documentation

◆ accessData() [1/2]

DataObject * StoreGateSvc::accessData ( const CLID id) const

find proxy and access its data. Returns 0 to flag failure

Definition at line 332 of file StoreGateSvc.cxx.

332  {
333  _SGXCALL(accessData, (id), 0);
334 }

◆ accessData() [2/2]

DataObject * StoreGateSvc::accessData ( const CLID id,
const std::string &  key 
) const

find proxy and access its data. Returns 0 to flag failure

Definition at line 338 of file StoreGateSvc.cxx.

338  {
339  _SGXCALL(accessData, (id, key), 0);
340 }

◆ addAlias()

StatusCode StoreGateSvc::addAlias ( const std::string &  aliasKey,
SG::DataProxy dp 
)
private

◆ addAutoSymLinks()

void StoreGateSvc::addAutoSymLinks ( const std::string &  key,
CLID  clid,
SG::DataProxy dp,
const std::type_info *  tinfo,
bool  warn_nobib = true 
)
private

Add automatically-made symlinks for DP.

◆ addSymLink()

StatusCode StoreGateSvc::addSymLink ( const CLID linkid,
SG::DataProxy dp 
)
private

◆ addToStore()

StatusCode StoreGateSvc::addToStore ( CLID  id,
SG::DataProxy proxy 
)
finaloverridevirtual

Raw addition of a proxy to the store.

Parameters
idCLID of object being added.
proxyproxy to add.

Implements IProxyDict.

Definition at line 271 of file StoreGateSvc.cxx.

272 {
273  _SGXCALL(addToStore, (id, proxy), StatusCode::FAILURE);
274 }

◆ associateAux() [1/2]

template<class DOBJ >
bool StoreGateSvc::associateAux ( const DOBJ *  ,
const std::string &  key,
bool  ignoreMissing = true 
) const
private

◆ associateAux() [2/2]

template<class DOBJ >
bool StoreGateSvc::associateAux ( DOBJ *  ,
const std::string &  key,
bool  ignoreMissing = true 
) const
private

try to associate a data object to its auxiliary store if ignoreMissing=false

Returns
false if the aux store is not found.
Parameters
keyThe key to use for the lookup.

◆ associateAux_impl() [1/2]

template<class DOBJ >
bool StoreGateSvc::associateAux_impl ( DOBJ *  ,
const std::string &  ,
const SG::NoAuxStore  
) const
private

◆ associateAux_impl() [2/2]

template<class DOBJ , class AUXSTORE >
bool StoreGateSvc::associateAux_impl ( DOBJ *  ptr,
const std::string &  key,
const AUXSTORE *   
) const
private

◆ ATLAS_NOT_THREAD_SAFE() [1/6]

template<typename H , typename TKEY >
StatusCode regHandle StoreGateSvc::ATLAS_NOT_THREAD_SAFE ( const DataHandle< H > &  handle,
const TKEY &  key 
)

◆ ATLAS_NOT_THREAD_SAFE() [2/6]

template<typename T , typename TKEY >
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();

◆ ATLAS_NOT_THREAD_SAFE() [3/6]

template<typename T2 >
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

◆ ATLAS_NOT_THREAD_SAFE() [4/6]

template<typename T1 , typename T2 >
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)

◆ ATLAS_NOT_THREAD_SAFE() [5/6]

template<typename T , typename H , typename TKEY >
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

◆ ATLAS_NOT_THREAD_SAFE() [6/6]

template<typename T , typename H , typename TKEY >
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

◆ boundHandle()

void IProxyDict::boundHandle ( IResetable handle)
virtualinherited

Tell the store that a handle has been bound to a proxy.

Parameters
handleThe handle that was bound. The default implementation does nothing.

Reimplemented in SGImplSvc, SGTest::TestStore, SimpleView, and SG::View.

Definition at line 23 of file IProxyDict.cxx.

24 {
25 }

◆ clearProxyPayload()

void StoreGateSvc::clearProxyPayload ( SG::DataProxy proxy)
private

use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method correctly updates SGSvc internals

Definition at line 447 of file StoreGateSvc.cxx.

447  {
448  _SGVOIDCALL( clearProxyPayload, (proxy) );
449 }

◆ clearStore()

StatusCode StoreGateSvc::clearStore ( bool  forceRemove = false)
finaloverridevirtual

clear DataStore contents: called by the event loop mgrs

Parameters
forceRemoveif true remove proxies ignoring their resetOnly flag

Implements IHiveStoreMgr.

Definition at line 461 of file StoreGateSvc.cxx.

462 {
463  StatusCode sc = currentStore()->clearStore(forceRemove);
464 
465  // Send a notification that the store was cleared.
466  if (sc.isSuccess()) {
467  m_incSvc->fireIncident(StoreClearedIncident (this, name()));
468  }
469  return sc;
470 }

◆ clid()

template<typename TKEY >
CLID StoreGateSvc::clid ( const TKEY &  key) const

Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!

◆ clids() [1/2]

vector< CLID > StoreGateSvc::clids ( ) const

Return all CLIDs in the store.

Definition at line 316 of file StoreGateSvc.cxx.

317 {
318  vector<CLID> nullV;
319  _SGXCALL(clids, (), nullV);
320 }

◆ clids() [2/2]

template<typename TKEY >
std::vector<CLID> StoreGateSvc::clids ( const TKEY &  key) const

Retrieve all the CLID s (including symlinks) of the object recorded in StoreGate with the given "key" WARNING: slow!

◆ commitNewDataObjects()

void StoreGateSvc::commitNewDataObjects ( )
finaloverridevirtual

Reset handles added since the last call to commit.

Implements IHiveStoreMgr.

Definition at line 95 of file StoreGateSvc.cxx.

95  {
96  _SGVOIDCALL(commitNewDataObjects, ());
97 }

◆ contains() [1/2]

template<typename TKEY >
bool StoreGateSvc::contains ( const CLID id,
const TKEY &  key 
) const

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")) { ... }

◆ contains() [2/2]

template<typename T , typename TKEY >
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")) { ...

}

◆ create()

template<typename T , typename TKEY , typename... ARGS>
SG::WPtr<T> StoreGateSvc::create ( const TKEY &  key,
ARGS...  constructorArgs 
)

Create an object with one of its constructors and record it with a key.

Parameters
keya string (or an object convertible to a string) identifying the object within the event
constructorArgsa variable list of args passed to the constructor
Returns
a "pointer" to the created object (set to 0 if creation failed) Example: struct Foo { int m_i; int i() const { return m_i; } Foo(int i) : m_i(i) {} }; CLASS_DEF(Foo, 123456, 1); .... auto pFoo = pSG.create<Foo>("aFoo", 23); assert(pFoo->i()==23); assert(pSG.transientContains<Foo>("aFoo"));

◆ createKey()

std::string StoreGateSvc::createKey ( const CLID dataID)
private

creates a key internally if none specified by client

◆ createObj()

StatusCode StoreGateSvc::createObj ( IConverter *  cvt,
IOpaqueAddress *  addr,
DataObject *&  refpObject 
)
overridevirtual

Call converter to create an object, with locking.

Parameters
cvtThe converter to call.
addrOpaque address information for the object to create.
refpObjectReference 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 529 of file StoreGateSvc.cxx.

532 {
533  _SGXCALL( createObj, (cvt, addr, refpObject), StatusCode::FAILURE );
534 }

◆ currentSlot()

SG::HiveEventSlot * StoreGateSvc::currentSlot ( )
staticprivate

Definition at line 87 of file StoreGateSvc.cxx.

87  {
88  return currentHiveEventSlot;
89 }

◆ currentStore()

SGImplSvc* StoreGateSvc::currentStore ( ) const
private

returns pointer to the current SGImplSvc

◆ currentStoreGate()

StoreGateSvc * StoreGateSvc::currentStoreGate ( )
static

get current StoreGate

Definition at line 69 of file StoreGateSvc.cxx.

69  {
70  if (!::currentStoreGate) {
71  // this is a static function so we don't have many conveniences
72  ISvcLocator *svcLocator = Gaudi::svcLocator();
73  StoreGateSvc *sg = nullptr;
74  if (!svcLocator->service("StoreGateSvc/StoreGateSvc", sg, false)
75  .isSuccess()) {
76  throw GaudiException(
77  "Could not get \"StoreGateSvc\" to initialize currentStoreGate",
78  "StoreGateSvc", StatusCode::FAILURE);
79  }
80  sg->makeCurrent();
81  return sg;
82  }
83  return ::currentStoreGate;
84 }

◆ DeclareInterfaceID() [1/3]

IHiveStore::DeclareInterfaceID ( INamedInterface  ,
,
 
)
inherited

◆ DeclareInterfaceID() [2/3]

IHiveStore::DeclareInterfaceID ( INamedInterface  ,
,
 
)
inherited

◆ DeclareInterfaceID() [3/3]

IProxyDict::DeclareInterfaceID ( IProxyDict  ,
,
 
)
inherited

◆ dump()

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 387 of file StoreGateSvc.cxx.

387  {
388  std::string nullS;
389  _SGXCALL(dump, (), nullS);
390 }

◆ emptyTrash()

void StoreGateSvc::emptyTrash ( )
private

throw away bad objects

Definition at line 473 of file StoreGateSvc.cxx.

473  {
474  _SGVOIDCALL( emptyTrash, () );
475 }

◆ finalize()

StatusCode StoreGateSvc::finalize ( )
overridevirtual

Definition at line 217 of file StoreGateSvc.cxx.

217  {
219  verbose() << "Finalizing " << name() << endmsg;
220  if (m_defaultStore) {
221  // m_defaultStore is not active, so ServiceManager won't finalize it!
222  CHECK( m_defaultStore->finalize());
223  m_defaultStore->release();
224  }
225 
226  printBadList (m_badRetrieves, "retrieve()");
227  printBadList (m_badRecords, "record()");
228  return StatusCode::SUCCESS;
229 }

◆ handle()

void StoreGateSvc::handle ( const Incident &  inc)
finaloverridevirtual

Definition at line 210 of file StoreGateSvc.cxx.

210  {
211  currentStore()->handle(inc);
212 }

◆ hiveProxyDict()

virtual ::IProxyDict* StoreGateSvc::hiveProxyDict ( )
inlinefinaloverridevirtual

implements IHiveStore interface

Implements IHiveStore.

Definition at line 482 of file StoreGateSvc.h.

482  {
484  }

◆ initialize()

StatusCode StoreGateSvc::initialize ( )
overridevirtual

Service initialization.

Definition at line 120 of file StoreGateSvc.cxx.

120  {
121 
122  // Initialize service:
124 
125  verbose() << "Initializing " << name() << endmsg;
126 
127  // lifted from AlwaysPrivateToolSvc (see Wim comment about lack of global jo svc accessor
128  // retrieve the job options svc (TODO: the code below relies heavily on
129  // internals; figure out if there's no global getJobOptionsSvc() ... )
130  IAppMgrUI* appmgr = Gaudi::createApplicationMgr();
131  IProperty* appmgrprop = 0;
132  appmgr->queryInterface( IProperty::interfaceID(), (void**)&appmgrprop ).ignore();
133  //all of the above to get the jo svc type
134  const Gaudi::Details::PropertyBase& prop = appmgrprop->getProperty( "JobOptionsSvcType" );
135  Gaudi::Interfaces::IOptionsSvc* pJOSvc(0);
136  if ( serviceLocator()->service( prop.toString(), "JobOptionsSvc", pJOSvc ).isFailure() ) {
137  error() << "Failed to retrieve JobOptionsSvc" << endmsg;
138  }
139  //copy our properties to the prototype (default) SGImplSvc
140  const std::string implStoreName = name() + "_Impl";
141  for (const Gaudi::Details::PropertyBase* p : getProperties()) {
142  pJOSvc->set( implStoreName + "." + p->name(), p->toString() );
143  }
144  pJOSvc->release();
145  pJOSvc=0;
146 
147  //HACK ALERT: using createService rather then the customary service(...,CREATEIF=true) we set our pointer
148  // to SGImplSvc early (even before it is initialized). This should help take care of some initialize loops
149  // for example when we try to record an address from one of the address providers initialize methods
150 
151  std::string implStoreFullName = "SGImplSvc/" + implStoreName;
152  debug() << "trying to create store " << implStoreFullName << endmsg;
153 
154  ISvcManager* pSM(dynamic_cast<ISvcManager*>(&*serviceLocator()));
155  if (!pSM) std::abort();
156  m_defaultStore = dynamic_cast<SGImplSvc*>( (pSM->createService(implStoreFullName)).get() );
157 
158  if (!m_defaultStore) {
159  error() << "Could not create store " << implStoreFullName << endmsg;
160  return StatusCode::FAILURE;
161  }
162 
163  if ( m_defaultStore->sysInitialize().isSuccess() ) {
164  // createService returns to us a reference to the service; we shouldn't
165  // increment it again.
166  //m_defaultStore->addRef();
167 
168  // If this is the default event store (StoreGateSvc), then declare
169  // our arena as the default for memory allocations.
170  if (name() == "StoreGateSvc") {
171  m_defaultStore->makeCurrent();
172  }
173  } else {
174  error() << "Could not initialize default store " << implStoreFullName
175  << endmsg;
176  return StatusCode::FAILURE;
177  }
178  if ( !m_incSvc.retrieve().isSuccess() ) {
179  error() << "Could not locate IncidentSvc" << endmsg;
180  return StatusCode::FAILURE;
181  }
182 
183  // Don't retrieve m_activeStoreSvc here to prevent a possible
184  // initialization loop.
185 
186  const int PRIORITY=100;
187  m_incSvc->addListener(this, "EndEvent",PRIORITY);
188  m_incSvc->addListener(this, "BeginEvent", PRIORITY);
189 
190  return StatusCode::SUCCESS;
191 }

◆ interfaceID()

const InterfaceID & StoreGateSvc::interfaceID ( )
static

Should rather be in IStoreGateSvc.h if we had one.

Definition at line 478 of file StoreGateSvc.cxx.

478  {
479  static const InterfaceID IDStoreGateSvc("StoreGateSvc", 1, 0);
480  return IDStoreGateSvc;
481 }

◆ isSymLinked()

bool StoreGateSvc::isSymLinked ( const CLID linkID,
SG::DataProxy dp 
)
private

◆ keys() [1/2]

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);

Parameters
idCLID for which we are requesting list of keys
vkeyswill 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

◆ keys() [2/2]

template<typename T >
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);

Parameters
vkeyswill 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

◆ keyToString() [1/2]

virtual const std::string* StoreGateSvc::keyToString ( sgkey_t  key) const
finaloverridevirtual

Find the string corresponding to a given key.

Parameters
keyThe key to look up.
Returns
Pointer to the string found, or null. We can find keys as long as the corresponding string was given to either stringToKey() or registerKey().

Implements IStringPool.

◆ keyToString() [2/2]

virtual const std::string* StoreGateSvc::keyToString ( sgkey_t  key,
CLID clid 
) const
finaloverridevirtual

Find the string and CLID corresponding to a given key.

Parameters
keyThe key to look up.
clid[out]The found CLID.
Returns
Pointer to the string found, or null. We can find keys as long as the corresponding string was given to either stringToKey() or registerKey().

Implements IStringPool.

◆ loadEventProxies()

StatusCode StoreGateSvc::loadEventProxies ( )

load proxies at begin event

Definition at line 453 of file StoreGateSvc.cxx.

453  {
454  this->makeCurrent();
455  _SGXCALL(loadEventProxies, (), StatusCode::FAILURE);
456 }

◆ makeCurrent()

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 507 of file StoreGateSvc.cxx.

507  {
508  ::currentStoreGate = this;
509  _SGVOIDCALL (makeCurrent, ());
510 }

◆ msg_update_handler()

void StoreGateSvc::msg_update_handler ( Gaudi::Details::PropertyBase &  outputLevel)
private

callback for output level property

◆ operator=()

StoreGateSvc& StoreGateSvc::operator= ( const StoreGateSvc )
private

◆ overwrite() [1/4]

template<typename T , typename TKEY >
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.

◆ overwrite() [2/4]

template<typename T , typename TKEY >
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.

◆ overwrite() [3/4]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::overwrite ( T *  p2BRegistered,
const TKEY &  key 
)

Record an object with a key, overwriting any existing object with same key.

◆ overwrite() [4/4]

template<typename T , typename TKEY >
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.

◆ overwrite1()

template<typename T , typename TKEY >
StatusCode StoreGateSvc::overwrite1 ( DataObject *  obj,
T *  pObject,
const TKEY &  key,
bool  allowMods,
bool  noHist = false 
)
private

◆ printBadList()

void StoreGateSvc::printBadList ( const BadItemList bad,
const std::string &  what 
) const
private

Print out a list of bad calls during finalization.

Parameters
badList of bad calls.
whatDescription of the operation.

Definition at line 566 of file StoreGateSvc.cxx.

568 {
569  if (bad.empty()) return;
570  std::vector<std::string> lines;
571  for (const BadListItem& id : bad) {
572  lines.push_back (id.fullKey() + " [" + id.m_algo + "]");
573  }
574  std::sort (lines.begin(), lines.end());
575  warning() << "Called " << what << " on these objects in a MT store" << endmsg;
576  for (const std::string& s : lines) {
577  warning() << s << endmsg;
578  }
579 }

◆ proxies()

vector< const SG::DataProxy * > StoreGateSvc::proxies ( ) const
finaloverridevirtual

return the list of all current proxies in store

Implements IProxyDict.

Definition at line 309 of file StoreGateSvc.cxx.

309  {
310  vector<const SG::DataProxy*> nullV;
311  _SGXCALL(proxies, (), nullV);
312 }

◆ proxy() [1/7]

virtual SG::DataProxy* StoreGateSvc::proxy ( const CLID id) const
finalvirtual

get default proxy with given id. Returns 0 to flag failure

◆ proxy() [2/7]

virtual SG::DataProxy* StoreGateSvc::proxy ( const CLID id,
bool  checkValid 
) const
finalvirtual

get default proxy with given id, optionally checking validity.

Returns
0 to flag failure

◆ proxy() [3/7]

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.)

◆ proxy() [4/7]

virtual SG::DataProxy* StoreGateSvc::proxy ( const CLID id,
const char *  key,
bool  checkValid 
) const
inlinefinalvirtual

get proxy with given id and key, optionally checking validity.

Returns
0 to flag failure (overload to prevent a char* to be interpreted as a bool.)

Definition at line 610 of file StoreGateSvc.h.

611  { return this->proxy(id, std::string(key), checkValid); }

◆ proxy() [5/7]

virtual SG::DataProxy* StoreGateSvc::proxy ( const CLID id,
const std::string &  key 
) const
finaloverridevirtual

get proxy with given id and key. Returns 0 to flag failure

Implements IProxyDict.

◆ proxy() [6/7]

virtual SG::DataProxy* StoreGateSvc::proxy ( const CLID id,
const std::string &  key,
bool  checkValid 
) const
finalvirtual

get proxy with given id and key, optionally checking validity.

Returns
0 to flag failure

◆ proxy() [7/7]

virtual SG::DataProxy* StoreGateSvc::proxy ( const void *const  pTransient) const
finaloverridevirtual

get proxy for a given data object address in memory

Implements IProxyDict.

◆ proxy_exact()

virtual SG::DataProxy* StoreGateSvc::proxy_exact ( SG::sgkey_t  sgkey) const
finaloverridevirtual

Get proxy given a hashed key+clid.

Find an exact match; no handling of aliases, etc. Returns 0 to flag failure.

Implements IProxyDict.

◆ proxyProviderSvc()

IProxyProviderSvc* StoreGateSvc::proxyProviderSvc ( )

Return current ProxyProviderSvc.

◆ proxyRange()

StatusCode StoreGateSvc::proxyRange ( const CLID id,
SG::ConstProxyIterator beg,
SG::ConstProxyIterator end 
) const
private

return a range to all proxies of a given CLID

Definition at line 434 of file StoreGateSvc.cxx.

436  {
437  _SGXCALL( proxyRange, (id, beg, end), StatusCode::FAILURE );
438 }

◆ queryInterface()

StatusCode StoreGateSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
overridevirtual

Definition at line 482 of file StoreGateSvc.cxx.

483 {
484  if ( interfaceID().versionMatch(riid) ) {
485  *ppvInterface = (StoreGateSvc*)this;
486  }
487  else if ( IProxyDict::interfaceID().versionMatch(riid) ) {
488  *ppvInterface = (IProxyDict*)this;
489  }
490  else if ( IHiveStore::interfaceID().versionMatch(riid) ) {
491  *ppvInterface = (IHiveStore*)this;
492  }
493  else if ( IHiveStoreMgr::interfaceID().versionMatch(riid) ) {
494  *ppvInterface = (IHiveStoreMgr*)this;
495  }
496  else {
497  // Interface is not directly available: try out a base class
498  return Service::queryInterface(riid, ppvInterface);
499  }
500  addRef();
501  return StatusCode::SUCCESS;
502 }

◆ record() [1/6]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::record ( const T *  p2BRegistered,
const TKEY &  key 
)

Record a const object with a key.

◆ record() [2/6]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::record ( std::unique_ptr< const T >  pUnique,
const TKEY &  key 
)

Record a const object with a key.

◆ record() [3/6]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::record ( std::unique_ptr< T >  pUnique,
const TKEY &  key 
)

Record an object with a key, take ownership of the unique_ptr obj.

◆ record() [4/6]

template<typename T , typename TKEY >
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.


◆ record() [5/6]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::record ( T *  p2BRegistered,
const TKEY &  key 
)

Record an object with a key.

◆ record() [6/6]

template<typename T , typename TKEY >
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.


◆ record1()

template<typename T , typename TKEY >
StatusCode StoreGateSvc::record1 ( DataObject *  obj,
T *  pObject,
const TKEY &  key,
bool  allowMods,
bool  resetOnly = true,
bool  noHist = false 
)
private

◆ recordAddress() [1/2]

StatusCode StoreGateSvc::recordAddress ( const std::string &  skey,
IOpaqueAddress *  pAddress,
bool  clearAddressFlag = true 
)

Create a proxy object using an IOpaqueAddress and a transient key.

◆ recordAddress() [2/2]

StatusCode StoreGateSvc::recordAddress ( IOpaqueAddress *  pAddress,
bool  clearAddressFlag = true 
)

Create a proxy object using an IOpaqueAddress.

◆ recordObject()

SG::DataProxy * StoreGateSvc::recordObject ( SG::DataObjectSharedPtr< DataObject >  obj,
const std::string &  key,
bool  allowMods,
bool  returnExisting 
)
finaloverridevirtual

Record an object in the store.

Parameters
objThe data object to store.
keyThe key as which it should be stored.
allowModsIf false, the object will be recorded as const.
returnExistingIf 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 298 of file StoreGateSvc.cxx.

302 {
303  _SGXCALL(recordObject, (std::move(obj), key, allowMods, returnExisting), nullptr);
304 }

◆ recycle()

void StoreGateSvc::recycle ( DataObject *  pBadDObj)
private

put a bad (unrecordable) dobj away

◆ regHandle()

template<typename H , typename TKEY >
StatusCode StoreGateSvc::regHandle ( DataHandle< H > &  handle,
const TKEY &  key 
)

non-const method - will return an error

◆ registerKey()

void StoreGateSvc::registerKey ( sgkey_t  key,
const std::string &  str,
CLID  clidid 
)
finaloverridevirtual

Remember an additional mapping from key to string/CLID.

Parameters
keyThe key to enter.
strThe string to enter.
clidThe CLID associated with the string.
Returns
True if successful; false if the 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 415 of file StoreGateSvc.cxx.

417  {
418  _SGVOIDCALL( registerKey, (key, str, clidid) );
419 }

◆ releaseObject()

void StoreGateSvc::releaseObject ( const CLID id,
const std::string &  key 
)
private

release object held by proxy, if any.

Gives up ownership (somebody else must take charge)

Definition at line 442 of file StoreGateSvc.cxx.

442  {
443  _SGVOIDCALL( releaseObject, (id, key) );
444 }

◆ remap()

template<class TKEY >
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:

m_sg->remap (ClassID_traits<T>::ID(), "A", "C", 0);
m_sg->remap (ClassID_traits<T>::ID(), "B", "C", a.size());

◆ remap_impl()

void StoreGateSvc::remap_impl ( sgkey_t  source,
sgkey_t  target,
off_t  index_offset 
)

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 421 of file StoreGateSvc.cxx.

423  {
424  _SGVOIDCALL( remap_impl, (source, target, index_offset) );
425 }

◆ rememberBad()

void StoreGateSvc::rememberBad ( BadItemList bad,
CLID  clid,
const std::string &  key 
) const
private

Remember that retrieve or record was called for a MT store.

Parameters
badThe list on which to store the operation.
clidCLID of the operation.
keyKey of the operation.

Definition at line 543 of file StoreGateSvc.cxx.

545 {
546  if (m_storeID == StoreID::EVENT_STORE && currentHiveEventSlot != nullptr) {
547  lock_t lock (m_badMutex);
548  std::string algo;
549  if (m_algContextSvc.isValid()) {
550  if (IAlgorithm* alg = m_algContextSvc->currentAlg()) {
551  if (alg->type() == "AthenaOutputStream") return;
552  if (alg->type() == "AthIncFirerAlg") return;
553  algo = alg->type() + "/" + alg->name();
554  bad.insert (BadListItem (clid, key, algo));
555  }
556  }
557  }
558 }

◆ rememberBadRecord()

void StoreGateSvc::rememberBadRecord ( CLID  clid,
const std::string &  key 
) const
private

Remember that retrieve() was called for a MT store.

Parameters
clidCLID of the operation.
keyKey of the operation.

◆ rememberBadRetrieve()

void StoreGateSvc::rememberBadRetrieve ( CLID  clid,
const std::string &  key 
) const
private

Remember that retrieve() was called for a MT store.

Parameters
clidCLID of the operation.
keyKey of the operation.

◆ remove()

template<typename T >
StatusCode StoreGateSvc::remove ( const T *  pObject)

Remove pObject, will remove its proxy if not reset only.

◆ removeDataAndProxy()

template<typename T >
StatusCode StoreGateSvc::removeDataAndProxy ( const T *  pObject)

Remove pObject and its proxy no matter what.

◆ removeProxy()

StatusCode StoreGateSvc::removeProxy ( SG::DataProxy proxy,
const void *  pTrans,
bool  forceRemove = false 
)
private

remove proxy from store, unless it is reset only.


provide pTrans!=0 (must match proxy...) to save time

Parameters
forceRemoveremove the proxy no matter what DO NOT USE THIS FUNCTION! IT IS UNSAFE AND IS LIKELY TO BE REMOVED!

Definition at line 512 of file StoreGateSvc.cxx.

513  {
514  _SGXCALL(removeProxy, (proxy, pTrans, forceRemove), StatusCode::FAILURE);
515 }

◆ retrieve() [1/9]

template<typename T >
T* StoreGateSvc::retrieve ( ) const

Variant of the above which doesn't return a status code.

Just returns null if the object isn't found.

◆ retrieve() [2/9]

template<typename T >
StatusCode StoreGateSvc::retrieve ( const T *&  ptr) const

Retrieve the default object into a const T*.

◆ retrieve() [3/9]

template<typename 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

◆ retrieve() [4/9]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::retrieve ( const T *&  ptr,
const TKEY &  key 
) const

Retrieve an object with "key", into a const T*.

◆ retrieve() [5/9]

template<typename T , class TKEY >
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.

◆ retrieve() [6/9]

template<typename T >
StatusCode StoreGateSvc::retrieve ( SG::ConstIterator< T > &  begin,
SG::ConstIterator< T > &  end 
) const

Retrieve all objects of type T: returns an SG::ConstIterator range.

◆ retrieve() [7/9]

template<typename T >
StatusCode StoreGateSvc::retrieve ( T *&  ptr) const

Retrieve the default object into a T*.

◆ retrieve() [8/9]

template<typename 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

◆ retrieve() [9/9]

template<typename T , typename TKEY >
StatusCode StoreGateSvc::retrieve ( T *&  ptr,
const TKEY &  key 
) const

Retrieve an object with "key", into a T*.

◆ retrieveAllVersions()

template<typename T , class TKEY >
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.

Returns
StatusCode::FAILURE if no dataObject found

◆ retrieveHighestVersion()

template<typename T , class TKEY >
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.

Returns
StatusCode::FAILURE if no dataObject found

◆ retrieveUniquePrivateCopy()

template<typename T >
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!

Parameters
keyThe key to use for the lookup.
Returns
null unique_ptr if the object isn't found or if it is unlocked.

◆ setAlias() [1/3]

template<typename T , typename AKEY >
StatusCode StoreGateSvc::setAlias ( const T *  p2BAliased,
const AKEY &  aliasKey 
)

make an alias to a DataObject (provide only valid pointer)

◆ setAlias() [2/3]

template<typename T , typename TKEY , typename AKEY >
StatusCode StoreGateSvc::setAlias ( const T *  p2BAliased,
const TKEY &  key,
const AKEY &  aliasKey 
)

make an alias to a DataObject (provide data type and old key)

◆ setAlias() [3/3]

StatusCode StoreGateSvc::setAlias ( SG::DataProxy proxy,
const std::string &  aliasKey 
)

make an alias to a DataObject (provide valid proxy)

◆ setConst()

StatusCode StoreGateSvc::setConst ( const void *  pointer)

prevent downstream clients from modifying the pointed-at dobj

Definition at line 113 of file StoreGateSvc.cxx.

113  {
114  _SGXCALL(setConst, (pObject), StatusCode::FAILURE);
115 }

◆ setDefaultStore()

void StoreGateSvc::setDefaultStore ( SGImplSvc pStore)

set pointer to default event store: used by ActiveStoreSvc

Definition at line 55 of file StoreGateSvc.cxx.

55  {
56  if (m_defaultStore) m_defaultStore->release();
57  m_defaultStore = pStore;
58  if (m_defaultStore) m_defaultStore->addRef();
59 }

◆ setProxyProviderSvc()

void StoreGateSvc::setProxyProviderSvc ( IProxyProviderSvc pPPSvc)

associate ProxyProviderSvc to this store

◆ setSlot()

void StoreGateSvc::setSlot ( SG::HiveEventSlot pSlot)
static

set the hive event slot pointer: used by the event loop mgrs

Definition at line 62 of file StoreGateSvc.cxx.

62  {
63  currentHiveEventSlot=pSlot;
64  if ( 0 != currentHiveEventSlot) {
65  currentHiveEventSlot->pEvtStore->makeCurrent();
66  }
67 }

◆ setStoreID()

void StoreGateSvc::setStoreID ( StoreID::type  id)

set store ID. request forwarded to DataStore:

set store id in DataStore:

Definition at line 370 of file StoreGateSvc.cxx.

371 {
372  m_storeID = id;
373  // FIXME: should broadcast this to all instances.
374  _SGVOIDCALL(setStoreID,(id));
375 }

◆ setupProxy()

SG::DataProxy* StoreGateSvc::setupProxy ( const CLID dataID,
const std::string &  gK,
DataObject *  pDObj,
bool  allowMods,
bool  resetOnly 
)
private

try to locate a proxy or create it if needed

◆ sourceID()

virtual SG::SourceID StoreGateSvc::sourceID ( const std::string &  key = "EventSelector") const
overridevirtual

Return the metadata source ID for the current event slot.

Parameters
keySG 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.

◆ stop()

StatusCode StoreGateSvc::stop ( )
overridevirtual

Service start.

Definition at line 194 of file StoreGateSvc.cxx.

194  {
195  verbose() << "Stop " << name() << endmsg;
196  //HACK ALERT: ID event store objects refer to det store objects
197  //by setting an ad-hoc priority for event store(s) we make sure they are finalized and hence cleared first
198  // see e.g. https://savannah.cern.ch/bugs/index.php?99993
199  if (m_defaultStore->store()->storeID() == StoreID::EVENT_STORE) {
200  ISvcManager* pISM(dynamic_cast<ISvcManager*>(serviceLocator().get()));
201  if (!pISM)
202  return StatusCode::FAILURE;
203  pISM->setPriority(name(), pISM->getPriority(name())+1).ignore();
204  verbose() << "stop: setting service priority to " << pISM->getPriority(name())
205  << " so that event stores get finalized and cleared before other stores" <<endmsg;
206  }
207  return StatusCode::SUCCESS;
208 }

◆ storeID()

StoreID::type StoreGateSvc::storeID ( ) const

get store ID. request forwarded to DataStore:

◆ stringToKey()

StoreGateSvc::sgkey_t StoreGateSvc::stringToKey ( const std::string &  str,
CLID  clid 
)
finaloverridevirtual

Find the key for a string/CLID pair.

Parameters
strThe string to look up.
clidThe CLID associated with the string.
Returns
A key identifying the string. A given string will always return the same key. Will abort in case of a hash collision!

Implements IStringPool.

Definition at line 400 of file StoreGateSvc.cxx.

400  {
401  _SGXCALL( stringToKey, (str, clid), 0 );
402 }

◆ symLink() [1/3]

template<typename TKEY >
StatusCode StoreGateSvc::symLink ( const CLID  id,
const TKEY &  key,
const CLID  linkid 
)

make a soft link to the object pointed by id/key

◆ symLink() [2/3]

template<typename T , typename TLINK >
StatusCode StoreGateSvc::symLink ( const T *  p2BRegistered,
const TLINK *  p2BLinked 
)

make a soft link to the object T* already registered (const link)

◆ symLink() [3/3]

template<typename T , typename TLINK >
StatusCode StoreGateSvc::symLink ( const T *  p2BRegistered,
TLINK *  p2BLinked 
)

make a soft link to the object T* already registered (non-const)

◆ t2pRegister()

StatusCode StoreGateSvc::t2pRegister ( const void *const  pTrans,
SG::DataProxy *const  pPers 
)
private

forwarded to DataStore

◆ t2pRemove()

void StoreGateSvc::t2pRemove ( const void *const  pTrans)
private

forwarded to DataStore

◆ transientContains() [1/2]

template<typename TKEY >
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

◆ transientContains() [2/2]

template<typename T , typename TKEY >
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")) { ...

}

◆ transientProxy()

SG::DataProxy * StoreGateSvc::transientProxy ( const CLID id,
const std::string &  key 
) const

get proxy with given id and key.

Does not query ProxyProviderSvc.

Returns
0 to flag failure

Definition at line 325 of file StoreGateSvc.cxx.

325  {
326  _SGXCALL(transientProxy, (id, key), 0);
327 }

◆ transientSwap()

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.

Returns
false if swap failed

Definition at line 343 of file StoreGateSvc.cxx.

344  {
345  _SGXCALL(transientSwap, (id, keyA, keyB), false);
346 }

◆ tryConstRetrieve() [1/2]

template<typename T >
const T* StoreGateSvc::tryConstRetrieve ( ) const

◆ tryConstRetrieve() [2/2]

template<typename T , class TKEY >
const T* StoreGateSvc::tryConstRetrieve ( const TKEY &  key) const

◆ tryELRemap()

bool StoreGateSvc::tryELRemap ( sgkey_t  sgkey_in,
size_t  index_in,
sgkey_t sgkey_out,
size_t &  index_out 
)
finaloverridevirtual

Test to see if the target of an ElementLink has moved.

Parameters
sgkey_inOriginal hashed key of the EL.
index_inOriginal index of the EL.
sgkey_out[out]New hashed key for the EL.
index_out[out]New index for the EL.
Returns
True if there is a remapping; false otherwise.

Reimplemented from IProxyDict.

Definition at line 428 of file StoreGateSvc.cxx.

429  {
430  _SGXCALL( tryELRemap, (sgkey_in, index_in, sgkey_out, index_out), false );
431 }

◆ tryRetrieve() [1/2]

template<typename T >
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

◆ tryRetrieve() [2/2]

template<typename T , class TKEY >
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

◆ typeCount() [1/2]

template<typename T >
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.

◆ typeCount() [2/2]

int StoreGateSvc::typeCount ( const CLID id) const

Return the number of instances of type T (input CLID)

◆ typeless_overwrite()

StatusCode StoreGateSvc::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 
)
private

same as typeless_record, allows to overwrite an object in memory or on disk

Definition at line 359 of file StoreGateSvc.cxx.

364  {
365  _SGXCALL(typeless_overwrite, (id, obj, key, raw_ptr, allowMods, noHist, tinfo), StatusCode::FAILURE);
366 }

◆ typeless_record()

StatusCode StoreGateSvc::typeless_record ( DataObject *  obj,
const std::string &  key,
const void *const  raw_ptr,
bool  allowMods,
bool  resetOnly = true,
bool  noHist = false 
)
private

type-less recording of an object with a key, allow possibility of specifying const-access and history record

Definition at line 351 of file StoreGateSvc.cxx.

354  {
355  _SGXCALL(typeless_record, (obj, key, raw_ptr, allowMods, resetOnly, noHist), StatusCode::FAILURE);
356 }

◆ unboundHandle()

void IProxyDict::unboundHandle ( IResetable handle)
virtualinherited

Tell the store that a handle has been unbound from a proxy.

Parameters
handleThe handle that was unbound. The default implementation does nothing.

Reimplemented in SGImplSvc, SGTest::TestStore, SimpleView, and SG::View.

Definition at line 33 of file IProxyDict.cxx.

34 {
35 }

Friends And Related Function Documentation

◆ AthenaInternal::py_sg_clearProxyPayload

◆ AthenaInternal::recordObjectToStore

PyObject* AthenaInternal::recordObjectToStore ( StoreGateSvc ,
PyObject ,
PyObject ,
bool  ,
bool  ,
bool   
)
friend

◆ AthenaOutputStream

friend class AthenaOutputStream
friend

access proxyRange()

Definition at line 826 of file StoreGateSvc.h.

◆ IOVDbSvc

friend class IOVDbSvc
friend

access clearProxyPayload

Definition at line 842 of file StoreGateSvc.h.

◆ IOVSvcTool

friend class IOVSvcTool
friend

Definition at line 843 of file StoreGateSvc.h.

◆ PerfMon::StorePayloadMon

friend class PerfMon::StorePayloadMon
friend

Definition at line 848 of file StoreGateSvc.h.

◆ PileUpMergeSvc

friend class PileUpMergeSvc
friend

access emptyTrash

Definition at line 840 of file StoreGateSvc.h.

◆ SG::HiveMgrSvc

friend class SG::HiveMgrSvc
friend

Definition at line 820 of file StoreGateSvc.h.

◆ SG::TestHiveStoreSvc

friend class SG::TestHiveStoreSvc
friend

Definition at line 817 of file StoreGateSvc.h.

◆ SG::VarHandleBase

friend class SG::VarHandleBase
friend

access typeless_record

Definition at line 855 of file StoreGateSvc.h.

◆ SGDeleteAlg

friend class SGDeleteAlg
friend

Definition at line 844 of file StoreGateSvc.h.

◆ xAODMaker::AuxStoreWrapper

friend class xAODMaker::AuxStoreWrapper
friend

FIXME: access releaseObject.

Definition at line 833 of file StoreGateSvc.h.

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

BadItemList m_badRetrieves StoreGateSvc::ATLAS_THREAD_SAFE
mutableprivate

Remember calls to retrieve and record for a MT store, so we can warn about them during finalize().

Definition at line 948 of file StoreGateSvc.h.

◆ ATLAS_THREAD_SAFE [2/2]

BadItemList m_badRecords StoreGateSvc::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 949 of file StoreGateSvc.h.

◆ m_ActivateHistory

bool StoreGateSvc::m_ActivateHistory
private

property: activate the history service

Definition at line 925 of file StoreGateSvc.h.

◆ m_algContextSvc

ServiceHandle<IAlgContextSvc> StoreGateSvc::m_algContextSvc
private

Algorithm context, for tracking bad calls.

Definition at line 932 of file StoreGateSvc.h.

◆ m_badMutex

mutex_t StoreGateSvc::m_badMutex
mutableprivate

Definition at line 954 of file StoreGateSvc.h.

◆ m_defaultStore

SGImplSvc* StoreGateSvc::m_defaultStore
private

Definition at line 812 of file StoreGateSvc.h.

◆ m_DumpArena

bool StoreGateSvc::m_DumpArena
private

DumpArena Property flag : trigger m_arena->report() at clearStore.

Definition at line 926 of file StoreGateSvc.h.

◆ m_DumpStore

bool StoreGateSvc::m_DumpStore
private

property Dump: triggers dump() at EndEvent

Definition at line 924 of file StoreGateSvc.h.

◆ m_incSvc

ServiceHandle<IIncidentSvc> StoreGateSvc::m_incSvc
private

property

Definition at line 814 of file StoreGateSvc.h.

◆ m_pPPSHandle

ServiceHandle<IProxyProviderSvc> StoreGateSvc::m_pPPSHandle
private

property

Definition at line 813 of file StoreGateSvc.h.

◆ m_storeID

StoreID::type StoreGateSvc::m_storeID
private

Cache store type in the facade class.

Definition at line 929 of file StoreGateSvc.h.


The documentation for this class was generated from the following files:
StoreGateSvc::transientSwap
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 Not...
Definition: StoreGateSvc.cxx:343
bad
@ bad
Definition: SUSYToolsTester.cxx:95
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
StoreGateSvc::clearProxyPayload
void clearProxyPayload(SG::DataProxy *)
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method corre...
Definition: StoreGateSvc.cxx:447
SGout2dot.alg
alg
Definition: SGout2dot.py:243
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
StoreGateSvc::interfaceID
static const InterfaceID & interfaceID()
Should rather be in IStoreGateSvc.h if we had one.
Definition: StoreGateSvc.cxx:478
StoreGateSvc::m_storeID
StoreID::type m_storeID
Cache store type in the facade class.
Definition: StoreGateSvc.h:929
initialize
void initialize()
Definition: run_EoverP.cxx:894
StoreGateSvc::makeCurrent
void makeCurrent()
The current store is becoming the active store.
Definition: StoreGateSvc.cxx:507
StoreGateSvc::m_ActivateHistory
bool m_ActivateHistory
property: activate the history service
Definition: StoreGateSvc.h:925
StoreGateSvc::m_DumpStore
bool m_DumpStore
property Dump: triggers dump() at EndEvent
Definition: StoreGateSvc.h:924
StoreGateSvc::printBadList
void printBadList(const BadItemList &bad, const std::string &what) const
Print out a list of bad calls during finalization.
Definition: StoreGateSvc.cxx:566
StoreGateSvc::typeless_overwrite
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
Definition: StoreGateSvc.cxx:359
StoreGateSvc::commitNewDataObjects
virtual void commitNewDataObjects() override final
Reset handles added since the last call to commit.
Definition: StoreGateSvc.cxx:95
StoreGateSvc::currentStore
SGImplSvc * currentStore() const
returns pointer to the current SGImplSvc
atn_test_sgProducerConsumerDataPool_jobOptions.end
end
Definition: atn_test_sgProducerConsumerDataPool_jobOptions.py:25
StoreGateSvc::clid
CLID clid(const TKEY &key) const
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!
StoreGateSvc::m_pPPSHandle
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
property
Definition: StoreGateSvc.h:813
IHiveStoreMgr::interfaceID
static const InterfaceID & interfaceID()
Gaudi boilerplate.
Definition: IHiveStoreMgr.h:43
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:51
StoreGateSvc::removeProxy
StatusCode removeProxy(SG::DataProxy *proxy, const void *pTrans, bool forceRemove=false)
remove proxy from store, unless it is reset only.
Definition: StoreGateSvc.cxx:512
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
StoreGateSvc::remap_impl
void remap_impl(sgkey_t source, sgkey_t target, off_t index_offset)
Declare a remapping.
Definition: StoreGateSvc.cxx:421
StoreGateSvc::proxyRange
StatusCode proxyRange(const CLID &id, SG::ConstProxyIterator &beg, SG::ConstProxyIterator &end) const
return a range to all proxies of a given CLID
Definition: StoreGateSvc.cxx:434
StoreGateSvc::m_defaultStore
SGImplSvc * m_defaultStore
Definition: StoreGateSvc.h:812
StoreGateSvc::emptyTrash
void emptyTrash()
throw away bad objects
Definition: StoreGateSvc.cxx:473
StoreGateSvc::m_DumpArena
bool m_DumpArena
DumpArena Property flag : trigger m_arena->report() at clearStore.
Definition: StoreGateSvc.h:926
StoreGateSvc::releaseObject
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
Definition: StoreGateSvc.cxx:442
StoreGateSvc::dump
std::string dump() const
dump objects in store.
Definition: StoreGateSvc.cxx:387
CaloCondBlobAlgs_fillNoiseFromASCII.lines
lines
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:104
StoreGateSvc::m_incSvc
ServiceHandle< IIncidentSvc > m_incSvc
property
Definition: StoreGateSvc.h:814
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
StoreGateSvc::currentStoreGate
static StoreGateSvc * currentStoreGate()
get current StoreGate
Definition: StoreGateSvc.cxx:69
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
StoreGateSvc::loadEventProxies
StatusCode loadEventProxies()
load proxies at begin event
Definition: StoreGateSvc.cxx:453
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
StoreGateSvc::registerKey
virtual void registerKey(sgkey_t key, const std::string &str, CLID clidid) override final
Remember an additional mapping from key to string/CLID.
Definition: StoreGateSvc.cxx:415
SG::HiveEventSlot::pEvtStore
SGImplSvc * pEvtStore
Definition: SGHiveEventSlot.h:23
StoreGateSvc::typeless_record
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...
Definition: StoreGateSvc.cxx:351
StoreGateSvc::stringToKey
virtual sgkey_t stringToKey(const std::string &str, CLID clid) override final
Find the key for a string/CLID pair.
Definition: StoreGateSvc.cxx:400
StoreGateSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: StoreGateSvc.cxx:316
StoreGateSvc::createObj
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override
Call converter to create an object, with locking.
Definition: StoreGateSvc.cxx:529
python.ExitCodes.what
def what(code)
Definition: ExitCodes.py:73
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
StoreGateSvc::proxy
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
StoreGateSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: StoreGateSvc.h:953
StoreGateSvc::setConst
StatusCode setConst(const void *pointer)
prevent downstream clients from modifying the pointed-at dobj
Definition: StoreGateSvc.cxx:113
IHiveStoreMgr
the interface through which HiveWB control StoreGate instances
Definition: IHiveStoreMgr.h:26
StoreGateSvc::accessData
DataObject * accessData(const CLID &id) const
find proxy and access its data. Returns 0 to flag failure
Definition: StoreGateSvc.cxx:332
python.OldStyleConfig.Service
def Service(name)
Definition: OldStyleConfig.py:51
StoreGateSvc::recordObject
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override final
Record an object in the store.
Definition: StoreGateSvc.cxx:298
StoreGateSvc::proxies
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
Definition: StoreGateSvc.cxx:309
python.KeyStore.getProperties
def getProperties(self)
Definition: KeyStore.py:247
StoreGateSvc::tryELRemap
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.
Definition: StoreGateSvc.cxx:428
a
TList * a
Definition: liststreamerinfos.cxx:10
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
StoreGateSvc::m_algContextSvc
ServiceHandle< IAlgContextSvc > m_algContextSvc
Algorithm context, for tracking bad calls.
Definition: StoreGateSvc.h:932
StoreID::findStoreID
static StoreID::type findStoreID(const std::string &storeName)
Definition: StoreID.cxx:21
StoreGateSvc::setStoreID
void setStoreID(StoreID::type id)
set store ID. request forwarded to DataStore:
Definition: StoreGateSvc.cxx:370
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
str
Definition: BTagTrackIpAccessor.cxx:11
StoreGateSvc::transientProxy
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
Definition: StoreGateSvc.cxx:325
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
COOLRates.target
target
Definition: COOLRates.py:1106
StoreGateSvc::addToStore
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
Definition: StoreGateSvc.cxx:271
get_generator_info.error
error
Definition: get_generator_info.py:40
python.PyAthena.obj
obj
Definition: PyAthena.py:135
StoreGateSvc::m_badMutex
mutex_t m_badMutex
Definition: StoreGateSvc.h:954
IHiveStore
the interface that provides access to the current hive store
Definition: IHiveStore.h:23
StoreGateSvc::StoreGateSvc
StoreGateSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: StoreGateSvc.cxx:28
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
StoreClearedIncident
Incident sent after a store is cleared.
Definition: StoreClearedIncident.h:30