 |
ATLAS Offline Software
|
The Athena Transient Store API.
More...
#include <SGImplSvc.h>
|
| | SGImplSvc (const SGImplSvc &)=delete |
| |
| SGImplSvc & | operator= (const SGImplSvc &)=delete |
| |
|
| StatusCode | retrieve (CLID clid, SG::detail::IteratorBase &cibegin, SG::detail::IteratorBase &ciend) const |
| | Retrieve all objects of type T: returns an SG::ConstIterator range. More...
|
| |
|
| StatusCode | recordAddress (const std::string &skey, CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true) |
| | Create a proxy object using an IOpaqueAddress and a transient key. More...
|
| |
| StatusCode | recordAddress (CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true) |
| | Create a proxy object using an IOpaqueAddress. More...
|
| |
| StatusCode | symLink (const void *p2BRegistered, CLID linkID) |
| | make a soft link to the object T* already registered More...
|
| |
| StatusCode | symLink (const CLID id, const std::string &key, const CLID linkid) |
| | make a soft link to the object pointed by id/key More...
|
| |
| StatusCode | setAlias (CLID clid, const std::string &key, const std::string &aliasKey) |
| | make an alias to a DataObject (provide data type and old key) More...
|
| |
| StatusCode | setAlias (const void *p2BAliased, const std::string &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...
|
| |
| StatusCode | remove (const void *pObject) |
| | Remove pObject, will remove its proxy if not reset only. More...
|
| |
| StatusCode | removeDataAndProxy (const void *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...
|
| |
|
| DataObject * | typeless_retrievePrivateCopy (const CLID clid, const std::string &key) |
| |
| CLID | clid (const std::string &key) const |
| | Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow! More...
|
| |
| std::vector< CLID > | clids (const std::string &key) const |
| | Retrieve all the CLID s (including symlinks) of the object recorded in StoreGate with the given "key" WARNING: slow! More...
|
| |
| int | typeCount (const CLID &id) const |
| | Return the number of instances of type T (input CLID) More...
|
| |
| bool | contains (const CLID id, const std::string &key) const |
| | Look up a keyed object in TDS by CLID. More...
|
| |
| bool | transientContains (const CLID id, const std::string &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...
|
| |
| void | keys (const CLID &id, std::vector< std::string > &vkeys, bool includeAlias=false, bool onlyValid=true) |
| | provide list of all StoreGate keys associated with an object. More...
|
| |
| virtual ::IProxyDict * | hiveProxyDict () override final |
| | implements IHiveStore interface for compat with Hive More...
|
| |
|
| StatusCode | regFcn (const CallBackID &c1, const CallBackID &c2, const IOVSvcCallBackFcn &fcn, bool trigger=false) |
| | register a callback function(2) with an already registered function(1) More...
|
| |
| StatusCode | regFcn (const std::string &toolName, const CallBackID &c2, const IOVSvcCallBackFcn &fcn, 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. 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...
|
| |
| virtual SG::DataProxy * | proxy (const CLID &id, const char *key) const final |
| | 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...
|
| |
|
| virtual SG::DataProxy * | proxy (const CLID &id, bool checkValid) const |
| | get default proxy with given id, optionally checking validity. More...
|
| |
| virtual SG::DataProxy * | proxy (const CLID &id, const std::string &key, bool checkValid) const |
| | get proxy with given id and key, optionally checking validity. More...
|
| |
| virtual SG::DataProxy * | proxy (const CLID &id, const char *key, bool checkValid) const |
| | 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...
|
| |
|
| 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...
|
| |
|
| | SGImplSvc (const std::string &name, ISvcLocator *svc) |
| | Standard Constructor. More...
|
| |
| virtual | ~SGImplSvc () override final |
| | Standard Destructor. More...
|
| |
|
| virtual StatusCode | initialize () override final |
| | Service initialization. More...
|
| |
| virtual StatusCode | reinitialize () override final |
| | Service reinitialization. More...
|
| |
| virtual StatusCode | start () override final |
| | Service start. More...
|
| |
| virtual StatusCode | stop () override final |
| | Service stop. More...
|
| |
| virtual StatusCode | finalize () override final |
| | Service finalization. More...
|
| |
|
| virtual void | handle (const Incident &) override final |
| | triggered by Incident service More...
|
| |
| StatusCode | loadEventProxies () |
| | load proxies at begin event More...
|
| |
|
| typedef std::recursive_mutex | mutex_t |
| |
| typedef std::lock_guard< mutex_t > | lock_t |
| |
| class | IOVDbSvc |
| | access clearProxyPayload More...
|
| |
| class | IOVSvcTool |
| |
| class | AthenaOutputStream |
| | access proxyRange() More...
|
| |
| class | StoreGateSvc |
| |
| class | SG::VarHandleBase |
| | access typeless_record More...
|
| |
| class | ActiveStoreSvc |
| |
| PyObject * | AthenaInternal::recordObjectToStore (StoreGateSvc *, PyObject *, PyObject *, bool, bool, bool) |
| |
| void | AthenaInternal::py_sg_clearProxyPayload (StoreGateSvc *, SG::DataProxy *) |
| |
| ServiceHandle< IClassIDSvc > | m_pCLIDSvc |
| |
| ServiceHandle< IConversionSvc > | m_pDataLoader |
| |
| ServiceHandle< IProxyProviderSvc > | m_pPPSHandle |
| |
| IProxyProviderSvc * | m_pPPS |
| |
| ServiceHandle< IHistorySvc > | m_pHistorySvc |
| |
| SG::DataStore * | m_pStore |
| |
| std::list< DataObject * > | m_trash |
| | The Recycle Bin. More...
|
| |
| ServiceHandle< IIncidentSvc > | m_pIncSvc |
| | property More...
|
| |
| bool | m_DumpStore |
| | Dump Property flag: triggers dump() at EndEvent. More...
|
| |
| bool | m_ActivateHistory |
| | Activate the history service. More...
|
| |
| bool | m_DumpArena |
| | DumpArena Property flag : trigger m_arena->report() at clearStore. More...
|
| |
| StringArrayProperty | m_folderNameList |
| | FolderNameList Property. More...
|
| |
| ServiceHandle< IIOVSvc > | m_pIOVSvc |
| | get the IOVSvc "just in time" (breaks recursion at initialize) More...
|
| |
| bool | m_storeLoaded |
| | FIXME hack needed by loadEventProxies. More...
|
| |
| SG::StringPool | m_stringpool |
| |
| SG::RemapImpl * | m_remap_impl |
| |
| SG::Arena | m_arena |
| | Allocation arena to associate with this store. More...
|
| |
| int | m_slotNumber |
| | The Hive slot number for this store, or -1 if this isn't a Hive store. More...
|
| |
| int | m_numSlots |
| | The total number of slots. 1 if this isn't a Hive store. More...
|
| |
| std::map< std::thread::id, std::vector< IResetable * > > | m_newBoundHandles |
| | Keep track of proxies bound since the last call to commitNewDataObjects or clearStore. More...
|
| |
| mutex_t | m_mutex |
| |
| mutex_t | m_remapMutex |
| |
| mutex_t | m_stringPoolMutex |
| |
| 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 | setSlotNumber (int slot, int numSlots) |
| | Set the Hive slot number for this store. More...
|
| |
| virtual void | boundHandle (IResetable *handle) override final |
| | Tell the store that a proxy has been bound to a handle. More...
|
| |
| virtual void | unboundHandle (IResetable *handle) override final |
| | Tell the store that a handle has been unbound from a proxy. More...
|
| |
| virtual StatusCode | createObj (IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override |
| | Call converter to create an object, with locking. More...
|
| |
| StatusCode | record_HistObj (const CLID &id, const std::string &key, const std::string &store, bool allowMods, bool resetOnly=true) |
| |
| 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...
|
| |
| StatusCode | typeless_record (DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool resetOnly, bool noHist, const std::type_info *tinfo) |
| |
| StatusCode | typeless_record (DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool resetOnly, bool noHist, const std::type_info *tinfo, SG::DataProxy **proxy_ret, bool noOverwrite) |
| |
| SG::DataProxy * | record_impl (DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool resetOnly, bool allowOverwrite, const std::type_info *tinfo) |
| | real recording of an object with a key, allow possibility of specifying const-access 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...
|
| |
| SG::DataProxy * | locatePersistent (const SG::TransientAddress *tAddr, bool checkValid=false) const |
| |
| StatusCode | proxyRange (const CLID &id, SG::ConstProxyIterator &beg, SG::ConstProxyIterator &end) const |
| | return a range to all proxies of a given CLID More...
|
| |
| SG::DataStore * | store () |
| |
| const SG::DataStore * | store () const |
| |
| 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...
|
| |
| bool | bindHandleToProxy (const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp) |
| | name says it all More...
|
| |
| bool | bindHandleToProxyAndRegister (const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp) |
| | Also do registration with IOVSvc. More...
|
| |
| bool | bindHandleToProxyAndRegister (const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger) |
| |
| 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...
|
| |
| bool | associateAux_impl (SG::AuxVectorBase *ptr, const std::string &key, CLID auxclid) const |
| |
| bool | associateAux_impl (SG::AuxElement *ptr, const std::string &key, CLID auxclid) const |
| |
| 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 | makeCurrent () |
| | The current store is becoming the active store. More...
|
| |
The Athena Transient Store API.
- Parameters
-
| Dump | property (default false): set to call dump() at EndEvent |
| FolderNameList | property (default ""): data folders to be created in this store |
- Author
- ATLAS Collaboration
Definition at line 106 of file SGImplSvc.h.
◆ lock_t
◆ mutex_t
◆ sgkey_t
◆ SGImplSvc() [1/2]
◆ SGImplSvc() [2/2]
| SGImplSvc::SGImplSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
◆ ~SGImplSvc()
| SGImplSvc::~SGImplSvc |
( |
| ) |
|
|
finaloverridevirtual |
◆ accessData() [1/2]
| DataObject * SGImplSvc::accessData |
( |
const CLID & |
id | ) |
const |
find proxy and access its data. Returns 0 to flag failure
Definition at line 974 of file SGImplSvc.cxx.
978 return (0 == theProxy) ? 0 : theProxy->accessData();
◆ accessData() [2/2]
| DataObject * SGImplSvc::accessData |
( |
const CLID & |
id, |
|
|
const std::string & |
key |
|
) |
| const |
find proxy and access its data. Returns 0 to flag failure
Definition at line 982 of file SGImplSvc.cxx.
986 return (0 == theProxy) ? 0 : theProxy->accessData();
◆ addAlias()
Definition at line 682 of file SGImplSvc.cxx.
685 warning() <<
"addAlias: no target DataProxy given, Cannot alias to a non-existing object"
687 return StatusCode::FAILURE;
◆ addAutoSymLinks()
| void SGImplSvc::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.
Definition at line 1676 of file SGImplSvc.cxx.
1696 const std::vector<CLID>& bases = bib->
get_bases();
1697 for ( std::size_t
i = 0, iMax = bases.size();
i < iMax; ++
i ) {
1698 if ( bases[
i] !=
clid ) {
1705 warning() <<
"record_impl: Doing auto-symlinks for object with CLID "
1707 <<
" and SG key " <<
key
1708 <<
": Proxy already set for base CLID " << bases[
i]
1709 <<
"; not making auto-symlink." <<
endmsg;
1718 warning() <<
"record_impl: Doing auto-symlinks for object with CLID "
1720 <<
" and SG key " <<
key
1721 <<
": Proxy already set for copy-conversion CLID "
1723 <<
"; not making auto-symlink." <<
endmsg;
1730 warning() <<
"record_impl: Could not find suitable SG::BaseInfoBase for CLID ["
1731 <<
clid <<
"] (" <<
key <<
") !\t"
1732 <<
"No auto-symlink established !"
◆ addSymLink()
Definition at line 602 of file SGImplSvc.cxx.
605 warning() <<
"addSymLink: no target DataProxy found. Sorry, can't link to a non-existing data object"
607 return StatusCode::FAILURE;
613 if (
sc.isSuccess() &&
dp->object()) {
◆ addToStore()
Raw addition of a proxy to the store.
- Parameters
-
| id | CLID of object being added. |
| proxy | proxy to add. |
Definition at line 796 of file SGImplSvc.cxx.
◆ associateAux_impl() [1/2]
Definition at line 1916 of file SGImplSvc.cxx.
1921 SG_MSG_VERBOSE(
"called associateAux_impl for key " +
key);
1923 if (!
ptr->hasStore()) {
1926 if (!
dp->isConst()) {
1929 ptr->setStore (pAux);
1936 ptr->setStore (pAux);
◆ associateAux_impl() [2/2]
Definition at line 1881 of file SGImplSvc.cxx.
1889 if (
ptr->hasStore())
return true;
1892 SG_MSG_VERBOSE(
"called associateAux_impl for key " +
key);
1894 if (!
ptr->hasStore()) {
1897 if (!
dp->isConst()) {
1900 ptr->setStore (pAux);
1907 ptr->setStore (pAux);
◆ bindHandleToProxy()
name says it all
Definition at line 1357 of file SGImplSvc.cxx.
1363 if (
dp ==
nullptr &&
m_pPPS !=
nullptr) {
1367 if (0 ==
dp)
return false;
1369 if (!
dp->bindHandle(
ir) ) {
1370 fatal() <<
"DataHandle at " << hex <<
ir << dec
1371 <<
" already bound to DataProxy with key " <<
ir->key()
1372 <<
". Cannot bind to proxy " <<
dp->name() <<
" as well\n"
1373 <<
" You have probably registered multiple callbacks via regFcn with the same DataHandle using different keys (DataProxies)\n"
1381 SG_MSG_DEBUG(
" Bound handle " << MSG::hex <<
ir <<
" to proxy "
◆ bindHandleToProxyAndRegister() [1/2]
◆ bindHandleToProxyAndRegister() [2/2]
Definition at line 1403 of file SGImplSvc.cxx.
1413 if (
sc.isFailure())
return false;
1415 if (
sc.isFailure())
return false;
◆ boundHandle()
| void SGImplSvc::boundHandle |
( |
IResetable * |
handle | ) |
|
|
finaloverridevirtual |
Tell the store that a proxy has been bound to a handle.
- Parameters
-
| proxy | The proxy that was bound. The default implementation does nothing. |
Definition at line 1757 of file SGImplSvc.cxx.
◆ clearProxyPayload()
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method correctly updates SGSvc internals
Definition at line 1563 of file SGImplSvc.cxx.
1571 if (
dp->isValidObject()) {
1573 SG::DataProxy::CLIDCont_t::const_iterator
i(
clids.begin()),
e(
clids.end());
1580 dp->reset (hard_reset);
◆ clearStore()
| StatusCode SGImplSvc::clearStore |
( |
bool |
forceRemove = false | ) |
|
|
finaloverridevirtual |
clear DataStore contents: called by the event loop mgrs
- Parameters
-
| forceRemove | if true remove proxies ignoring their resetOnly flag |
Definition at line 268 of file SGImplSvc.cxx.
275 std::ostringstream
s;
287 debug() <<
"Clearing store with forceRemove="
299 return StatusCode::SUCCESS;
◆ clid()
| CLID SGImplSvc::clid |
( |
const std::string & |
key | ) |
const |
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!
Definition at line 1642 of file SGImplSvc.cxx.
1648 for ( ; s_iter != s_end; ++s_iter ) {
1649 if ( s_iter->second.find(
key ) != s_iter->second.end() ) {
1650 return s_iter->first;
◆ clids() [1/2]
| std::vector< CLID > SGImplSvc::clids |
( |
| ) |
const |
Return all CLIDs in the store.
Definition at line 945 of file SGImplSvc.cxx.
950 DataStore::ConstStoreIterator s_iter, s_end;
953 std::vector<CLID>
clids;
956 for (; s_iter != s_end; ++s_iter ) {
957 const CLID id = s_iter->first;
958 clids.push_back (
id);
◆ clids() [2/2]
| std::vector< CLID > SGImplSvc::clids |
( |
const std::string & |
key | ) |
const |
Retrieve all the CLID s (including symlinks) of the object recorded in StoreGate with the given "key" WARNING: slow!
Definition at line 1658 of file SGImplSvc.cxx.
1661 std::vector<CLID>
clids;
1665 for ( ; s_iter != s_end; ++s_iter ) {
1666 if ( s_iter->second.find(
key ) != s_iter->second.end() ) {
1667 clids.push_back(s_iter->first);
◆ commitNewDataObjects()
| void SGImplSvc::commitNewDataObjects |
( |
| ) |
|
|
finaloverridevirtual |
Reset handles added since the last call to commit.
Definition at line 1739 of file SGImplSvc.cxx.
1744 std::vector<IResetable*> handles;
1747 h->reset (hard_reset);
◆ contains()
| bool SGImplSvc::contains |
( |
const CLID |
id, |
|
|
const std::string & |
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")) { ... }
Definition at line 702 of file SGImplSvc.cxx.
706 }
catch(...) {
return false; }
◆ createKey()
| string SGImplSvc::createKey |
( |
const CLID & |
dataID | ) |
|
|
private |
creates a key internally if none specified by client
Definition at line 262 of file SGImplSvc.cxx.
◆ createObj()
| StatusCode SGImplSvc::createObj |
( |
IConverter * |
cvt, |
|
|
IOpaqueAddress * |
addr, |
|
|
DataObject *& |
refpObject |
|
) |
| |
|
overridevirtual |
Call converter to create an object, with locking.
- Parameters
-
| 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.
Definition at line 1800 of file SGImplSvc.cxx.
1809 return cvt->createObj (addr, refpObject);
◆ dump()
| string SGImplSvc::dump |
( |
| ) |
const |
dump objects in store.
request forwarded to DataStore this is triggered at EndEvent setting the Dump property to true
Definition at line 524 of file SGImplSvc.cxx.
527 auto out_buffer = std::string{};
528 auto out = std::back_inserter(out_buffer);
529 const std::string me =
name();
530 std::format_to(
out,
"{}: <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> \n", me);
531 std::format_to(
out,
"{}: SGImplSvc()::dump() which is {} \n", me,
m_storeLoaded ?
"LOADED" :
"NOT LOADED");
533 DataStore::ConstStoreIterator s_iter, s_end;
536 for (; s_iter != s_end; ++s_iter)
539 CLID id = s_iter->first;
542 m_pCLIDSvc->getTypeNameOfID(
id, tname).ignore();
543 std::format_to(
out,
"{}: Found {} {} for ClassID {} ({}): \n", me, nProxy, ((nProxy == 1) ?
"proxy" :
"proxies"),
id, tname);
549 while (p_iter != p_end) {
551 std::format_to(
out,
"{}: flags: ({:7s}, {:8s}, {:6s}) --- data: {:10p} --- key: {}\n", me,
552 (
dp.isValid() ?
"valid" :
"INVALID"),
553 (
dp.isConst() ?
"locked" :
"UNLOCKED"),
554 (
dp.isResetOnly() ?
"reset" :
"DELETE"),
559 std::format_to(
out,
"{}: <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> \n", me);
◆ emptyTrash()
| void SGImplSvc::emptyTrash |
( |
| ) |
|
|
private |
◆ finalize()
| StatusCode SGImplSvc::finalize |
( |
| ) |
|
|
finaloverridevirtual |
Service finalization.
Definition at line 303 of file SGImplSvc.cxx.
310 const bool FORCEREMOVE(
true);
◆ handle()
| void SGImplSvc::handle |
( |
const Incident & |
inc | ) |
|
|
finaloverridevirtual |
triggered by Incident service
Definition at line 232 of file SGImplSvc.cxx.
234 if (inc.type() ==
"EndEvent") {
236 SG_MSG_DEBUG(
"Dumping StoreGate Contents");
◆ hiveProxyDict()
| virtual ::IProxyDict* SGImplSvc::hiveProxyDict |
( |
| ) |
|
|
inlinefinaloverride |
◆ initialize()
| StatusCode SGImplSvc::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Service initialization.
Definition at line 147 of file SGImplSvc.cxx.
168 if (!(
m_pIncSvc.retrieve()).isSuccess()) {
169 error() <<
"Could not locate IncidentSvc "
171 return StatusCode::FAILURE;
187 SG_MSG_DEBUG(
" Failed to preLoad proxies");
188 return StatusCode::FAILURE;
196 return StatusCode::SUCCESS;
◆ isSymLinked()
Definition at line 494 of file SGImplSvc.cxx.
496 return (0 !=
dp) ?
dp->transientID(linkID) :
false;
◆ keys()
| void SGImplSvc::keys |
( |
const CLID & |
id, |
|
|
std::vector< std::string > & |
vkeys, |
|
|
bool |
includeAlias = false, |
|
|
bool |
onlyValid = true |
|
) |
| |
provide list of all StoreGate keys associated with an object.
usage: p_store->keys(CLID, vkeys, optionalFlags);
- Parameters
-
| 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 |
Definition at line 485 of file SGImplSvc.cxx.
490 return store()->
keys(
id, vkeys, includeAlias, onlyValid);
◆ keyToString() [1/2]
| const std::string * SGImplSvc::keyToString |
( |
sgkey_t |
key | ) |
const |
|
finaloverridevirtual |
Find the string corresponding to a given key.
- Parameters
-
- 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().
Definition at line 1471 of file SGImplSvc.cxx.
◆ keyToString() [2/2]
Find the string and CLID corresponding to a given key.
- Parameters
-
| key | The 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().
Definition at line 1487 of file SGImplSvc.cxx.
◆ loadEventProxies()
| StatusCode SGImplSvc::loadEventProxies |
( |
| ) |
|
◆ locatePersistent()
Definition at line 1227 of file SGImplSvc.cxx.
1232 if (checkValid && 0 !=
dp) {
1233 return dp->isValid() ?
dp : 0;
◆ makeCurrent()
| void SGImplSvc::makeCurrent |
( |
| ) |
|
|
private |
◆ mergeStringPool()
Merge the string pool from another store into this one.
- Parameters
-
In case of collisions, the colliding entries are skipped, and false is returned. If no collisions, then true is returned.
Definition at line 1529 of file SGImplSvc.cxx.
◆ msg_update_handler()
| void SGImplSvc::msg_update_handler |
( |
Gaudi::Details::PropertyBase & |
outputLevel | ) |
|
|
private |
◆ operator=()
◆ proxies()
return the list of all current proxies in store
Definition at line 935 of file SGImplSvc.cxx.
939 std::vector<const SG::DataProxy*> ret (
proxies.begin(),
proxies.end());
◆ proxy() [1/7]
get default proxy with given id.
Returns 0 to flag failure Deprecated for the event store.
Definition at line 729 of file SGImplSvc.cxx.
731 return proxy(
id,
false);
◆ proxy() [2/7]
get default proxy with given id, optionally checking validity.
- Returns
- 0 to flag failure
Check if it is valid
Definition at line 735 of file SGImplSvc.cxx.
749 if (checkValid && 0 !=
dp) {
753 return dp->isValid() ?
dp : 0;
◆ proxy() [3/7]
get proxy with given id and key.
Returns 0 to flag failure (overload to prevent a char* to be interpreted as a bool.)
Definition at line 264 of file SGImplSvc.h.
265 {
return this->
proxy(
id, std::string(
key)); }
◆ proxy() [4/7]
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 316 of file SGImplSvc.h.
317 {
return this->
proxy(
id, std::string(
key), checkValid); }
◆ proxy() [5/7]
get proxy with given id and key. Returns 0 to flag failure
Definition at line 759 of file SGImplSvc.cxx.
◆ proxy() [6/7]
get proxy with given id and key, optionally checking validity.
- Returns
- 0 to flag failure
Definition at line 765 of file SGImplSvc.cxx.
772 if (!
dp)
dbg::print(
stderr,
"::SGImplSvc::proxy(name={}, key={}): data proxy is null, m_pPPS is {}\n", this->
name(),
key,
m_pPPS == 0 ?
"NULL" :
"NOT NULL");
774 if (0 == dp && 0 !=
m_pPPS) {
784 if (checkValid && 0 !=
dp && !(
dp->isValid())) {
◆ proxy() [7/7]
get proxy for a given data object address in memory
Definition at line 720 of file SGImplSvc.cxx.
◆ proxy_exact()
Get proxy given a hashed key+clid.
Find an exact match; no handling of aliases, etc. Returns 0 to flag failure.
Definition at line 912 of file SGImplSvc.cxx.
◆ proxyProviderSvc()
◆ proxyRange()
return a range to all proxies of a given CLID
Definition at line 1295 of file SGImplSvc.cxx.
◆ record_HistObj()
| StatusCode SGImplSvc::record_HistObj |
( |
const CLID & |
id, |
|
|
const std::string & |
key, |
|
|
const std::string & |
store, |
|
|
bool |
allowMods, |
|
|
bool |
resetOnly = true |
|
) |
| |
|
private |
Definition at line 1423 of file SGImplSvc.cxx.
1432 if (
sc.isFailure() || idname.empty() ) {
1440 const bool ALLOWOVERWRITE(
false);
1441 if (
record_impl(
obj, idname, dho, allowMods, resetOnly, ALLOWOVERWRITE,
1442 &
typeid(DataHistory)) ==
nullptr)
1443 return StatusCode::FAILURE;
1444 return StatusCode::SUCCESS;
◆ record_impl()
| SG::DataProxy * SGImplSvc::record_impl |
( |
DataObject * |
obj, |
|
|
const std::string & |
key, |
|
|
const void *const |
raw_ptr, |
|
|
bool |
allowMods, |
|
|
bool |
resetOnly, |
|
|
bool |
allowOverwrite, |
|
|
const std::type_info * |
tinfo |
|
) |
| |
|
private |
real recording of an object with a key, allow possibility of specifying const-access
Definition at line 1099 of file SGImplSvc.cxx.
1105 std::string rawKey(
key);
1113 const std::string& pTAName(
dp->name());
1121 if (!(this->
addAlias(primaryVK.rawVersionKey(),
dp)).isSuccess()) {
1122 warning() <<
"record_impl: Could not setup alias key "
1123 << primaryVK.rawVersionKey()
1124 <<
" for unversioned object " << pTAName
1135 rawKey = newVK.rawVersionKey();
1139 if (!allowOverwrite &&
m_pPPS) {
1145 if (
dp &&
dp->provider()) {
1146 std::string clidTypeName;
1148 warning() <<
"record_impl: you are recording an object with key "
1149 << rawKey <<
", type " << clidTypeName
1150 <<
" (CLID " <<
clid <<
')'
1151 <<
"\n There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated."
1159 std::string clidTypeName;
1161 warning() <<
"record_impl: failed for key="<< rawKey <<
", type "
1163 <<
" (CLID " <<
clid <<
')'
1164 <<
"\n object @" << raw_ptr
1165 <<
" already in store with key="<<
dp->name()
1166 <<
". Will not record a duplicate! "
1168 if (pDObj !=
dp->object()) {
1170 if (!pDBB) std::abort();
1181 std::string clidTypeName;
1183 warning() <<
"record_impl: Problem setting up the proxy for object @"
1185 <<
"\n recorded with key " << rawKey
1186 <<
" of type " << clidTypeName
1187 <<
" (CLID " <<
clid <<
") in DataObject @" << pDObj
1195 std::string clidTypeName;
1197 warning() <<
"record_impl: can not add to t2p map object @" <<raw_ptr
1198 <<
"\n with key " << rawKey
1199 <<
" of type " << clidTypeName
1200 <<
" (CLID " <<
clid <<
')'
1214 if (!(this->
addAlias(vk.key(),
dp)).isSuccess()) {
1215 warning() <<
"record_impl: Could not setup alias key " << vk.key()
1216 <<
" for VersionedKey " << rawKey
1217 <<
". Generic access to this object with clid" <<
clid
◆ recordAddress() [1/2]
| StatusCode SGImplSvc::recordAddress |
( |
const std::string & |
skey, |
|
|
CxxUtils::RefCountedPtr< IOpaqueAddress > |
pAddress, |
|
|
bool |
clearAddressFlag = true |
|
) |
| |
Create a proxy object using an IOpaqueAddress and a transient key.
Definition at line 336 of file SGImplSvc.cxx.
341 assert(0 != pAddress);
342 CLID dataID = pAddress->clID();
346 warning() <<
"recordAddress: Invalid Class ID found in IOpaqueAddress @"
347 << pAddress.
get() <<
". IOA will not be recorded"
349 return StatusCode::FAILURE;
358 if (
dp &&
dp->provider()) {
359 std::string clidTypeName;
360 m_pCLIDSvc->getTypeNameOfID(dataID, clidTypeName).ignore();
361 warning() <<
"recordAddress: failed for key="<< skey <<
", type "
363 <<
" (CLID " << dataID <<
')'
364 <<
"\n there is already a persistent version of this object. Will not record a duplicate! "
366 return StatusCode::FAILURE;
388 else if ((0 !=
dp) && (0 ==
dp->address()))
392 dp->setAddress(std::move(pAddress));
397 m_pCLIDSvc->getTypeNameOfID(dataID, errType).ignore();
398 warning() <<
"recordAddress: preexisting proxy @" <<
dp
399 <<
" with non-NULL IOA found for key "
400 << skey <<
" type " << errType <<
" (" << dataID <<
"). \n"
401 <<
"Cannot record IOpaqueAddress @" << pAddress.
get()
403 return StatusCode::FAILURE;
406 return StatusCode::SUCCESS;
◆ recordAddress() [2/2]
| StatusCode SGImplSvc::recordAddress |
( |
CxxUtils::RefCountedPtr< IOpaqueAddress > |
pAddress, |
|
|
bool |
clearAddressFlag = true |
|
) |
| |
Create a proxy object using an IOpaqueAddress.
Definition at line 414 of file SGImplSvc.cxx.
418 assert(0 != pAddress);
420 CLID dataID = pAddress->clID();
422 string gK = (pAddress->par())[1];
423 if (gK.empty()) gK = (pAddress->par())[0];
426 return this->
recordAddress(gK, std::move(pAddress), clearAddressFlag);
◆ recordObject()
Record an object in the store.
- Parameters
-
| 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.
Definition at line 823 of file SGImplSvc.cxx.
829 const void* raw_ptr =
obj.get();
830 const std::type_info* tinfo =
nullptr;
833 raw_ptr = bucket->object();
834 tinfo = &bucket->tinfo();
837 if (returnExisting) {
848 std::string clidTypeName;
850 warning() <<
"SGImplSvc::recordObject: addAlias fails for object "
852 <<
" and new key " <<
key
864 std::string clidTypeName;
867 std::string newclidTypeName;
868 m_pCLIDSvc->getTypeNameOfID(newclid, newclidTypeName).ignore();
869 error() <<
"SGImplSvc::recordObject: addSymLink fails for object "
871 <<
" and new clid " << newclid <<
"[" << newclidTypeName <<
"]"
879 std::string clidTypeName;
882 std::string newclidTypeName;
883 m_pCLIDSvc->getTypeNameOfID(newclid, newclidTypeName).ignore();
884 error() <<
"SGImplSvc::recordObject: existing object found with "
886 <<
" but neither clid " << newclid <<
"[" << newclidTypeName <<
"]"
887 <<
" nor key " <<
key <<
" match."
896 const bool resetOnly =
true;
897 const bool noHist =
false;
900 allowMods, resetOnly, noHist, tinfo,
901 &
proxy,
true).isFailure())
◆ recycle()
| void SGImplSvc::recycle |
( |
DataObject * |
pBadDObj | ) |
|
|
private |
◆ regFcn() [1/2]
register a callback function(2) with an already registered function(1)
Definition at line 501 of file SGImplSvc.cxx.
◆ regFcn() [2/2]
register a callback function(2) with an already registered AlgTool
Definition at line 512 of file SGImplSvc.cxx.
518 return (
m_pIOVSvc->regFcn(toolName,
c2,fcn,trigger) );
◆ registerKey()
Remember an additional mapping from key to string/CLID.
- Parameters
-
| key | The key to enter. |
| str | The string to enter. |
| clid | The 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.
Definition at line 1506 of file SGImplSvc.cxx.
1515 <<
" maps to multiple string key/CLID pairs: "
1516 << *str2 <<
"/" << clid2 <<
" and "
◆ reinitialize()
| StatusCode SGImplSvc::reinitialize |
( |
| ) |
|
|
finaloverridevirtual |
Service reinitialization.
Definition at line 324 of file SGImplSvc.cxx.
326 const bool FORCEREMOVE(
true);
329 return StatusCode::SUCCESS;
◆ releaseObject()
| void SGImplSvc::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 1546 of file SGImplSvc.cxx.
1552 SG::DataProxy::CLIDCont_t::const_iterator
i(
clids.begin()),
e(
clids.end());
1556 if (0 != pDBB) pDBB->relinquish();
1558 pP->reset (hard_reset);
◆ remap_impl()
| void SGImplSvc::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 1591 of file SGImplSvc.cxx.
1598 payload.index_offset = index_offset;
◆ remove()
| StatusCode SGImplSvc::remove |
( |
const void * |
pObject | ) |
|
Remove pObject, will remove its proxy if not reset only.
Definition at line 1322 of file SGImplSvc.cxx.
◆ removeDataAndProxy()
| StatusCode SGImplSvc::removeDataAndProxy |
( |
const void * |
pObject | ) |
|
Remove pObject and its proxy no matter what.
Definition at line 1331 of file SGImplSvc.cxx.
1334 const bool FORCEREMOVE(
true);
◆ removeProxy()
| StatusCode SGImplSvc::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
-
| forceRemove | remove the proxy no matter what
|
Definition at line 1240 of file SGImplSvc.cxx.
1245 if (0 ==
proxy)
return StatusCode::FAILURE;
1249 if (bucket) pTrans = bucket->
object();
1260 for (SG::DataProxy::CLIDCont_t::const_iterator
i =
clids.begin();
◆ retrieve()
Retrieve all objects of type T: returns an SG::ConstIterator range.
Definition at line 1850 of file SGImplSvc.cxx.
1861 SG_MSG_DEBUG(
"retrieve(range): no object found "
1862 <<
" of type " << typnam
1863 <<
"(CLID " <<
clid <<
')');
1871 SG_MSG_DEBUG(
"retrieve(range): Can't initialize iterator for object range "
1872 <<
" of type " << typnam
1873 <<
"(CLID " <<
clid <<
')');
1874 return StatusCode::FAILURE;
1877 return StatusCode::SUCCESS;
◆ setAlias() [1/3]
| StatusCode SGImplSvc::setAlias |
( |
CLID |
clid, |
|
|
const std::string & |
key, |
|
|
const std::string & |
aliasKey |
|
) |
| |
make an alias to a DataObject (provide data type and old key)
Definition at line 649 of file SGImplSvc.cxx.
657 error() <<
"setAlias: problem setting alias "
658 << std::string(aKey) <<
'\n'
659 <<
"DataObject does not exist, record before setting alias."
661 return StatusCode::FAILURE;
665 if (
sc.isFailure()) {
666 error() <<
"setAlias: problem setting alias "
667 << (std::string)aKey <<
'\n'
668 <<
"DataObject does not exist, record before setting alias."
670 return StatusCode::FAILURE;
673 return StatusCode::SUCCESS;
◆ setAlias() [2/3]
| StatusCode SGImplSvc::setAlias |
( |
const void * |
p2BAliased, |
|
|
const std::string & |
aliasKey |
|
) |
| |
make an alias to a DataObject (provide only valid pointer)
Definition at line 622 of file SGImplSvc.cxx.
629 error() <<
"setAlias: problem setting alias "
631 <<
"DataObject does not exist, record before setting alias."
633 return StatusCode::FAILURE;
637 if (
sc.isFailure()) {
638 error() <<
"setAlias: problem setting alias "
640 <<
"DataObject does not exist, record before setting alias."
642 return StatusCode::FAILURE;
645 return StatusCode::SUCCESS;
◆ setAlias() [3/3]
make an alias to a DataObject (provide valid proxy)
Definition at line 676 of file SGImplSvc.cxx.
◆ setConst()
| StatusCode SGImplSvc::setConst |
( |
const void * |
pointer | ) |
|
prevent downstream clients from modifying the pointed-at dobj
Definition at line 1302 of file SGImplSvc.cxx.
1310 warning() <<
"setConst: NO Proxy for the dobj you want to set const"
1312 return StatusCode::FAILURE;
1316 return StatusCode::SUCCESS;
◆ setProxyProviderSvc()
◆ setSlotNumber()
| void SGImplSvc::setSlotNumber |
( |
int |
slot, |
|
|
int |
numSlots |
|
) |
| |
Set the Hive slot number for this store.
- Parameters
-
| slot | The slot number. -1 means that this isn't a Hive store. |
| numSlots | The total number of slots. Should be 1 for the non-Hive case. |
Definition at line 924 of file SGImplSvc.cxx.
◆ setStoreID()
set store ID. request forwarded to DataStore:
set store id in DataStore:
Definition at line 471 of file SGImplSvc.cxx.
◆ setupProxy()
| DataProxy * SGImplSvc::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
Definition at line 429 of file SGImplSvc.cxx.
438 if (0 !=
dp->object())
441 warning() <<
" setupProxy:: error setting up proxy for key "
442 << gK <<
" and clid " << dataID
443 <<
"\n Pre-existing valid DataProxy @"<<
dp
444 <<
" found in Store for key " <<
dp->object()->name()
445 <<
" with clid " <<
dp->object()->clID()
451 dp->setObject(pDObj);
452 if (!allowMods)
dp->setConst();
458 !allowMods, resetOnly);
460 warning() <<
" setupProxy:: could not addToStore proxy @" <<
dp
◆ sourceID()
Return the metadata source ID for the current event slot.
- Parameters
-
| 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.
Returns an empty string if no source has been set.
The default version always returns an empty string.
Definition at line 1832 of file SGImplSvc.cxx.
1839 return dh->begin()->getToken()->dbID().toString();
◆ start()
| StatusCode SGImplSvc::start |
( |
| ) |
|
|
finaloverridevirtual |
Service start.
Definition at line 199 of file SGImplSvc.cxx.
211 return StatusCode::SUCCESS;
◆ stop()
| StatusCode SGImplSvc::stop |
( |
| ) |
|
|
finaloverridevirtual |
Service stop.
Definition at line 214 of file SGImplSvc.cxx.
221 ISvcManager* pISM(
dynamic_cast<ISvcManager*
>(serviceLocator().
get()));
223 return StatusCode::FAILURE;
224 pISM->setPriority(
name(), pISM->getPriority(
name())+1).ignore();
225 verbose() <<
"stop: setting service priority to " << pISM->getPriority(
name())
226 <<
" so that event stores get finalized and cleared before other stores" <<
endmsg;
228 return StatusCode::SUCCESS;
◆ store() [1/2]
◆ store() [2/2]
◆ storeID()
get store ID. request forwarded to DataStore:
get store id from DataStore:
Definition at line 477 of file SGImplSvc.cxx.
◆ stringToKey()
Find the key for a string/CLID pair.
- Parameters
-
| str | The string to look up. |
| clid | The 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!
Definition at line 1457 of file SGImplSvc.cxx.
◆ symLink() [1/2]
make a soft link to the object pointed by id/key
Definition at line 590 of file SGImplSvc.cxx.
596 StatusCode::SUCCESS :
◆ symLink() [2/2]
| StatusCode SGImplSvc::symLink |
( |
const void * |
p2BRegistered, |
|
|
CLID |
linkID |
|
) |
| |
make a soft link to the object T* already registered
Definition at line 579 of file SGImplSvc.cxx.
586 StatusCode::SUCCESS :
◆ t2pRegister()
◆ t2pRemove()
| void SGImplSvc::t2pRemove |
( |
const void *const |
pTrans | ) |
|
|
private |
◆ transientContains()
| bool SGImplSvc::transientContains |
( |
const CLID |
id, |
|
|
const std::string & |
key |
|
) |
| const |
Look up a transient data object in TDS only by CLID.
returns false if object not available in TDS
Definition at line 711 of file SGImplSvc.cxx.
715 }
catch(...) {
return false; }
◆ transientProxy()
get proxy with given id and key.
Does not query ProxyProviderSvc.
- Returns
- 0 to flag failure
Definition at line 966 of file SGImplSvc.cxx.
970 return ( (0 !=
dp &&
dp->isValidObject()) ?
dp : 0 );
◆ transientSwap()
| bool SGImplSvc::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 990 of file SGImplSvc.cxx.
994 const bool checkValid =
true;
997 if ( 0 ==
a || 0 ==
b ) {
return false; }
998 DataObject* objA =
a->accessData();
999 DataObject* objB =
b->accessData();
1001 if ( 0 == objA || 0 == objB ) {
return false; }
1003 const unsigned int refCntA = objA->addRef();
1004 const unsigned int refCntB = objB->addRef();
1008 a->setObject( objA );
1009 b->setObject( objB );
1011 return ( (refCntA-1) == objA->release() &&
1012 (refCntB-1) == objB->release() );
◆ tryELRemap()
| bool SGImplSvc::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_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. |
- Returns
- True if there is a remapping; false otherwise.
Definition at line 1611 of file SGImplSvc.cxx.
1621 index_out = index_in +
payload.index_offset;
◆ typeCount()
| int SGImplSvc::typeCount |
( |
const CLID & |
id | ) |
const |
Return the number of instances of type T (input CLID)
Definition at line 694 of file SGImplSvc.cxx.
◆ typeless_overwrite()
| StatusCode SGImplSvc::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 1064 of file SGImplSvc.cxx.
1077 const bool FORCEREMOVE(
true);
1080 if (
sc.isSuccess()) {
1081 const bool ALLOWOVERWRITE(
true);
1082 const bool NORESET(
false);
1083 if (
record_impl(
obj,
key, raw_ptr, allowMods, NORESET, ALLOWOVERWRITE, tinfo) ==
nullptr)
1084 sc = StatusCode::FAILURE;
◆ typeless_record() [1/3]
| StatusCode SGImplSvc::typeless_record |
( |
DataObject * |
obj, |
|
|
const std::string & |
key, |
|
|
const void *const |
raw_ptr, |
|
|
bool |
allowMods, |
|
|
bool |
resetOnly, |
|
|
bool |
noHist, |
|
|
const std::type_info * |
tinfo |
|
) |
| |
|
private |
◆ typeless_record() [2/3]
| StatusCode SGImplSvc::typeless_record |
( |
DataObject * |
obj, |
|
|
const std::string & |
key, |
|
|
const void *const |
raw_ptr, |
|
|
bool |
allowMods, |
|
|
bool |
resetOnly, |
|
|
bool |
noHist, |
|
|
const std::type_info * |
tinfo, |
|
|
SG::DataProxy ** |
proxy_ret, |
|
|
bool |
noOverwrite |
|
) |
| |
|
private |
Definition at line 1037 of file SGImplSvc.cxx.
1047 if (
proxy ==
nullptr )
1048 return StatusCode::FAILURE;
1053 return StatusCode::SUCCESS;
1057 return StatusCode::SUCCESS;
◆ typeless_record() [3/3]
| StatusCode SGImplSvc::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 1016 of file SGImplSvc.cxx.
◆ typeless_retrievePrivateCopy()
| DataObject * SGImplSvc::typeless_retrievePrivateCopy |
( |
const CLID |
clid, |
|
|
const std::string & |
key |
|
) |
| |
◆ unboundHandle()
| void SGImplSvc::unboundHandle |
( |
IResetable * |
handle | ) |
|
|
finaloverridevirtual |
Tell the store that a handle has been unbound from a proxy.
- Parameters
-
| handle | The handle that was unbound. The default implementation does nothing. |
Definition at line 1769 of file SGImplSvc.cxx.
◆ ActiveStoreSvc
◆ AthenaInternal::py_sg_clearProxyPayload
◆ AthenaInternal::recordObjectToStore
◆ AthenaOutputStream
◆ IOVDbSvc
◆ IOVSvcTool
◆ SG::VarHandleBase
◆ StoreGateSvc
◆ m_ActivateHistory
| bool SGImplSvc::m_ActivateHistory |
|
private |
Activate the history service.
Definition at line 693 of file SGImplSvc.h.
◆ m_arena
Allocation arena to associate with this store.
Definition at line 709 of file SGImplSvc.h.
◆ m_DumpArena
| bool SGImplSvc::m_DumpArena |
|
private |
◆ m_DumpStore
| bool SGImplSvc::m_DumpStore |
|
private |
◆ m_folderNameList
| StringArrayProperty SGImplSvc::m_folderNameList |
|
private |
◆ m_mutex
◆ m_newBoundHandles
Keep track of proxies bound since the last call to commitNewDataObjects or clearStore.
Has to be done per-thread. We can't use thread_specific_ptr because we want to be able to clear the vectors for all threads in clearStore().
Definition at line 721 of file SGImplSvc.h.
◆ m_numSlots
| int SGImplSvc::m_numSlots |
|
private |
The total number of slots. 1 if this isn't a Hive store.
Definition at line 715 of file SGImplSvc.h.
◆ m_pCLIDSvc
◆ m_pDataLoader
◆ m_pHistorySvc
◆ m_pIncSvc
◆ m_pIOVSvc
get the IOVSvc "just in time" (breaks recursion at initialize)
Definition at line 700 of file SGImplSvc.h.
◆ m_pPPS
◆ m_pPPSHandle
◆ m_pStore
◆ m_remap_impl
◆ m_remapMutex
◆ m_slotNumber
| int SGImplSvc::m_slotNumber |
|
private |
The Hive slot number for this store, or -1 if this isn't a Hive store.
Definition at line 712 of file SGImplSvc.h.
◆ m_storeLoaded
| bool SGImplSvc::m_storeLoaded |
|
private |
FIXME hack needed by loadEventProxies.
Definition at line 702 of file SGImplSvc.h.
◆ m_stringpool
◆ m_stringPoolMutex
| mutex_t SGImplSvc::m_stringPoolMutex |
|
mutableprivate |
◆ m_trash
| std::list<DataObject*> SGImplSvc::m_trash |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
static bool isVersionedKey(const char *)
quickly determine whether a string has the right format to be a VK
int typeCount(const CLID &id) const
Count number of object of a given type in store.
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
StatusCode t2pRegister(const void *const pTrans, DataProxy *const pPers)
methods to query the T2PMap:
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
std::string find(const std::string &s)
return a remapped string
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
virtual DataProxy * proxy(const TransientAddress *tAddr) const override
return proxy for a given type/key pair if key is empty returns the default proxy (currently last regi...
virtual StatusCode loadProxies(IProxyRegistry &dataStore)=0
add new proxies to store every Event:
virtual void * object()=0
virtual StatusCode addAlias(const std::string &aliasKey, DataProxy *proxy) override
add alias to store
StatusCode recordAddress(const std::string &skey, CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
StatusCode removeProxy(SG::DataProxy *proxy, const void *pTrans, bool forceRemove=false)
remove proxy from store, unless it is reset only.
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
std::map< std::thread::id, std::vector< IResetable * > > m_newBoundHandles
Keep track of proxies bound since the last call to commitNewDataObjects or clearStore.
StatusCode proxyRange(const CLID &id, SG::ConstProxyIterator &beg, SG::ConstProxyIterator &end) const
return a range to all proxies of a given CLID
static const std::type_info * CLIDToTypeinfo(CLID clid)
Translate between CLID and type_info.
mutex_t m_stringPoolMutex
ServiceHandle< IIncidentSvc > m_pIncSvc
property
void emptyTrash()
throw away bad objects
StoreMap::const_iterator ConstStoreIterator
void clearStore(bool force, bool hard, MsgStream *pmlog)
If HARD is true, then the bound objects should also clear any data that depends on the identity of th...
bool isValid() const
called by destructor
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
void setStoreID(StoreID::type id)
StatusCode setState(SG::ConstProxyIterator itr, SG::ConstProxyIterator itrEnd, bool isConst)
Reset state of the iterator.
bool m_ActivateHistory
Activate the history service.
ArenaBase * makeCurrent()
Make this Arena the current one for its ArenaHeader.
TransientAddress::TransientClidSet CLIDCont_t
bool m_storeLoaded
FIXME hack needed by loadEventProxies.
void report(std::ostream &os) const
Generate a report of the memory in use by this Arena.
int m_slotNumber
The Hive slot number for this store, or -1 if this isn't a Hive store.
void clear()
Empty the pool.
StoreID::type storeID() const
get store ID. request forwarded to DataStore:
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
a resetable object (e.g. a SG DataHandle)
ServiceHandle< IConversionSvc > m_pDataLoader
bool m_DumpStore
Dump Property flag: triggers dump() at EndEvent.
msgSvc
Provide convenience handles for various services.
std::vector< CLID > clids() const
Return all CLIDs in the store.
bool bindHandleToProxy(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
name says it all
::StatusCode StatusCode
StatusCode definition for legacy code.
void reset()
Reset all contained allocators.
SG::Arena m_arena
Allocation arena to associate with this store.
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of ...
SG::StringPool m_stringpool
Default, invalid implementation of ClassID_traits.
StatusCode addSymLink(const CLID &linkid, DataProxy *proxy)
add symlink to store:
void clearProxyPayload(SG::DataProxy *)
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method corre...
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
std::vector< CLID > get_copy_conversions() const
Return known copy conversions.
#define CHECK(...)
Evaluate an expression and check for errors.
ServiceHandle< IHistorySvc > m_pHistorySvc
const std::string * keyToString(sgkey_t key) const
Find the string corresponding to a given key.
AthROOTErrorHandlerSvc * svc
void erase()
Erase all contained allocators.
SG::DataProxy * record_impl(DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool resetOnly, bool allowOverwrite, const std::type_info *tinfo)
real recording of an object with a key, allow possibility of specifying const-access
virtual StatusCode preLoadProxies(IProxyRegistry &dataStore)=0
add proxies to the store before Begin Event:
uint32_t CLID
The Class ID type.
CLID clID() const
Retrieve clid.
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
virtual StoreID::type storeID() const override
virtual SG::DataProxy * retrieveProxy(const CLID &id, const std::string &key, IProxyRegistry &dataStore)=0
Use a provider to create a proxy for ID/KEY.
std::string dump() const
dump objects in store.
StatusCode record_HistObj(const CLID &id, const std::string &key, const std::string &store, bool allowMods, bool resetOnly=true)
std::string to_string(const DetectorType &type)
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
void recycle(DataObject *pBadDObj)
put a bad (unrecordable) dobj away
bool m_DumpArena
DumpArena Property flag : trigger m_arena->report() at clearStore.
void keys(const CLID &id, std::vector< std::string > &vkeys, bool includeAlias, bool onlyValid)
CLID clid(const std::string &key) const
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!
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...
virtual const name_type & name() const override final
Retrieve data object key == string.
DataProxy * locatePersistent(const void *const pTransient) const
locate the persistent (proxy) for a given T* (void*):
int m_numSlots
The total number of slots. 1 if this isn't a Hive store.
ServiceHandle< IClassIDSvc > m_pCLIDSvc
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
#define REPORT_MESSAGE(LVL)
Report a message.
virtual void handle(const Incident &) override final
triggered by Incident service
Interface for non-const operations on an auxiliary store.
int ir
counter of the current depth
bool isValidObject() const
is the object valid?
virtual StatusCode addToStore(const CLID &id, DataProxy *proxy) override
add proxy to store.
bool hasAlias(const std::string &key) const
Test to see if a given string is in the alias set.
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
virtual SG::DataProxy * proxy_exact(sgkey_t sgkey) const override
get proxy with given key.
ServiceHandle< IIOVSvc > m_pIOVSvc
get the IOVSvc "just in time" (breaks recursion at initialize)
bool transientID(CLID id) const
return the list of transient IDs (primary or symLinked):
std::list< DataObject * > m_trash
The Recycle Bin.
Hold DataProxy instances associated with a store.
const std::vector< DataProxy * > & proxies() const
All proxies managed by this store.
static StoreID::type findStoreID(const std::string &storeName)
The non-template portion of the BaseInfo implementation.
void t2pRemove(const void *const pTrans)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
IProxyProviderSvc * m_pPPS
StatusCode pRange(const CLID &id, SG::ConstProxyIterator &f, SG::ConstProxyIterator &e) const
Return an iterator over proxy for a given CLID:
std::lock_guard< mutex_t > lock_t
StatusCode removeProxy(DataProxy *proxy, bool forceRemove, bool hard)
remove proxy from store, unless proxy is reset only.
bool merge(const StringPool &other)
Merge another pool into this one.
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
#define ATLAS_THREAD_SAFE
std::string createKey(const CLID &dataID)
creates a key internally if none specified by client
sgkey_t stringToKey(const std::string &str, sgaux_t aux=0)
Find the key for a string.
T * get()
Get the pointer.
Interface for const operations on an auxiliary store.
void t2pRemove(const void *const pTrans)
forwarded to DataStore
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory
bool isSymLinked(const CLID &linkID, SG::DataProxy *dp)
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
StatusCode tRange(ConstStoreIterator &f, ConstStoreIterator &e) const
Return an iterator over the StoreMap:
StatusCode t2pRegister(const void *const pTrans, SG::DataProxy *const pPers)
forwarded to DataStore
SG::DataProxy * proxy_exact_unlocked(sgkey_t sgkey, std::recursive_mutex &mutex) const
Like proxy_exact, but intended to be called without holding the store lock.
const std::string & name() const
Return this Arena's name.
ProxyMap::const_iterator ConstProxyIterator
bool registerKey(sgkey_t key, const std::string &str, sgaux_t aux=0)
Remember an additional mapping from key to string.
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.
SG::RemapImpl * m_remap_impl