Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | List of all members
SGImplSvc Class Referencefinal

The Athena Transient Store API. More...

#include <SGImplSvc.h>

Inheritance diagram for SGImplSvc:
Collaboration diagram for SGImplSvc:

Public Member Functions

 SGImplSvc (const SGImplSvc &)=delete
 
SGImplSvcoperator= (const SGImplSvc &)=delete
 
 DeclareInterfaceID (IProxyDict, 2, 0)
 
 DeclareInterfaceID (IHiveStoreMgr, 1, 0)
 Declare interface ID. More...
 
Basic Client Interface: data object access
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...
 
Advanced Client Interface: data object registration
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...
 
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...
 
Advanced Client Interface: data object access
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< CLIDclids (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 ::IProxyDicthiveProxyDict () override final
 implements IHiveStore interface for compat with Hive More...
 
IOVSvc interface
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::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. 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...
 
virtual SG::DataProxyproxy (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::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
 get default proxy with given id, optionally checking validity. More...
 
virtual SG::DataProxyproxy (const CLID &id, const std::string &key, bool checkValid) const
 get proxy with given id and key, optionally checking validity. More...
 
virtual SG::DataProxyproxy (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< 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
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
 SGImplSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~SGImplSvc () override final
 Standard Destructor. More...
 
Gaudi IIncidentListener implementation
virtual void handle (const Incident &) override final
 triggered by Incident service More...
 
StatusCode loadEventProxies ()
 load proxies at begin event More...
 

String <-> int key conversions. IStringPool implementation

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...
 
bool mergeStringPool (const SGImplSvc &other)
 Merge the string pool from another store into this one. More...
 

Gaudi IService implementation

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 StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface) override final
 
static const InterfaceID & interfaceID ()
 Should rather be in ISGImplSvc.h if we had one. More...
 

IHiveStoreMgr implementation

typedef std::recursive_mutex mutex_t
 
typedef std::lock_guard< mutex_tlock_t
 
class IOVDbSvc
 access clearProxyPayload More...
 
class IOVSvcTool
 
class AthenaOutputStream
 access proxyRange() More...
 
class StoreGateSvc
 
class SG::VarHandleBase
 access typeless_record More...
 
class ActiveStoreSvc
 
PyObjectAthenaInternal::recordObjectToStore (StoreGateSvc *, PyObject *, PyObject *, bool, bool, bool)
 
void AthenaInternal::py_sg_clearProxyPayload (StoreGateSvc *, SG::DataProxy *)
 
ServiceHandle< IClassIDSvc > m_pCLIDSvc
 
ServiceHandle< IConversionSvc > m_pDataLoader
 
ServiceHandle< IProxyProviderSvcm_pPPSHandle
 
IProxyProviderSvcm_pPPS
 
ServiceHandle< IHistorySvc > m_pHistorySvc
 
SG::DataStorem_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< IIOVSvcm_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::RemapImplm_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::DataProxyrecord_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::DataProxylocatePersistent (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::DataStorestore ()
 
const SG::DataStorestore () 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::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...
 
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...
 

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
Author
ATLAS Collaboration
Id
SGImplSvc.h 797595 2017-02-16 18:36:10Z ssnyder

Definition at line 106 of file SGImplSvc.h.

Member Typedef Documentation

◆ lock_t

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

Definition at line 726 of file SGImplSvc.h.

◆ mutex_t

typedef std::recursive_mutex SGImplSvc::mutex_t
private

Definition at line 725 of file SGImplSvc.h.

◆ sgkey_t

Definition at line 353 of file SGImplSvc.h.

Constructor & Destructor Documentation

◆ SGImplSvc() [1/2]

SGImplSvc::SGImplSvc ( const SGImplSvc )
delete

◆ SGImplSvc() [2/2]

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

Standard Constructor.

Definition at line 102 of file SGImplSvc.cxx.

103  : Service(name, svc),
104  m_pCLIDSvc("ClassIDSvc", name),
105  m_pDataLoader("EventPersistencySvc", name),
106  m_pPPSHandle("ProxyProviderSvc", name),
107  m_pPPS(nullptr),
108  m_pHistorySvc("HistorySvc", name),
109  m_pStore(new DataStore(*this)),
110  m_pIncSvc("IncidentSvc", name),
111  m_DumpStore(false),
112  m_ActivateHistory(false),
113  m_DumpArena(false),
114  m_pIOVSvc("IOVSvc", name),
115  m_storeLoaded(false),
117  m_arena (name),
118  m_slotNumber(-1),
119  m_numSlots(1)
120 {
121  //our properties
122  declareProperty("ProxyProviderSvc", m_pPPSHandle);
123  declareProperty("Dump", m_DumpStore);
124  declareProperty("ActivateHistory", m_ActivateHistory);
125  declareProperty("DumpArena", m_DumpArena);
126  //StoreGateSvc properties
127  declareProperty("IncidentSvc", m_pIncSvc);
128  //add handler for Service base class property
129  m_outputLevel.declareUpdateHandler(&SGImplSvc::msg_update_handler, this);
130 
132  header->addArena (&m_arena);
133 }

◆ ~SGImplSvc()

SGImplSvc::~SGImplSvc ( )
finaloverridevirtual

Standard Destructor.

Definition at line 137 of file SGImplSvc.cxx.

137  {
139  header->delArena (&m_arena);
140 
141  delete m_pStore;
142  delete m_remap_impl;
143 }

Member Function Documentation

◆ accessData() [1/2]

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

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

Definition at line 1008 of file SGImplSvc.cxx.

1009 {
1010  lock_t lock (m_mutex);
1011  DataProxy* theProxy(proxy(id, true));
1012  return (0 == theProxy) ? 0 : theProxy->accessData();
1013 }

◆ 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 1016 of file SGImplSvc.cxx.

1017 {
1018  lock_t lock (m_mutex);
1019  DataProxy* theProxy(proxy(id, key, true));
1020  return (0 == theProxy) ? 0 : theProxy->accessData();
1021 }

◆ addAlias()

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

Definition at line 715 of file SGImplSvc.cxx.

716 {
717  if (0 == proxy) {
718  warning() << "addAlias: no target DataProxy given, Cannot alias to a non-existing object"
719  << endmsg;
720  return StatusCode::FAILURE;
721  }
722 
723  // add key to proxy and to ProxyStore
724  return m_pStore->addAlias(aliasKey, proxy);
725 }

◆ 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 1710 of file SGImplSvc.cxx.

1715 {
1716  // Automatically make all legal base class symlinks
1717  if (!tinfo) {
1719  }
1720  const SG::BaseInfoBase* bib = nullptr;
1721  if (tinfo) {
1722  bib = SG::BaseInfoBase::find (*tinfo);
1723  }
1724  if (!bib) {
1725  // Could succeed where the previous fails if clid for DataVector<T>
1726  // but tinfo is for ConstDataVector<DataVector<T> >.
1727  bib = SG::BaseInfoBase::find (clid);
1728  }
1729  if ( bib ) {
1730  const std::vector<CLID>& bases = bib->get_bases();
1731  for ( std::size_t i = 0, iMax = bases.size(); i < iMax; ++i ) {
1732  if ( bases[i] != clid ) {
1733  if ( addSymLink( bases[i], dp ).isSuccess() ) {
1734  // register with t2p
1735  if (dp->object())
1736  this->t2pRegister( SG::DataProxy_cast( dp, bases[i] ), dp ).ignore();
1737  }
1738  else {
1739  warning() << "record_impl: Doing auto-symlinks for object with CLID "
1740  << clid
1741  << " and SG key " << key
1742  << ": Proxy already set for base CLID " << bases[i]
1743  << "; not making auto-symlink." << endmsg;
1744  }
1745  }
1746  }
1747 
1748  // Handle copy conversions.
1749  {
1750  for (CLID copy_clid : bib->get_copy_conversions()) {
1751  if (m_pStore->addSymLink (copy_clid, dp).isFailure()) {
1752  warning() << "record_impl: Doing auto-symlinks for object with CLID "
1753  << clid
1754  << " and SG key " << key
1755  << ": Proxy already set for copy-conversion CLID "
1756  << copy_clid
1757  << "; not making auto-symlink." << endmsg;
1758  }
1759  }
1760  }
1761  }
1762  else {
1763  if (warn_nobib) {
1764  warning() << "record_impl: Could not find suitable SG::BaseInfoBase for CLID ["
1765  << clid << "] (" << key << ") !\t"
1766  << "No auto-symlink established !"
1767  << endmsg;
1768  }
1769  }
1770 }

◆ addSymLink()

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

Definition at line 635 of file SGImplSvc.cxx.

636 {
637  if (0 == dp) {
638  warning() << "addSymLink: no target DataProxy found. Sorry, can't link to a non-existing data object"
639  << endmsg;
640  return StatusCode::FAILURE;
641  }
642  StatusCode sc = m_pStore->addSymLink(linkid, dp);
643 
644  // If the symlink is a derived->base conversion, then we may have
645  // a different transient pointer for the symlink.
646  if (sc.isSuccess() && dp->object()) {
647  void* baseptr = SG::DataProxy_cast (dp, linkid);
648  if (baseptr)
649  this->t2pRegister (baseptr, dp).ignore();
650  }
651  return sc;
652 }

◆ addToStore()

StatusCode SGImplSvc::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 829 of file SGImplSvc.cxx.

830 {
831  lock_t lock (m_mutex);
832  return m_pStore->addToStore (id, proxy);
833 }

◆ associateAux_impl() [1/2]

bool SGImplSvc::associateAux_impl ( SG::AuxElement ptr,
const std::string &  key,
CLID  auxclid 
) const
private

Definition at line 1950 of file SGImplSvc.cxx.

1953 {
1954  lock_t lock (m_mutex);
1955  SG_MSG_VERBOSE("called associateAux_impl for key " + key);
1956  // no Aux store set yet
1957  if (!ptr->hasStore()) {
1958  SG::DataProxy* dp = proxy (auxclid, key + "Aux.", true);
1959  if (dp) {
1960  if (!dp->isConst()) {
1961  SG::IAuxStore* pAux = SG::DataProxy_cast<SG::IAuxStore> (dp);
1962  if (pAux) {
1963  ptr->setStore (pAux);
1964  return true;
1965  }
1966  }
1967 
1968  const SG::IConstAuxStore* pAux = SG::DataProxy_cast<SG::IConstAuxStore> (dp);
1969  if (pAux) {
1970  ptr->setStore (pAux);
1971  return true;
1972  }
1973  }
1974  }
1975  return false;
1976 }

◆ associateAux_impl() [2/2]

bool SGImplSvc::associateAux_impl ( SG::AuxVectorBase ptr,
const std::string &  key,
CLID  auxclid 
) const
private

Definition at line 1915 of file SGImplSvc.cxx.

1918 {
1919  // If we already have the aux store (as should usually be the case), return
1920  // without taking out the SG lock. Otherwise, we can deadlock
1921  // if another thread is also trying to dereference a link to the aux store.
1922  // (Should _not_ be holding the SG lock when dereferencing the link!)
1923  if (ptr->hasStore()) return true;
1924 
1925  lock_t lock (m_mutex);
1926  SG_MSG_VERBOSE("called associateAux_impl for key " + key);
1927  // no Aux store set yet
1928  if (!ptr->hasStore()) {
1929  SG::DataProxy* dp = proxy (auxclid, key + "Aux.", true);
1930  if (dp) {
1931  if (!dp->isConst()) {
1932  SG::IAuxStore* pAux = SG::DataProxy_cast<SG::IAuxStore> (dp);
1933  if (pAux) {
1934  ptr->setStore (pAux);
1935  return true;
1936  }
1937  }
1938 
1939  const SG::IConstAuxStore* pAux = SG::DataProxy_cast<SG::IConstAuxStore> (dp);
1940  if (pAux) {
1941  ptr->setStore (pAux);
1942  return true;
1943  }
1944  }
1945  }
1946  return false;
1947 }

◆ bindHandleToProxy()

bool SGImplSvc::bindHandleToProxy ( const CLID id,
const std::string &  key,
IResetable ir,
SG::DataProxy *&  dp 
)
private

name says it all

Definition at line 1391 of file SGImplSvc.cxx.

1393 {
1394  lock_t lock (m_mutex);
1395 
1396  dp = m_pStore->proxy (id, key);
1397  if (dp == nullptr && m_pPPS != nullptr) {
1398  dp = m_pPPS->retrieveProxy(id, key, *m_pStore);
1399  }
1400 
1401  if (0 == dp) return false;
1402 
1403  if (! dp->bindHandle(ir) ) {
1404  fatal() << "DataHandle at " << hex << ir << dec
1405  << " already bound to DataProxy with key " << ir->key()
1406  << ". Cannot bind to proxy " << dp->name() << " as well\n"
1407  << " You have probably registered multiple callbacks via regFcn with the same DataHandle using different keys (DataProxies)\n"
1408  << endmsg;
1409  return false;
1410  }
1411 
1412  //already done in DataHandleBase::setState dp->addRef();
1413 
1414 #ifndef NDEBUG
1415  SG_MSG_DEBUG(" Bound handle " << MSG::hex << ir << " to proxy "
1416  << dp << MSG::dec);
1417 #endif
1418  return true;
1419 }

◆ bindHandleToProxyAndRegister() [1/2]

bool SGImplSvc::bindHandleToProxyAndRegister ( const CLID id,
const std::string &  key,
IResetable ir,
SG::DataProxy *&  dp 
)
private

Also do registration with IOVSvc.

Definition at line 1423 of file SGImplSvc.cxx.

1425 {
1426  lock_t lock (m_mutex);
1427  bool ret = bindHandleToProxy (id, key, ir, dp);
1428  if (ret) {
1429  StatusCode sc = m_pIOVSvc->regProxy(dp,key);
1430  if (sc.isFailure()) return false;
1431  }
1432  return true;
1433 }

◆ bindHandleToProxyAndRegister() [2/2]

bool SGImplSvc::bindHandleToProxyAndRegister ( const CLID id,
const std::string &  key,
IResetable ir,
SG::DataProxy *&  dp,
const CallBackID c,
const IOVSvcCallBackFcn fcn,
bool  trigger 
)
private

Definition at line 1437 of file SGImplSvc.cxx.

1442 {
1443  lock_t lock (m_mutex);
1444  bool ret = bindHandleToProxy (id, key, ir, dp);
1445  if (ret) {
1446  StatusCode sc = m_pIOVSvc->regProxy(dp,key);
1447  if (sc.isFailure()) return false;
1448  sc = m_pIOVSvc->regFcn(dp,c,fcn,trigger);
1449  if (sc.isFailure()) return false;
1450  }
1451  return true;
1452 }

◆ boundHandle()

void SGImplSvc::boundHandle ( IResetable handle)
finaloverridevirtual

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

Parameters
proxyThe proxy that was bound. The default implementation does nothing.

Reimplemented from IProxyDict.

Definition at line 1791 of file SGImplSvc.cxx.

1792 {
1793  m_newBoundHandles[std::this_thread::get_id()].push_back (handle);
1794 }

◆ clearProxyPayload()

void SGImplSvc::clearProxyPayload ( SG::DataProxy dp)
private

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

Definition at line 1597 of file SGImplSvc.cxx.

1597  {
1598  lock_t lock (m_mutex);
1599 
1600  // Remove transient pointer entries for this proxy.
1601  // But do that only if the proxy has a valid object.
1602  // Otherwise, we could trigger I/O --- which we don't want since it's useless
1603  // (we'd just destroy the object immediately). In some cases it can also
1604  // lead to a deadlock (see ATR-24482).
1605  if (dp->isValidObject()) {
1606  SG::DataProxy::CLIDCont_t clids = dp->transientID();
1607  SG::DataProxy::CLIDCont_t::const_iterator i(clids.begin()), e(clids.end());
1608  while (i != e) {
1610  }
1611  }
1612 
1613  bool hard_reset = (m_numSlots > 1);
1614  dp->reset (hard_reset);
1615 }

◆ clearStore()

StatusCode SGImplSvc::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 268 of file SGImplSvc.cxx.

269 {
270 #ifdef DEBUG_SGIMPL
271  dbg::print(stderr, "SGImplSvc::clearStore(forceRemove={}) on {}\n", forceRemove, name());
272 #endif
273  {
274  if (m_DumpArena) {
275  std::ostringstream s;
276  m_arena.report(s);
277  info() << "Report for Arena: " << m_arena.name() << '\n'
278  << s.str() << endmsg;
279  }
280  }
281  {
282  lock_t lock (m_mutex);
283  emptyTrash();
284  for (auto& p : m_newBoundHandles)
285  p.second.clear();
286  assert(m_pStore);
287  debug() << "Clearing store with forceRemove="
288  << forceRemove << endmsg;
289  bool hard_reset = (m_numSlots > 1);
290  m_pStore->clearStore(forceRemove, hard_reset, &msgStream(MSG::DEBUG));
291  m_storeLoaded=false; //FIXME hack needed by loadEventProxies
292  }
293  {
294  lock_t remap_lock (m_remapMutex);
295  m_remap_impl->m_remaps.clear();
296  m_arena.reset();
297  }
298 
299  return StatusCode::SUCCESS;
300 }

◆ 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 1676 of file SGImplSvc.cxx.

1677 {
1678  lock_t lock (m_mutex);
1679  SG::DataStore::ConstStoreIterator s_iter, s_end;
1680  store()->tRange(s_iter, s_end).ignore();
1681 
1682  for ( ; s_iter != s_end; ++s_iter ) {
1683  if ( s_iter->second.find( key ) != s_iter->second.end() ) {
1684  return s_iter->first;
1685  }
1686  }
1687 
1688  return CLID_NULL;
1689 }

◆ clids() [1/2]

std::vector< CLID > SGImplSvc::clids ( ) const

Return all CLIDs in the store.

Definition at line 979 of file SGImplSvc.cxx.

980 {
981  lock_t lock (m_mutex);
982 
983  using std::distance;
984  DataStore::ConstStoreIterator s_iter, s_end;
985  store()->tRange(s_iter, s_end).ignore();
986 
987  std::vector<CLID> clids;
988  clids.reserve( distance( s_iter, s_end ) );
989 
990  for (; s_iter != s_end; ++s_iter ) {
991  const CLID id = s_iter->first;
992  clids.push_back (id);
993  }
994 
995  return clids;
996 }

◆ 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 1692 of file SGImplSvc.cxx.

1693 {
1694  lock_t lock (m_mutex);
1695  std::vector<CLID> clids;
1696  SG::DataStore::ConstStoreIterator s_iter, s_end;
1697  store()->tRange(s_iter, s_end).ignore();
1698 
1699  for ( ; s_iter != s_end; ++s_iter ) {
1700  if ( s_iter->second.find( key ) != s_iter->second.end() ) {
1701  clids.push_back(s_iter->first);
1702  }
1703  }
1704 
1705  return clids;
1706 }

◆ commitNewDataObjects()

void SGImplSvc::commitNewDataObjects ( )
finaloverridevirtual

Reset handles added since the last call to commit.

Implements IHiveStoreMgr.

Definition at line 1773 of file SGImplSvc.cxx.

1773  {
1774  lock_t lock (m_mutex);
1775 
1776  // Reset handles added since the last call to commit.
1777  bool hard_reset = (m_numSlots > 1);
1778  std::vector<IResetable*> handles;
1779  m_newBoundHandles[std::this_thread::get_id()].swap (handles);
1780  for (IResetable* h : handles)
1781  h->reset (hard_reset);
1782 }

◆ 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 735 of file SGImplSvc.cxx.

736 {
737  try {
738  return (0 != proxy(id, key, true));
739  } catch(...) { return false; }
740 }

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

263 {
264  return std::to_string(m_pStore->typeCount(id) + 1);
265 }

◆ createObj()

StatusCode SGImplSvc::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 1834 of file SGImplSvc.cxx.

1837 {
1838  // This lock was here originally, but is probably not really needed ---
1839  // both DataProxy and the I/O components have their own locks.
1840  // Further, this was observed to cause deadlocks for the detector store,
1841  // and would in general be expected to be a contention issue.
1842  //lock_t lock (m_mutex);
1843  return cvt->createObj (addr, refpObject);
1844 }

◆ DeclareInterfaceID() [1/2]

IHiveStoreMgr::DeclareInterfaceID ( IHiveStoreMgr  ,
,
 
)
inherited

Declare interface ID.

◆ DeclareInterfaceID() [2/2]

IProxyDict::DeclareInterfaceID ( IProxyDict  ,
,
 
)
inherited

◆ 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 557 of file SGImplSvc.cxx.

558 {
559  lock_t lock (m_mutex);
560  auto out_buffer = std::string{};
561  auto out = std::back_inserter(out_buffer);
562  const std::string me = name();
563  std::format_to(out, "{}: <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> \n", me);
564  std::format_to(out, "{}: SGImplSvc()::dump() which is {} \n", me, m_storeLoaded ? "LOADED" : "NOT LOADED");
565 
566  DataStore::ConstStoreIterator s_iter, s_end;
567  store()->tRange(s_iter, s_end).ignore();
568 
569  for (; s_iter != s_end; ++s_iter)
570  {
571 
572  CLID id = s_iter->first;
573  int nProxy = store()->typeCount(id);
574  std::string tname;
575  m_pCLIDSvc->getTypeNameOfID(id, tname).ignore();
576  std::format_to(out, "{}: Found {} {} for ClassID {} ({}): \n", me, nProxy, ((nProxy == 1) ? "proxy" : "proxies"), id, tname);
577 
578  // loop over each type:
579  SG::ConstProxyIterator p_iter = (s_iter->second).begin();
580  SG::ConstProxyIterator p_end = (s_iter->second).end();
581 
582  while (p_iter != p_end) {
583  const DataProxy& dp(*p_iter->second);
584  std::format_to(out, "{}: flags: ({:7s}, {:8s}, {:6s}) --- data: {:10p} --- key: {}\n", me,
585  (dp.isValid() ? "valid" : "INVALID"),
586  (dp.isConst() ? "locked" : "UNLOCKED"),
587  (dp.isResetOnly() ? "reset" : "DELETE"),
588  dbg::ptr(dp.object()), p_iter->first);
589  ++p_iter;
590  }
591  }
592  std::format_to(out, "{}: <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> \n", me);
593  return out_buffer;
594 }

◆ emptyTrash()

void SGImplSvc::emptyTrash ( )
private

throw away bad objects

Definition at line 1380 of file SGImplSvc.cxx.

1380  {
1381  lock_t lock (m_mutex);
1382  while (!m_trash.empty()) {
1383  m_trash.front()->release(); //delete the bad data object
1384  m_trash.pop_front(); //remove pointer from list
1385  }
1386 }

◆ finalize()

StatusCode SGImplSvc::finalize ( )
finaloverridevirtual

Service finalization.

Definition at line 303 of file SGImplSvc.cxx.

303  {
304  verbose() << "Finalizing " << name() << endmsg ;
305 
306  // Incident service may not work in finalize.
307  // Clear this, so that we won't try to send an incident from clearStore.
308  (m_pIncSvc.release()).ignore();
309 
310  const bool FORCEREMOVE(true);
311  clearStore(FORCEREMOVE).ignore();
312 
314  delete m_pStore;
315  m_pStore = nullptr;
316  delete m_remap_impl;
317  m_remap_impl = 0;
318  m_arena.erase();
319 
320  return Service::finalize();
321 }

◆ handle()

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

triggered by Incident service

Definition at line 232 of file SGImplSvc.cxx.

232  {
233 
234  if (inc.type() == "EndEvent") {
235  if (m_DumpStore) {
236  SG_MSG_DEBUG("Dumping StoreGate Contents");
237  info() << '\n' << dump() << endl
238  << endmsg;
239  }
240  }
241 }

◆ hiveProxyDict()

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

implements IHiveStore interface for compat with Hive

Reimplemented from IProxyDict.

Definition at line 227 of file SGImplSvc.h.

227  {
228  return this;
229  }

◆ initialize()

StatusCode SGImplSvc::initialize ( )
finaloverridevirtual

Service initialization.

Definition at line 147 of file SGImplSvc.cxx.

147  {
148 
149  verbose() << "Initializing " << name() << endmsg;
150 
152 
153  if (!m_pStore)
154  m_pStore = new DataStore (*this);
155  if (!m_remap_impl)
157 
158  //properties accessible from now on
159 
161  // If this is the default event store (StoreGateSvc), then declare
162  // our arena as the default for memory allocations.
163  if (this->storeID() == StoreID::EVENT_STORE) {
166  }
167  // set up the incident service:
168  if (!(m_pIncSvc.retrieve()).isSuccess()) {
169  error() << "Could not locate IncidentSvc "
170  << endmsg;
171  return StatusCode::FAILURE;
172  }
173 
174  // We explicitly do not retrieve m_pIOVSvc and rely on retrieval
175  // on first use to avoid an initialization loop here.
176 
177  CHECK( m_pDataLoader.retrieve() );
178  CHECK( m_pCLIDSvc.retrieve() );
179 
180  if (!m_pPPSHandle.empty()) {
181  CHECK( m_pPPSHandle.retrieve() );
182  m_pPPS = &*m_pPPSHandle;
183  }
184 
185  if ( m_pPPS && (m_pPPS->preLoadProxies(*m_pStore)).isFailure() )
186  {
187  SG_MSG_DEBUG(" Failed to preLoad proxies");
188  return StatusCode::FAILURE;
189  }
190 
191  // Get hold of History Service
192  if (m_ActivateHistory) {
193  CHECK( m_pHistorySvc.retrieve() );
194  }
195 
196  return StatusCode::SUCCESS;
197 }

◆ interfaceID()

const InterfaceID & SGImplSvc::interfaceID ( )
static

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

Definition at line 333 of file SGImplSvc.cxx.

333  {
334  static const InterfaceID IID("SGImplSvc", 1, 0);
335  return IID;
336 }

◆ isSymLinked()

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

Definition at line 527 of file SGImplSvc.cxx.

528 {
529  return (0 != dp) ? dp->transientID(linkID) : false;
530 }

◆ 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
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

Definition at line 518 of file SGImplSvc.cxx.

521 {
522  lock_t lock (m_mutex);
523  return store()->keys(id, vkeys, includeAlias, onlyValid);
524 }

◆ keyToString() [1/2]

const std::string * SGImplSvc::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.

Definition at line 1505 of file SGImplSvc.cxx.

1506 {
1507  lock_t lock (m_stringPoolMutex);
1508  return m_stringpool.keyToString (key);
1509 }

◆ keyToString() [2/2]

const std::string * SGImplSvc::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.

Definition at line 1521 of file SGImplSvc.cxx.

1522 {
1523  lock_t lock (m_stringPoolMutex);
1524  return m_stringpool.keyToString (key, clid);
1525 }

◆ loadEventProxies()

StatusCode SGImplSvc::loadEventProxies ( )

load proxies at begin event

Definition at line 243 of file SGImplSvc.cxx.

243  {
244  lock_t lock (m_mutex);
245  StatusCode sc(StatusCode::SUCCESS);
246  //FIXME this should probably be dealt with by the providers
247  if (0 != m_pPPS && !m_storeLoaded) {
248  m_storeLoaded = true;
250 #ifdef DEBUG_SGIMPL
251  dbg::print(stderr, "SGImplSvc::loadEventProxies() LOADED PROXIES on {}\n", name());
252  }
253  else {
254  dbg::print(stderr, "SGImplSvc::loadEventProxies() PROXIES ALREADY LOADED on {}\n", name());
255 #endif
256  }
257  return sc;
258 }

◆ locatePersistent()

DataProxy * SGImplSvc::locatePersistent ( const SG::TransientAddress tAddr,
bool  checkValid = false 
) const
private

Definition at line 1261 of file SGImplSvc.cxx.

1263 {
1264  DataProxy* dp = m_pStore->proxy(tAddr);
1265 
1266  if (checkValid && 0 != dp) {
1267  return dp->isValid() ? dp : 0;
1268  } else {
1269  return dp;
1270  }
1271 }

◆ makeCurrent()

void SGImplSvc::makeCurrent ( )
private

The current store is becoming the active store.

Switch the allocation arena, if needed. Only intended to be called by ActiveStoreSvc.

Switch the allocation arena, if needed, and call SG::CurrentEventStore::setStore.

Definition at line 1815 of file SGImplSvc.cxx.

1816 {
1817  lock_t lock (m_mutex);
1818  m_arena.makeCurrent();
1820 }

◆ mergeStringPool()

bool SGImplSvc::mergeStringPool ( const SGImplSvc other)

Merge the string pool from another store into this one.

Parameters
otherThe other store.

In case of collisions, the colliding entries are skipped, and false is returned. If no collisions, then true is returned.

Definition at line 1563 of file SGImplSvc.cxx.

1564 {
1565  // We should hold m_stringPoolMutex before touching the pool.
1566  // But if we acquire the locks for both this and the other store,
1567  // we risk a deadlock. So first copy the other pool, so that we
1568  // don't need to hold both locks at the same time.
1570  {
1571  lock_t lock (other.m_stringPoolMutex);
1572  tmp = other.m_stringpool;
1573  }
1574  lock_t lock (m_stringPoolMutex);
1575  return m_stringpool.merge (tmp);
1576 }

◆ msg_update_handler()

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

callback for output level property

Definition at line 1321 of file SGImplSvc.cxx.

1322 {
1323  setUpMessaging();
1324  updateMsgStreamOutputLevel( outputLevel() );
1325  msgSvc()->setOutputLevel(name(), outputLevel());
1326 }

◆ operator=()

SGImplSvc& SGImplSvc::operator= ( const SGImplSvc )
delete

◆ proxies()

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

return the list of all current proxies in store

Implements IProxyDict.

Definition at line 969 of file SGImplSvc.cxx.

970 {
971  lock_t lock (m_mutex);
972  const std::vector<SG::DataProxy*>& proxies = store()->proxies();
973  std::vector<const SG::DataProxy*> ret (proxies.begin(), proxies.end());
974  return ret;
975 }

◆ proxy() [1/7]

DataProxy * SGImplSvc::proxy ( const CLID id) const
finalvirtual

get default proxy with given id.

Returns 0 to flag failure Deprecated for the event store.

Definition at line 762 of file SGImplSvc.cxx.

763 {
764  return proxy(id, false);
765 }

◆ proxy() [2/7]

DataProxy * SGImplSvc::proxy ( const CLID id,
bool  checkValid 
) const
virtual

get default proxy with given id, optionally checking validity.

Returns
0 to flag failure

Check if it is valid

Definition at line 768 of file SGImplSvc.cxx.

769 {
770  DataProxy* dp = nullptr;
771  {
772  lock_t lock (m_mutex);
773  dp = m_pStore->proxy(id);
774  if (0 == dp && 0 != m_pPPS) {
776  dp = m_pPPS->retrieveProxy(id, string("DEFAULT"), *pStore);
777  }
778  }
780  // Be sure to release the lock before this.
781  // isValid() may call back to the store, so we could otherwise deadlock..
782  if (checkValid && 0 != dp) {
783  // FIXME: For keyless retrieve, this checks only the first instance
784  // of the CLID in store. If that happens to be invalid, but the second
785  // is valid - this does not work (when checkValid is requested).
786  return dp->isValid() ? dp : 0;
787  }
788  return dp;
789 }

◆ proxy() [3/7]

virtual SG::DataProxy* SGImplSvc::proxy ( const CLID id,
const char *  key 
) const
inlinefinalvirtual

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 263 of file SGImplSvc.h.

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

◆ proxy() [4/7]

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

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 315 of file SGImplSvc.h.

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

◆ proxy() [5/7]

DataProxy * SGImplSvc::proxy ( const CLID id,
const std::string &  key 
) const
finaloverridevirtual

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

Implements IProxyDict.

Definition at line 792 of file SGImplSvc.cxx.

793 {
794  return proxy(id, key, false);
795 }

◆ proxy() [6/7]

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

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

Returns
0 to flag failure

Definition at line 798 of file SGImplSvc.cxx.

799 {
800  DataProxy* dp = nullptr;
801  {
802  lock_t lock (m_mutex);
803  dp = m_pStore->proxy(id, key);
804 #ifdef DEBUG_SGIMPL
805  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");
806 #endif
807  if (0 == dp && 0 != m_pPPS) {
809  dp = m_pPPS->retrieveProxy(id, key, *pStore);
810 #ifdef DEBUG_SGIMPL
811  if (!dp) dbg::print(stderr, "::SGImplSvc::proxy(name={}, key={}): data proxy is still null\n", this->name(), key);
812 #endif
813  }
814  }
815  // Be sure to release the lock before this.
816  // isValid() may call back to the store, so we could otherwise deadlock..
817  if (checkValid && 0 != dp && !(dp->isValid())) {
818  dp = 0;
819  }
820  return dp;
821 }

◆ proxy() [7/7]

DataProxy * SGImplSvc::proxy ( const void *const  pTransient) const
finaloverridevirtual

get proxy for a given data object address in memory

Implements IProxyDict.

Definition at line 753 of file SGImplSvc.cxx.

754 {
755  // No lock needed here --- the T2pmap held by DataStore has its own locking
756  // (and we were seeing contention here).
757  //lock_t lock (m_mutex);
758  return m_pStore->locatePersistent(pTransient);
759 }

◆ proxy_exact()

SG::DataProxy * SGImplSvc::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.

Definition at line 946 of file SGImplSvc.cxx.

947 {
949 }

◆ proxyProviderSvc()

IProxyProviderSvc* SGImplSvc::proxyProviderSvc ( )

Return current ProxyProviderSvc.

◆ proxyRange()

StatusCode SGImplSvc::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 1329 of file SGImplSvc.cxx.

1331  {
1332  lock_t lock (m_mutex);
1333  return m_pStore->pRange(id,begin,end);
1334 }

◆ queryInterface()

StatusCode SGImplSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
finaloverridevirtual

Definition at line 343 of file SGImplSvc.cxx.

344 {
345  if ( IProxyDict::interfaceID().versionMatch(riid) ) {
346  *ppvInterface = (IProxyDict*)this;
347  }
348  else if ( IProxyDict::interfaceID().versionMatch(riid) ) {
349  *ppvInterface = (IProxyDict*)this;
350  }
351  else if ( IHiveStoreMgr::interfaceID().versionMatch(riid) ) {
352  *ppvInterface = (IHiveStoreMgr*)this;
353  }
354  else if ( interfaceID().versionMatch(riid) ) {
355  // In principle this should be cast to ISGImplSvc*. However, there
356  // is an anomaly in that existing clients are using the concrete StoreGate
357  // interface instead of an abstract ISGImplSvc interface.
358  *ppvInterface = (SGImplSvc*)this;
359  } else {
360  // Interface is not directly available: try out a base class
361  return Service::queryInterface(riid, ppvInterface);
362  }
363  addRef();
364  return StatusCode::SUCCESS;
365 }

◆ 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 1457 of file SGImplSvc.cxx.

1459  {
1460 
1461  DataHistory *dho;
1462  dho = m_pHistorySvc->createDataHistoryObj( id, key, store );
1463 
1464  std::string idname;
1465  StatusCode sc = m_pCLIDSvc->getTypeNameOfID(id, idname);
1466  if (sc.isFailure() || idname.empty() ) {
1467  idname = std::to_string(id);
1468  }
1469  idname += '/';
1470  idname += key;
1471 
1472  DataObject* obj = SG::asStorable(dho);
1473 
1474  const bool ALLOWOVERWRITE(false);
1475  if (record_impl(obj, idname, dho, allowMods, resetOnly, ALLOWOVERWRITE,
1476  &typeid(DataHistory)) == nullptr)
1477  return StatusCode::FAILURE;
1478  return StatusCode::SUCCESS;
1479 }

◆ 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 1133 of file SGImplSvc.cxx.

1137 {
1138  CLID clid = pDObj->clID();
1139  std::string rawKey(key);
1140  bool isVKey(SG::VersionedKey::isVersionedKey(key));
1141  if (isVKey) {
1142  //FIXME VersionedKeys will need to be handled more efficiently
1143  SG::VersionedKey vk(rawKey);
1144  DataProxy *dp(proxy(clid, vk.key()));
1145  if (dp) {
1146  //proxies primary key
1147  const std::string& pTAName(dp->name());
1148  //original key as versioned
1149  SG::VersionedKey primaryVK(pTAName);
1150 
1151  //if the existing matching object has no version
1152  //create a versioned alias for the original unversioned key
1153  //so it will remain accessible
1154  if (!SG::VersionedKey::isVersionedKey(pTAName)) {
1155  if (!(this->addAlias(primaryVK.rawVersionKey(), dp)).isSuccess()) {
1156  warning() << "record_impl: Could not setup alias key "
1157  << primaryVK.rawVersionKey()
1158  << " for unversioned object " << pTAName
1159  << endmsg;
1160  return nullptr;
1161  }
1162  }
1163  if (vk.isAuto()) {
1164  //make a new versioned key incrementing the existing version
1165  SG::VersionedKey newVK(primaryVK.key(), primaryVK.version()+1);
1166  //FIXME this will fail in a confusing way if version+1 is in use
1167  //FIXME need a better error message below, probably looking at all
1168  //FIXME aliases
1169  rawKey = newVK.rawVersionKey();
1170  }
1171  }
1172  }
1173  if (!allowOverwrite && m_pPPS) {
1174  //do not overwrite a persistent object
1175  DataProxy* dp = m_pStore->proxy (clid, rawKey);
1176  if (!dp) {
1177  dp = m_pPPS->retrieveProxy(clid, rawKey, *m_pStore);
1178  }
1179  if (dp && dp->provider()) {
1180  std::string clidTypeName;
1181  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1182  warning() << "record_impl: you are recording an object with key "
1183  << rawKey << ", type " << clidTypeName
1184  << " (CLID " << clid << ')'
1185  << "\n There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated."
1186  << endmsg;
1187  }
1188  }
1189  //now check whether raw_ptr has already been recorded
1190  //We need to do this before we create the bucket, the proxy etc
1191  SG::DataProxy* dp(proxy(raw_ptr));
1192  if (0 != dp) {
1193  std::string clidTypeName;
1194  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1195  warning() << "record_impl: failed for key="<< rawKey << ", type "
1196  << clidTypeName
1197  << " (CLID " << clid << ')'
1198  << "\n object @" << raw_ptr
1199  << " already in store with key="<< dp->name()
1200  << ". Will not record a duplicate! "
1201  << endmsg;
1202  if (pDObj != dp->object()) {
1203  DataBucketBase* pDBB(dynamic_cast<DataBucketBase*>(pDObj));
1204  if (!pDBB) std::abort();
1205  pDBB->relinquish(); //don't own the data obj already recorded!
1206  }
1207  this->recycle(pDObj);
1208  return nullptr;
1209  }
1210 
1211 
1212  // setup the proxy
1213  dp = setupProxy( clid, rawKey, pDObj, allowMods, resetOnly );
1214  if ( 0 == dp ) {
1215  std::string clidTypeName;
1216  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1217  warning() << "record_impl: Problem setting up the proxy for object @"
1218  << raw_ptr
1219  << "\n recorded with key " << rawKey
1220  << " of type " << clidTypeName
1221  << " (CLID " << clid << ") in DataObject @" << pDObj
1222  << endmsg;
1223 
1224  return nullptr;
1225  }
1226 
1227  // record in t2p:
1228  if ( !(this->t2pRegister( raw_ptr, dp )).isSuccess() ) {
1229  std::string clidTypeName;
1230  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1231  warning() << "record_impl: can not add to t2p map object @" <<raw_ptr
1232  << "\n with key " << rawKey
1233  << " of type " << clidTypeName
1234  << " (CLID " << clid << ')'
1235  << endmsg;
1236  return nullptr;
1237  }
1238 
1239  addAutoSymLinks (rawKey, clid, dp, tinfo);
1240 
1241  //handle versionedKeys: we register an alias with the "true" key
1242  //unless an object as already been recorded with that key.
1243  //Notice that addAlias overwrites any existing alias, so a generic
1244  //retrieve will always return the last version added
1245  //FIXME not the one with the highest version
1246  if (isVKey) {
1247  SG::VersionedKey vk(rawKey);
1248  if (!(this->addAlias(vk.key(), dp)).isSuccess()) {
1249  warning() << "record_impl: Could not setup alias key " << vk.key()
1250  << " for VersionedKey " << rawKey
1251  << ". Generic access to this object with clid" << clid
1252  << " will not work"
1253  << endmsg;
1254  }
1255  }
1256 
1257  return dp;
1258 }

◆ recordAddress() [1/2]

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

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

Definition at line 371 of file SGImplSvc.cxx.

374 {
375  lock_t lock (m_mutex);
376  assert(0 != pAddress);
377  CLID dataID = pAddress->clID();
378 
379  if (dataID == 0)
380  {
381  warning() << "recordAddress: Invalid Class ID found in IOpaqueAddress @"
382  << pAddress << ". IOA will not be recorded"
383  << endmsg;
384  return StatusCode::FAILURE;
385  }
386 
387  //do not overwrite a persistent object
388  if (m_pPPS) {
389  DataProxy* dp = m_pStore->proxy (dataID, skey);
390  if (!dp) {
391  dp = m_pPPS->retrieveProxy(dataID, skey, *m_pStore);
392  }
393  if (dp && dp->provider()) {
394  std::string clidTypeName;
395  m_pCLIDSvc->getTypeNameOfID(dataID, clidTypeName).ignore();
396  warning() << "recordAddress: failed for key="<< skey << ", type "
397  << clidTypeName
398  << " (CLID " << dataID << ')'
399  << "\n there is already a persistent version of this object. Will not record a duplicate! "
400  << endmsg;
401  return StatusCode::FAILURE;
402  }
403  }
404 
405  // Check if a key already exists
406  DataProxy* dp = m_pStore->proxy_exact(dataID, skey);
407  if (0 == dp && 0 != m_pPPS) {
408  dp = m_pPPS->retrieveProxy(dataID, skey, *m_pStore);
409  }
410 
411  // Now treat the various cases:
412  if (0 == dp)
413  {
414  // create the proxy object and register it
415  dp = new DataProxy (TransientAddress (dataID, skey,
416  pAddress, clearAddressFlag),
417  m_pDataLoader.get(), true, true);
418  m_pStore->addToStore(dataID, dp).ignore();
419 
420  addAutoSymLinks (skey, dataID, dp, 0, false);
421  }
422  else if ((0 != dp) && (0 == dp->address()))
423  // Note: intentionally not checking dp->isValidAddress()
424  {
425  // Update proxy with IOpaqueAddress
426  dp->setAddress(pAddress);
427  }
428  else
429  {
430  string errType;
431  m_pCLIDSvc->getTypeNameOfID(dataID, errType).ignore();
432  warning() << "recordAddress: preexisting proxy @" << dp
433  << " with non-NULL IOA found for key "
434  << skey << " type " << errType << " (" << dataID << "). \n"
435  << "Cannot record IOpaqueAddress @" << pAddress
436  << endmsg;
437  return StatusCode::FAILURE;
438  }
439 
440  return StatusCode::SUCCESS;
441 
442 }

◆ recordAddress() [2/2]

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

Create a proxy object using an IOpaqueAddress.

Definition at line 448 of file SGImplSvc.cxx.

449 {
450  lock_t lock (m_mutex);
451  assert(0 != pAddress);
452 
453  CLID dataID = pAddress->clID();
454 
455  string gK = (pAddress->par())[1]; // transient name by convention
456  if (gK.empty()) gK = (pAddress->par())[0]; // FIXME backward compatibility
457  if (gK.empty()) gK = createKey(dataID);
458 
459  return this->recordAddress(gK, pAddress, clearAddressFlag);
460 }

◆ recordObject()

SG::DataProxy * SGImplSvc::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 856 of file SGImplSvc.cxx.

860 {
861  lock_t lock (m_mutex);
862  const void* raw_ptr = obj.get();
863  const std::type_info* tinfo = nullptr;
864 
865  if (DataBucketBase* bucket = dynamic_cast<DataBucketBase*> (obj.get())) {
866  raw_ptr = bucket->object();
867  tinfo = &bucket->tinfo();
868  }
869 
870  if (returnExisting) {
871  SG::DataProxy* proxy = this->proxy (obj->clID(), key);
872  if (proxy && proxy->isValid()) return proxy;
873 
874  // Look for the same object recorded under a different key/clid.
875  proxy = this->proxy (raw_ptr);
876  if (proxy && proxy->isValid()) {
877  if (proxy->transientID (obj->clID())) {
878  // CLID matches. Make an alias.
879  if (addAlias (key, proxy).isFailure()) {
880  CLID clid = proxy->clID();
881  std::string clidTypeName;
882  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
883  warning() << "SGImplSvc::recordObject: addAlias fails for object "
884  << clid << "[" << clidTypeName << "] " << proxy->name()
885  << " and new key " << key
886  << endmsg;
887 
888  proxy = nullptr;
889  }
890  }
891 
892  else if (key == proxy->name() ||
893  proxy->alias().count (key) > 0)
894  {
895  // key matches. Make a symlink.
896  if (addSymLink (obj->clID(), proxy).isFailure()) {
897  CLID clid = proxy->clID();
898  std::string clidTypeName;
899  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
900  CLID newclid = obj->clID();
901  std::string newclidTypeName;
902  m_pCLIDSvc->getTypeNameOfID(newclid, newclidTypeName).ignore();
903  error() << "SGImplSvc::recordObject: addSymLink fails for object "
904  << clid << "[" << clidTypeName << "] " << proxy->name()
905  << " and new clid " << newclid << "[" << newclidTypeName << "]"
906  << endmsg;
907  proxy = nullptr;
908  }
909  }
910 
911  else {
912  CLID clid = proxy->clID();
913  std::string clidTypeName;
914  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
915  CLID newclid = obj->clID();
916  std::string newclidTypeName;
917  m_pCLIDSvc->getTypeNameOfID(newclid, newclidTypeName).ignore();
918  error() << "SGImplSvc::recordObject: existing object found with "
919  << clid << "[" << clidTypeName << "] " << proxy->name()
920  << " but neither clid " << newclid << "[" << newclidTypeName << "]"
921  << " nor key " << key << " match."
922  << endmsg;
923  proxy = nullptr;
924  }
925 
926  return proxy;
927  }
928  }
929 
930  const bool resetOnly = true;
931  const bool noHist = false;
932  SG::DataProxy* proxy = nullptr;
933  if (this->typeless_record (obj.get(), key, raw_ptr,
934  allowMods, resetOnly, noHist, tinfo,
935  &proxy, true).isFailure())
936  {
937  return nullptr;
938  }
939  return proxy;
940 }

◆ recycle()

void SGImplSvc::recycle ( DataObject *  pBadDObj)
private

put a bad (unrecordable) dobj away

Definition at line 1373 of file SGImplSvc.cxx.

1373  {
1374  assert(pBadDObj);
1375  pBadDObj->addRef();
1376  m_trash.push_back(pBadDObj);
1377 }

◆ regFcn() [1/2]

StatusCode SGImplSvc::regFcn ( const CallBackID c1,
const CallBackID c2,
const IOVSvcCallBackFcn fcn,
bool  trigger = false 
)

register a callback function(2) with an already registered function(1)

Definition at line 534 of file SGImplSvc.cxx.

538 {
539  lock_t lock (m_mutex);
540  return ( m_pIOVSvc->regFcn(c1,c2,fcn,trigger) );
541 }

◆ regFcn() [2/2]

StatusCode SGImplSvc::regFcn ( const std::string &  toolName,
const CallBackID c2,
const IOVSvcCallBackFcn fcn,
bool  trigger = false 
)

register a callback function(2) with an already registered AlgTool

Definition at line 545 of file SGImplSvc.cxx.

549 {
550  lock_t lock (m_mutex);
551  return ( m_pIOVSvc->regFcn(toolName,c2,fcn,trigger) );
552 }

◆ registerKey()

void SGImplSvc::registerKey ( sgkey_t  key,
const std::string &  str,
CLID  clid 
)
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 1540 of file SGImplSvc.cxx.

1543 {
1544  lock_t lock (m_stringPoolMutex);
1545  if (!m_stringpool.registerKey (key, str, clid)) {
1546  CLID clid2;
1547  const std::string* str2 = m_stringpool.keyToString (key, clid2);
1548  REPORT_MESSAGE (MSG::WARNING) << "The numeric key " << key
1549  << " maps to multiple string key/CLID pairs: "
1550  << *str2 << "/" << clid2 << " and "
1551  << str << "/" << clid;
1552  }
1553 }

◆ reinitialize()

StatusCode SGImplSvc::reinitialize ( )
finaloverridevirtual

Service reinitialization.

Definition at line 324 of file SGImplSvc.cxx.

324  {
325  verbose() << "Reinitializing " << name() << endmsg ;
326  const bool FORCEREMOVE(true);
327  clearStore(FORCEREMOVE).ignore();
328  //not in v20r2p2! return Service::reinitialize();
329  return StatusCode::SUCCESS;
330 }

◆ 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 1580 of file SGImplSvc.cxx.

1580  {
1581  lock_t lock (m_mutex);
1582  DataProxy *pP(0);
1583  if (0 != (pP = proxy(id, key))) {
1584  // remove all entries from t2p map
1585  SG::DataProxy::CLIDCont_t clids = pP->transientID();
1586  SG::DataProxy::CLIDCont_t::const_iterator i(clids.begin()), e(clids.end());
1587  while (i != e) t2pRemove(SG::DataProxy_cast (pP, *i++));
1588  DataBucketBase *pDBB(dynamic_cast<DataBucketBase*>(pP->object()));
1589  //tell the bucket to let go of the data object
1590  if (0 != pDBB) pDBB->relinquish(); //somebody else better took ownership
1591  bool hard_reset = (m_numSlots > 1);
1592  pP->reset (hard_reset);
1593  }
1594 }

◆ 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 1625 of file SGImplSvc.cxx.

1628 {
1629  lock_t lock (m_remapMutex);
1631  payload.target = target;
1632  payload.index_offset = index_offset;
1634 }

◆ remove()

StatusCode SGImplSvc::remove ( const void *  pObject)

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

Definition at line 1356 of file SGImplSvc.cxx.

1357 {
1358  lock_t lock (m_mutex);
1359  return removeProxy(proxy(pObject), pObject);
1360 }

◆ removeDataAndProxy()

StatusCode SGImplSvc::removeDataAndProxy ( const void *  pObject)

Remove pObject and its proxy no matter what.

Definition at line 1365 of file SGImplSvc.cxx.

1366 {
1367  lock_t lock (m_mutex);
1368  const bool FORCEREMOVE(true);
1369  return removeProxy(proxy(pObject), pObject, FORCEREMOVE);
1370 }

◆ 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
forceRemoveremove the proxy no matter what

Definition at line 1274 of file SGImplSvc.cxx.

1276 {
1277  lock_t lock (m_mutex);
1278  // check if valid proxy
1279  if (0 == proxy) return StatusCode::FAILURE;
1280 
1281  if (0 == pTrans) {
1282  DataBucketBase* bucket = dynamic_cast<DataBucketBase*>(proxy->object());
1283  if (bucket) pTrans = bucket->object();
1284  }
1285 
1286  // remove all entries from t2p map
1287  // --- only if the proxy actually has an object!
1288  // otherwise, we can trigger I/O.
1289  // besides being useless here, we can get deadlocks if we
1290  // call into the I/O code while holding the SG lock.
1291  if (proxy->isValidObject()) {
1292  this->t2pRemove(pTrans);
1294  for (SG::DataProxy::CLIDCont_t::const_iterator i = clids.begin();
1295  i != clids.end();
1296  ++i)
1297  {
1298  void* ptr = SG::DataProxy_cast (proxy, *i);
1299  this->t2pRemove(ptr);
1300  }
1301  }
1302 
1303  // remove from store
1304  return m_pStore->removeProxy(proxy, forceRemove, true);
1305 }

◆ retrieve()

StatusCode SGImplSvc::retrieve ( CLID  clid,
SG::detail::IteratorBase cibegin,
SG::detail::IteratorBase ciend 
) const

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

Definition at line 1884 of file SGImplSvc.cxx.

1887 {
1888  lock_t lock (m_mutex);
1891 
1892  if (!(proxyRange(clid,first,end)).isSuccess()) {
1893  std::string typnam;
1894  m_pCLIDSvc->getTypeNameOfID(clid, typnam).ignore();
1895  SG_MSG_DEBUG("retrieve(range): no object found "
1896  << " of type " << typnam
1897  << "(CLID " << clid << ')');
1898  }
1899 
1900  (ciend.setState(end, end, true)).ignore();
1901 
1902  if (!(cibegin.setState(first, end, true)).isSuccess()) {
1903  std::string typnam;
1904  m_pCLIDSvc->getTypeNameOfID(clid, typnam).ignore();
1905  SG_MSG_DEBUG("retrieve(range): Can't initialize iterator for object range "
1906  << " of type " << typnam
1907  << "(CLID " << clid << ')');
1908  return StatusCode::FAILURE;
1909  }
1910 
1911  return StatusCode::SUCCESS;
1912 }

◆ 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 682 of file SGImplSvc.cxx.

684 {
685  lock_t lock (m_mutex);
686 
687  SG::DataProxy* dp(0);
688  dp = proxy(clid, key);
689  if (0 == dp) {
690  error() << "setAlias: problem setting alias "
691  << std::string(aKey) << '\n'
692  << "DataObject does not exist, record before setting alias."
693  << endmsg;
694  return StatusCode::FAILURE;
695  }
696 
697  StatusCode sc = addAlias(aKey, dp);
698  if (sc.isFailure()) {
699  error() << "setAlias: problem setting alias "
700  << (std::string)aKey << '\n'
701  << "DataObject does not exist, record before setting alias."
702  << endmsg;
703  return StatusCode::FAILURE;
704  }
705 
706  return StatusCode::SUCCESS;
707 }

◆ 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 655 of file SGImplSvc.cxx.

656 {
657  lock_t lock (m_mutex);
658 
659  SG::DataProxy* dp(0);
660  dp = proxy(pObject);
661  if (0 == dp) {
662  error() << "setAlias: problem setting alias "
663  << aliasKey << '\n'
664  << "DataObject does not exist, record before setting alias."
665  << endmsg;
666  return StatusCode::FAILURE;
667  }
668 
669  StatusCode sc = addAlias(aliasKey, dp);
670  if (sc.isFailure()) {
671  error() << "setAlias: problem setting alias "
672  << aliasKey << '\n'
673  << "DataObject does not exist, record before setting alias."
674  << endmsg;
675  return StatusCode::FAILURE;
676  }
677 
678  return StatusCode::SUCCESS;
679 }

◆ setAlias() [3/3]

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

make an alias to a DataObject (provide valid proxy)

Definition at line 709 of file SGImplSvc.cxx.

710 {
711  return addAlias( aliasKey, proxy );
712 }

◆ setConst()

StatusCode SGImplSvc::setConst ( const void *  pointer)

prevent downstream clients from modifying the pointed-at dobj

Definition at line 1336 of file SGImplSvc.cxx.

1337 {
1338  lock_t lock (m_mutex);
1339  // Check if DataProxy does not exist
1340  DataProxy * dp = proxy(pObject);
1341 
1342  if (0 == dp)
1343  {
1344  warning() << "setConst: NO Proxy for the dobj you want to set const"
1345  << endmsg;
1346  return StatusCode::FAILURE;
1347  }
1348 
1349  dp->setConst();
1350  return StatusCode::SUCCESS;
1351 }

◆ setProxyProviderSvc()

void SGImplSvc::setProxyProviderSvc ( IProxyProviderSvc pPPSvc)

associate ProxyProviderSvc to this store

◆ setSlotNumber()

void SGImplSvc::setSlotNumber ( int  slot,
int  numSlots 
)

Set the Hive slot number for this store.

Parameters
slotThe slot number. -1 means that this isn't a Hive store.
numSlotsThe total number of slots. Should be 1 for the non-Hive case.

Definition at line 958 of file SGImplSvc.cxx.

959 {
960  m_slotNumber = slot;
961  m_numSlots = numSlots;
962 
964  header->setArenaForSlot (slot, &m_arena);
965 }

◆ setStoreID()

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

set store ID. request forwarded to DataStore:

set store id in DataStore:

Definition at line 504 of file SGImplSvc.cxx.

505 {
506  lock_t lock (m_mutex);
507  store()->setStoreID(id);
508 }

◆ 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 462 of file SGImplSvc.cxx.

466  {
467  // locate the proxy
468  DataProxy* dp = m_pStore->proxy_exact(dataID, gK);
469 
470  if (0 != dp) { //proxy found
471  if (0 != dp->object())
472  {
473  // Case 0: duplicated proxy
474  warning() << " setupProxy:: error setting up proxy for key "
475  << gK << " and clid " << dataID
476  << "\n Pre-existing valid DataProxy @"<< dp
477  << " found in Store for key " << dp->object()->name()
478  << " with clid " << dp->object()->clID()
479  << endmsg;
480  recycle(pDObj); // commit this object to trash
481  dp = 0;
482  } else {
483  // Case 1: Proxy found... if not valid, update it:
484  dp->setObject(pDObj);
485  if (!allowMods) dp->setConst();
486  }
487  } else {
488  // Case 2: No Proxy found:
489  dp = new DataProxy(pDObj,
490  TransientAddress(dataID, gK),
491  !allowMods, resetOnly);
492  if (!(m_pStore->addToStore(dataID, dp).isSuccess())) {
493  warning() << " setupProxy:: could not addToStore proxy @" << dp
494  << endmsg;
495  recycle(pDObj); // commit this object to trash
496  delete dp;
497  dp = 0;
498  }
499  }
500  return dp;
501 }

◆ sourceID()

SG::SourceID SGImplSvc::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.

Returns an empty string if no source has been set.

The default version always returns an empty string.

Reimplemented from IProxyDict.

Definition at line 1866 of file SGImplSvc.cxx.

1867 {
1868  lock_t lock (m_mutex);
1870  if (dp) {
1871  const DataHeader* dh = SG::DataProxy_cast<DataHeader> (dp);
1872  if (dh) {
1873  return dh->begin()->getToken()->dbID().toString();
1874  }
1875  }
1876  return "";
1877 }

◆ start()

StatusCode SGImplSvc::start ( )
finaloverridevirtual

Service start.

Definition at line 199 of file SGImplSvc.cxx.

199  {
200 
201  verbose() << "Start " << name() << endmsg;
202  /*
203  // This will need regFcn clients to be updated first.
204  if ( 0 == m_pPPS || (m_pPPS->preLoadProxies(*m_pStore)).isFailure() ) {
205  debug() << " Failed to preLoad proxies"
206  << endmsg;
207  return StatusCode::FAILURE;
208  }
209  */
210 
211  return StatusCode::SUCCESS;
212 }

◆ stop()

StatusCode SGImplSvc::stop ( )
finaloverridevirtual

Service stop.

Definition at line 214 of file SGImplSvc.cxx.

214  {
215 
216  verbose() << "Stop " << name() << endmsg;
217  //HACK ALERT: ID event store objects refer to det store objects
218  //by setting an ad-hoc priority for event store(s) we make sure they are finalized and hence cleared first
219  // see e.g. https://savannah.cern.ch/bugs/index.php?99993
220  if (store()->storeID() == StoreID::EVENT_STORE) {
221  ISvcManager* pISM(dynamic_cast<ISvcManager*>(serviceLocator().get()));
222  if (!pISM)
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;
227  }
228  return StatusCode::SUCCESS;
229 }

◆ store() [1/2]

DataStore * SGImplSvc::store ( )
private

Definition at line 597 of file SGImplSvc.cxx.

598 {
599  return m_pStore;
600 }

◆ store() [2/2]

const DataStore * SGImplSvc::store ( ) const
private

Definition at line 603 of file SGImplSvc.cxx.

604 {
605  return m_pStore;
606 }

◆ storeID()

StoreID::type SGImplSvc::storeID ( ) const

get store ID. request forwarded to DataStore:

get store id from DataStore:

Definition at line 510 of file SGImplSvc.cxx.

511 {
512  lock_t lock (m_mutex);
513  return store()->storeID();
514 }

◆ stringToKey()

SGImplSvc::sgkey_t SGImplSvc::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 1491 of file SGImplSvc.cxx.

1492 {
1493  lock_t lock (m_stringPoolMutex);
1494  return m_stringpool.stringToKey (str, clid);
1495 }

◆ symLink() [1/2]

StatusCode SGImplSvc::symLink ( const CLID  id,
const std::string &  key,
const CLID  linkid 
)

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

Definition at line 623 of file SGImplSvc.cxx.

624 {
625  lock_t lock (m_mutex);
626  SG::DataProxy* dp(proxy(id, key, false));
627  // if symLink already exists, just return success
628  return isSymLinked(linkID,dp) ?
629  StatusCode::SUCCESS :
630  addSymLink(linkID,dp);
631 }

◆ symLink() [2/2]

StatusCode SGImplSvc::symLink ( const void *  p2BRegistered,
CLID  linkID 
)

make a soft link to the object T* already registered

Definition at line 612 of file SGImplSvc.cxx.

613 {
614  lock_t lock (m_mutex);
615  SG::DataProxy* dp(proxy(pObject));
616 
617  // if symLink already exists, just return success
618  return isSymLinked(linkID,dp) ?
619  StatusCode::SUCCESS :
620  addSymLink(linkID,dp);
621 }

◆ t2pRegister()

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

forwarded to DataStore

Definition at line 1308 of file SGImplSvc.cxx.

1309 {
1310  return m_pStore->t2pRegister(pTrans, pPers);
1311 }

◆ t2pRemove()

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

forwarded to DataStore

Definition at line 1315 of file SGImplSvc.cxx.

1316 {
1317  m_pStore->t2pRemove(pTrans);
1318 }

◆ 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 744 of file SGImplSvc.cxx.

745 {
746  try {
747  return (0 != transientProxy(id, key));
748  } catch(...) { return false; }
749 }

◆ transientProxy()

DataProxy * SGImplSvc::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 1000 of file SGImplSvc.cxx.

1001 {
1002  lock_t lock (m_mutex);
1003  DataProxy* dp(m_pStore->proxy(id, key));
1004  return ( (0 != dp && dp->isValidObject()) ? dp : 0 );
1005 }

◆ 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 1024 of file SGImplSvc.cxx.

1026 {
1027  lock_t lock (m_mutex);
1028  const bool checkValid = true;
1029  DataProxy* a = proxy( id, keyA, checkValid );
1030  DataProxy* b = proxy( id, keyB, checkValid );
1031  if ( 0 == a || 0 == b ) { return false; }
1032  DataObject* objA = a->accessData();
1033  DataObject* objB = b->accessData();
1034 
1035  if ( 0 == objA || 0 == objB ) { return false; }
1036  // prevent 'accidental' release of DataObjects...
1037  const unsigned int refCntA = objA->addRef();
1038  const unsigned int refCntB = objB->addRef();
1039  // in case swap is being specialized for DataObjects
1040  using std::swap;
1041  swap( objA, objB );
1042  a->setObject( objA );
1043  b->setObject( objB );
1044  // and then restore old ref-count;
1045  return ( (refCntA-1) == objA->release() &&
1046  (refCntB-1) == objB->release() );
1047 }

◆ 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_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 1645 of file SGImplSvc.cxx.

1647 {
1648  lock_t lock (m_remapMutex);
1650  m_remap_impl->m_remaps.find (sgkey_in);
1651  if (i == m_remap_impl->m_remaps.end())
1652  return false;
1653  const SG::RemapImpl::remap_t& payload = i->second;
1654  sgkey_out = payload.target;
1655  index_out = index_in + payload.index_offset;
1656  return true;
1657 }

◆ typeCount()

int SGImplSvc::typeCount ( const CLID id) const

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

Definition at line 727 of file SGImplSvc.cxx.

728 {
729  lock_t lock (m_mutex);
730  return m_pStore->typeCount(id);
731 }

◆ 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 1098 of file SGImplSvc.cxx.

1105 {
1106  lock_t lock (m_mutex);
1107  StatusCode sc(StatusCode::SUCCESS);
1108  SG::DataProxy* toRemove(proxy(clid, key, false));
1109  if (0 != toRemove) {
1110  toRemove->addRef();
1111  const bool FORCEREMOVE(true);
1112  sc =removeProxy(toRemove, (void*)0, FORCEREMOVE);
1113  }
1114  if (sc.isSuccess()) {
1115  const bool ALLOWOVERWRITE(true);
1116  const bool NORESET(false);
1117  if (record_impl( obj, key, raw_ptr, allowMods, NORESET, ALLOWOVERWRITE, tinfo) == nullptr)
1118  sc = StatusCode::FAILURE;
1119  else if ( m_ActivateHistory && noHist && store()->storeID() == StoreID::EVENT_STORE ) {
1120  sc = record_HistObj( obj->clID(), key, name(), allowMods, NORESET );
1121  }
1122  }
1123  //for detector store objects managed by IIOVSvc, replace the old proxy with the new one (#104311)
1124  if (toRemove && sc.isSuccess() && store()->storeID() == StoreID::DETECTOR_STORE) {
1125  sc = m_pIOVSvc->replaceProxy(toRemove, proxy(clid, key));
1126  }
1127  if (toRemove)
1128  toRemove->release();
1129  return sc;
1130 }

◆ 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

Definition at line 1060 of file SGImplSvc.cxx.

1064 {
1065  return typeless_record (obj, key, raw_ptr, allowMods, resetOnly, noHist,tinfo,
1066  nullptr, true);
1067 }

◆ 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 1071 of file SGImplSvc.cxx.

1077 {
1078  lock_t lock (m_mutex);
1079  SG::DataProxy* proxy =
1080  record_impl( obj, key, raw_ptr, allowMods, resetOnly, !noOverwrite, tinfo);
1081  if ( proxy == nullptr )
1082  return StatusCode::FAILURE;
1083  if (proxy_ret)
1084  *proxy_ret = proxy;
1085 
1086  if ( !m_ActivateHistory || noHist ) {
1087  return StatusCode::SUCCESS;
1088  }
1089 
1090  if ( store()->storeID() != StoreID::EVENT_STORE ) {
1091  return StatusCode::SUCCESS;
1092  } else {
1093  return record_HistObj( obj->clID(), key, name(), allowMods, resetOnly );
1094  }
1095 }

◆ 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 1050 of file SGImplSvc.cxx.

1053 {
1054  return typeless_record (obj, key, raw_ptr, allowMods, resetOnly, noHist, 0,
1055  nullptr, true);
1056 }

◆ typeless_retrievePrivateCopy()

DataObject * SGImplSvc::typeless_retrievePrivateCopy ( const CLID  clid,
const std::string &  key 
)

Definition at line 1660 of file SGImplSvc.cxx.

1662 {
1663  lock_t lock (m_mutex);
1664  DataObject* obj = nullptr;
1665  SG::DataProxy* dp = proxy (clid, key);
1666  //we do not want anyone to mess up with our copy hence we release it immediately.
1667  if (dp && dp->isValid()) {
1668  obj = dp->object();
1669  obj->addRef();
1671  }
1672  return obj;
1673 }

◆ unboundHandle()

void SGImplSvc::unboundHandle ( IResetable handle)
finaloverridevirtual

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

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

Reimplemented from IProxyDict.

Definition at line 1803 of file SGImplSvc.cxx.

1804 {
1805  std::vector<IResetable*>& v = m_newBoundHandles[std::this_thread::get_id()];
1807  std::find (v.begin(), v.end(), handle);
1808  if (it != v.end())
1809  v.erase (it);
1810 }

Friends And Related Function Documentation

◆ ActiveStoreSvc

friend class ActiveStoreSvc
friend

Definition at line 674 of file SGImplSvc.h.

◆ 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 601 of file SGImplSvc.h.

◆ IOVDbSvc

friend class IOVDbSvc
friend

access clearProxyPayload

Definition at line 587 of file SGImplSvc.h.

◆ IOVSvcTool

friend class IOVSvcTool
friend

Definition at line 588 of file SGImplSvc.h.

◆ SG::VarHandleBase

friend class SG::VarHandleBase
friend

access typeless_record

Definition at line 609 of file SGImplSvc.h.

◆ StoreGateSvc

friend class StoreGateSvc
friend

Definition at line 607 of file SGImplSvc.h.

Member Data Documentation

◆ m_ActivateHistory

bool SGImplSvc::m_ActivateHistory
private

Activate the history service.

Definition at line 695 of file SGImplSvc.h.

◆ m_arena

SG::Arena SGImplSvc::m_arena
private

Allocation arena to associate with this store.

Definition at line 711 of file SGImplSvc.h.

◆ m_DumpArena

bool SGImplSvc::m_DumpArena
private

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

Definition at line 696 of file SGImplSvc.h.

◆ m_DumpStore

bool SGImplSvc::m_DumpStore
private

Dump Property flag: triggers dump() at EndEvent.

Definition at line 694 of file SGImplSvc.h.

◆ m_folderNameList

StringArrayProperty SGImplSvc::m_folderNameList
private

FolderNameList Property.

Definition at line 699 of file SGImplSvc.h.

◆ m_mutex

mutex_t SGImplSvc::m_mutex
mutableprivate

Definition at line 727 of file SGImplSvc.h.

◆ m_newBoundHandles

std::map<std::thread::id, std::vector<IResetable*> > SGImplSvc::m_newBoundHandles
private

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 723 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 717 of file SGImplSvc.h.

◆ m_pCLIDSvc

ServiceHandle<IClassIDSvc> SGImplSvc::m_pCLIDSvc
private

Definition at line 680 of file SGImplSvc.h.

◆ m_pDataLoader

ServiceHandle<IConversionSvc> SGImplSvc::m_pDataLoader
private

Definition at line 681 of file SGImplSvc.h.

◆ m_pHistorySvc

ServiceHandle<IHistorySvc> SGImplSvc::m_pHistorySvc
private

Definition at line 688 of file SGImplSvc.h.

◆ m_pIncSvc

ServiceHandle<IIncidentSvc> SGImplSvc::m_pIncSvc
private

property

Definition at line 693 of file SGImplSvc.h.

◆ m_pIOVSvc

ServiceHandle<IIOVSvc> SGImplSvc::m_pIOVSvc
private

get the IOVSvc "just in time" (breaks recursion at initialize)

Definition at line 702 of file SGImplSvc.h.

◆ m_pPPS

IProxyProviderSvc* SGImplSvc::m_pPPS
private

Definition at line 686 of file SGImplSvc.h.

◆ m_pPPSHandle

ServiceHandle<IProxyProviderSvc> SGImplSvc::m_pPPSHandle
private

Definition at line 683 of file SGImplSvc.h.

◆ m_pStore

SG::DataStore* SGImplSvc::m_pStore
private

Definition at line 690 of file SGImplSvc.h.

◆ m_remap_impl

SG::RemapImpl* SGImplSvc::m_remap_impl
private

Definition at line 708 of file SGImplSvc.h.

◆ m_remapMutex

mutex_t SGImplSvc::m_remapMutex
mutableprivate

Definition at line 728 of file SGImplSvc.h.

◆ 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 714 of file SGImplSvc.h.

◆ m_storeLoaded

bool SGImplSvc::m_storeLoaded
private

FIXME hack needed by loadEventProxies.

Definition at line 704 of file SGImplSvc.h.

◆ m_stringpool

SG::StringPool SGImplSvc::m_stringpool
private

Definition at line 706 of file SGImplSvc.h.

◆ m_stringPoolMutex

mutex_t SGImplSvc::m_stringPoolMutex
mutableprivate

Definition at line 729 of file SGImplSvc.h.

◆ m_trash

std::list<DataObject*> SGImplSvc::m_trash
private

The Recycle Bin.

Definition at line 691 of file SGImplSvc.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SG::DataProxy_cast
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
Definition: DataProxy_cast.h:53
SG::VersionedKey::isVersionedKey
static bool isVersionedKey(const char *)
quickly determine whether a string has the right format to be a VK
Definition: SGVersionedKey.cxx:18
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
SG::DataStore::typeCount
int typeCount(const CLID &id) const
Count number of object of a given type in store.
Definition: Control/SGTools/src/DataStore.cxx:408
common.sgkey
def sgkey(tool)
Definition: common.py:1028
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
SGImplSvc::addSymLink
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:635
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
SG::DataStore::t2pRegister
StatusCode t2pRegister(const void *const pTrans, DataProxy *const pPers)
methods to query the T2PMap:
Definition: Control/SGTools/src/DataStore.cxx:616
header
Definition: hcg.cxx:526
SGImplSvc::clearStore
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
Definition: SGImplSvc.cxx:268
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DataBucketBase
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
Definition: DataBucketBase.h:24
SG::StringPool
Definition: StringPool.h:35
IProxyProviderSvc::loadProxies
virtual StatusCode loadProxies(IProxyRegistry &dataStore)=0
add new proxies to store every Event:
DataBucketBase::object
virtual void * object()=0
initialize
void initialize()
Definition: run_EoverP.cxx:894
extractSporadic.c1
c1
Definition: extractSporadic.py:134
SGImplSvc::removeProxy
StatusCode removeProxy(SG::DataProxy *proxy, const void *pTrans, bool forceRemove=false)
remove proxy from store, unless it is reset only.
Definition: SGImplSvc.cxx:1274
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:407
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::TransientAddress
Definition: TransientAddress.h:32
SG::DataStore::addToStore
virtual StatusCode addToStore(const CLID &id, DataProxy *proxy)
add proxy to store.
Definition: Control/SGTools/src/DataStore.cxx:142
SG::CurrentEventStore::setStore
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
Definition: CurrentEventStore.cxx:36
SGImplSvc::m_newBoundHandles
std::map< std::thread::id, std::vector< IResetable * > > m_newBoundHandles
Keep track of proxies bound since the last call to commitNewDataObjects or clearStore.
Definition: SGImplSvc.h:723
SGImplSvc::proxyRange
StatusCode proxyRange(const CLID &id, SG::ConstProxyIterator &beg, SG::ConstProxyIterator &end) const
return a range to all proxies of a given CLID
Definition: SGImplSvc.cxx:1329
CLIDRegistry::CLIDToTypeinfo
static const std::type_info * CLIDToTypeinfo(CLID clid)
Translate between CLID and type_info.
Definition: CLIDRegistry.cxx:136
SGImplSvc::m_stringPoolMutex
mutex_t m_stringPoolMutex
Definition: SGImplSvc.h:729
SGImplSvc::m_pIncSvc
ServiceHandle< IIncidentSvc > m_pIncSvc
property
Definition: SGImplSvc.h:693
get_generator_info.stderr
stderr
Definition: get_generator_info.py:40
SGImplSvc::emptyTrash
void emptyTrash()
throw away bad objects
Definition: SGImplSvc.cxx:1380
SG::DataStore::ConstStoreIterator
StoreMap::const_iterator ConstStoreIterator
Definition: Control/SGTools/SGTools/DataStore.h:81
SG::DataStore::clearStore
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...
Definition: Control/SGTools/src/DataStore.cxx:68
SG::DataProxy::isValid
bool isValid() const
called by destructor
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
SGImplSvc::proxies
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
Definition: SGImplSvc.cxx:969
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::RemapImpl
Definition: SGImplSvc.cxx:85
SG::BaseInfoBase::get_bases
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
Definition: BaseInfo.cxx:304
SG::DataStore::proxy
virtual DataProxy * proxy(const TransientAddress *tAddr) const
return proxy for a given type/key pair if key is empty returns the default proxy (currently last regi...
Definition: Control/SGTools/src/DataStore.cxx:417
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
SG::DataStore::setStoreID
void setStoreID(StoreID::type id)
Definition: Control/SGTools/SGTools/DataStore.h:92
SG::detail::IteratorBase::setState
StatusCode setState(SG::ConstProxyIterator itr, SG::ConstProxyIterator itrEnd, bool isConst)
Reset state of the iterator.
Definition: SGIterator.cxx:94
SGImplSvc::m_ActivateHistory
bool m_ActivateHistory
Activate the history service.
Definition: SGImplSvc.h:695
SG::Arena::makeCurrent
ArenaBase * makeCurrent()
Make this Arena the current one for its ArenaHeader.
Definition: Arena.cxx:59
SG::DataProxy::CLIDCont_t
TransientAddress::TransientClidSet CLIDCont_t
Definition: DataProxy.h:54
SGImplSvc::m_storeLoaded
bool m_storeLoaded
FIXME hack needed by loadEventProxies.
Definition: SGImplSvc.h:704
SG::ArenaBase::report
void report(std::ostream &os) const
Generate a report of the memory in use by this Arena.
Definition: ArenaBase.cxx:76
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SGImplSvc::m_slotNumber
int m_slotNumber
The Hive slot number for this store, or -1 if this isn't a Hive store.
Definition: SGImplSvc.h:714
SG::StringPool::clear
void clear()
Empty the pool.
Definition: StringPool.cxx:350
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::RemapImpl::m_remaps
remap_map_t m_remaps
Definition: SGImplSvc.cxx:93
SGImplSvc::storeID
StoreID::type storeID() const
get store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:510
SG::asStorable
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Definition: DataObjectSharedPtr.h:65
SG::DataStore::proxy_exact
SG::DataProxy * proxy_exact(sgkey_t sgkey) const
get proxy with given key.
Definition: Control/SGTools/src/DataStore.cxx:527
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:58
SGImplSvc::m_pStore
SG::DataStore * m_pStore
Definition: SGImplSvc.h:690
IResetable
a resetable object (e.g. a SG DataHandle)
Definition: IResetable.h:15
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
python.UpdateManyBadChannelIOVs.toRemove
tuple toRemove
Definition: UpdateManyBadChannelIOVs.py:87
SGImplSvc::m_pDataLoader
ServiceHandle< IConversionSvc > m_pDataLoader
Definition: SGImplSvc.h:681
SGImplSvc::m_DumpStore
bool m_DumpStore
Dump Property flag: triggers dump() at EndEvent.
Definition: SGImplSvc.h:694
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
SGImplSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: SGImplSvc.cxx:979
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:126
lumiFormat.i
int i
Definition: lumiFormat.py:85
SG::ArenaHeader
Proxy for a group of Arenas.
Definition: ArenaHeader.h:54
SGImplSvc::bindHandleToProxy
bool bindHandleToProxy(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
name says it all
Definition: SGImplSvc.cxx:1391
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
SG::ArenaBase::reset
void reset()
Reset all contained allocators.
Definition: ArenaBase.cxx:44
SGImplSvc::m_arena
SG::Arena m_arena
Allocation arena to associate with this store.
Definition: SGImplSvc.h:711
SG::DataProxy::alias
AliasCont_t alias() const
access set of proxy aliases Returns a COPY of the alias set.
SG::VersionedKey
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of ...
Definition: SGVersionedKey.h:31
SGImplSvc::m_stringpool
SG::StringPool m_stringpool
Definition: SGImplSvc.h:706
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
SG::DataStore::addSymLink
StatusCode addSymLink(const CLID &linkid, DataProxy *proxy)
add symlink to store:
Definition: Control/SGTools/src/DataStore.cxx:333
SGImplSvc::clearProxyPayload
void clearProxyPayload(SG::DataProxy *)
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method corre...
Definition: SGImplSvc.cxx:1597
SGImplSvc::setupProxy
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
Definition: SGImplSvc.cxx:462
SG::BaseInfoBase::get_copy_conversions
std::vector< CLID > get_copy_conversions() const
Return known copy conversions.
Definition: BaseInfo.cxx:455
SGImplSvc
The Athena Transient Store API.
Definition: SGImplSvc.h:111
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SGImplSvc::m_pHistorySvc
ServiceHandle< IHistorySvc > m_pHistorySvc
Definition: SGImplSvc.h:688
SG::StringPool::keyToString
const std::string * keyToString(sgkey_t key) const
Find the string corresponding to a given key.
Definition: StringPool.cxx:286
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
SG::ArenaBase::erase
void erase()
Erase all contained allocators.
Definition: ArenaBase.cxx:60
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
SGImplSvc::record_impl
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
Definition: SGImplSvc.cxx:1133
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
IProxyProviderSvc::preLoadProxies
virtual StatusCode preLoadProxies(IProxyRegistry &dataStore)=0
add proxies to the store before Begin Event:
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::DataProxy::clID
CLID clID() const
Retrieve clid.
StoreID::DETECTOR_STORE
@ DETECTOR_STORE
Definition: StoreID.h:27
SGImplSvc::msg_update_handler
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
Definition: SGImplSvc.cxx:1321
IProxyProviderSvc::retrieveProxy
virtual SG::DataProxy * retrieveProxy(const CLID &id, const std::string &key, IProxyRegistry &dataStore)=0
Use a provider to create a proxy for ID/KEY.
SGImplSvc::recordAddress
StatusCode recordAddress(const std::string &skey, IOpaqueAddress *pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
Definition: SGImplSvc.cxx:371
SG::DataStore::storeID
virtual StoreID::type storeID() const
Definition: Control/SGTools/SGTools/DataStore.h:93
SGImplSvc::dump
std::string dump() const
dump objects in store.
Definition: SGImplSvc.cxx:557
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SGImplSvc::record_HistObj
StatusCode record_HistObj(const CLID &id, const std::string &key, const std::string &store, bool allowMods, bool resetOnly=true)
Definition: SGImplSvc.cxx:1457
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
SG::BaseInfoBase::find
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
Definition: BaseInfo.cxx:569
SGImplSvc::recycle
void recycle(DataObject *pBadDObj)
put a bad (unrecordable) dobj away
Definition: SGImplSvc.cxx:1373
SGImplSvc::m_DumpArena
bool m_DumpArena
DumpArena Property flag : trigger m_arena->report() at clearStore.
Definition: SGImplSvc.h:696
SG::DataStore::keys
void keys(const CLID &id, std::vector< std::string > &vkeys, bool includeAlias, bool onlyValid)
Definition: Control/SGTools/src/DataStore.cxx:121
SGImplSvc::clid
CLID clid(const std::string &key) const
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!
Definition: SGImplSvc.cxx:1676
SGImplSvc::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: SGImplSvc.cxx:1050
IHiveStoreMgr
the interface through which HiveWB control StoreGate instances
Definition: IHiveStoreMgr.h:24
SG::DataProxy::name
virtual const name_type & name() const override final
Retrieve data object key == string.
SG::DataStore::locatePersistent
DataProxy * locatePersistent(const void *const pTransient) const
locate the persistent (proxy) for a given T* (void*):
Definition: Control/SGTools/src/DataStore.cxx:609
SGImplSvc::interfaceID
static const InterfaceID & interfaceID()
Should rather be in ISGImplSvc.h if we had one.
Definition: SGImplSvc.cxx:333
SGImplSvc::m_numSlots
int m_numSlots
The total number of slots. 1 if this isn't a Hive store.
Definition: SGImplSvc.h:717
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
SGImplSvc::m_pCLIDSvc
ServiceHandle< IClassIDSvc > m_pCLIDSvc
Definition: SGImplSvc.h:680
SGImplSvc::addAlias
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:715
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:365
SGImplSvc::handle
virtual void handle(const Incident &) override final
triggered by Incident service
Definition: SGImplSvc.cxx:232
python.TrigPSCPythonDbSetup.outputLevel
outputLevel
Definition: TrigPSCPythonDbSetup.py:30
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::DataProxy::isValidObject
bool isValidObject() const
is the object valid?
SG::ArenaHeader::defaultHeader
static ArenaHeader * defaultHeader()
Return the global default Header instance.
Definition: ArenaHeader.cxx:164
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
SGImplSvc::transientProxy
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
Definition: SGImplSvc.cxx:1000
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
SGImplSvc::m_pIOVSvc
ServiceHandle< IIOVSvc > m_pIOVSvc
get the IOVSvc "just in time" (breaks recursion at initialize)
Definition: SGImplSvc.h:702
h
SG::DataProxy::transientID
bool transientID(CLID id) const
return the list of transient IDs (primary or symLinked):
SGImplSvc::m_trash
std::list< DataObject * > m_trash
The Recycle Bin.
Definition: SGImplSvc.h:691
SG::DataStore
Hold DataProxy instances associated with a store.
Definition: Control/SGTools/SGTools/DataStore.h:74
SG::DataStore::proxies
const std::vector< DataProxy * > & proxies() const
All proxies managed by this store.
Definition: Control/SGTools/src/DataStore.cxx:630
SG::DataStore::addAlias
StatusCode addAlias(const std::string &aliasKey, DataProxy *proxy)
add alias to store
Definition: Control/SGTools/src/DataStore.cxx:380
copySelective.target
string target
Definition: copySelective.py:37
StoreID::findStoreID
static StoreID::type findStoreID(const std::string &storeName)
Definition: StoreID.cxx:21
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
DeMoScan.first
bool first
Definition: DeMoScan.py:536
DEBUG
#define DEBUG
Definition: page_access.h:11
SG::BaseInfoBase
The non-template portion of the BaseInfo implementation.
Definition: Control/AthenaKernel/AthenaKernel/BaseInfo.h:451
SG::DataStore::t2pRemove
void t2pRemove(const void *const pTrans)
Definition: Control/SGTools/SGTools/DataStore.h:256
SGImplSvc::store
SG::DataStore * store()
Definition: SGImplSvc.cxx:597
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
SGImplSvc::m_pPPS
IProxyProviderSvc * m_pPPS
Definition: SGImplSvc.h:686
SG::DataStore::pRange
StatusCode pRange(const CLID &id, SG::ConstProxyIterator &f, SG::ConstProxyIterator &e) const
Return an iterator over proxy for a given CLID:
Definition: Control/SGTools/src/DataStore.cxx:577
SGImplSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: SGImplSvc.h:726
SG::DataStore::removeProxy
StatusCode removeProxy(DataProxy *proxy, bool forceRemove, bool hard)
remove proxy from store, unless proxy is reset only.
Definition: Control/SGTools/src/DataStore.cxx:199
SG::StringPool::merge
bool merge(const StringPool &other)
Merge another pool into this one.
Definition: StringPool.cxx:363
copySelective.source
string source
Definition: copySelective.py:32
str
Definition: BTagTrackIpAccessor.cxx:11
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
SGImplSvc::createKey
std::string createKey(const CLID &dataID)
creates a key internally if none specified by client
Definition: SGImplSvc.cxx:262
SG::StringPool::stringToKey
sgkey_t stringToKey(const std::string &str, sgaux_t aux=0)
Find the key for a string.
Definition: StringPool.cxx:248
SG::RemapImpl::remap_t
Definition: SGImplSvc.cxx:88
get_generator_info.error
error
Definition: get_generator_info.py:40
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
SGImplSvc::m_mutex
mutex_t m_mutex
Definition: SGImplSvc.h:727
SGImplSvc::t2pRemove
void t2pRemove(const void *const pTrans)
forwarded to DataStore
Definition: SGImplSvc.cxx:1315
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SGImplSvc::m_pPPSHandle
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
Definition: SGImplSvc.h:683
SG::DataProxy
Definition: DataProxy.h:45
SGImplSvc::proxy
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory
Definition: SGImplSvc.cxx:753
SGImplSvc::isSymLinked
bool isSymLinked(const CLID &linkID, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:527
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
SG::DataStore::tRange
StatusCode tRange(ConstStoreIterator &f, ConstStoreIterator &e) const
Return an iterator over the StoreMap:
Definition: Control/SGTools/src/DataStore.cxx:599
SGImplSvc::t2pRegister
StatusCode t2pRegister(const void *const pTrans, SG::DataProxy *const pPers)
forwarded to DataStore
Definition: SGImplSvc.cxx:1308
SG::DataStore::proxy_exact_unlocked
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.
Definition: Control/SGTools/src/DataStore.cxx:546
python.compressB64.c
def c
Definition: compressB64.py:93
SG::ArenaBase::name
const std::string & name() const
Return this Arena's name.
Definition: ArenaBase.cxx:114
SG::ConstProxyIterator
ProxyMap::const_iterator ConstProxyIterator
Definition: ProxyMap.h:28
SG::StringPool::registerKey
bool registerKey(sgkey_t key, const std::string &str, sgaux_t aux=0)
Remember an additional mapping from key to string.
Definition: StringPool.cxx:319
SGImplSvc::addAutoSymLinks
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.
Definition: SGImplSvc.cxx:1710
SGImplSvc::m_remap_impl
SG::RemapImpl * m_remap_impl
Definition: SGImplSvc.h:708
SGImplSvc::m_remapMutex
mutex_t m_remapMutex
Definition: SGImplSvc.h:728
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37