ATLAS Offline Software
SGImplSvc.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef STOREGATE_SGIMPLSVC_H
8 #define STOREGATE_SGIMPLSVC_H
9 
10 //FIXME the CLASS_DEF header is not needed here but was added to work around
11 //bad include statements in client code: when using CLASS_DEF put the
12 //include below in your header file!
13 #include "AthenaKernel/CLASS_DEF.h"
14 
15 //base classes
16 #include "GaudiKernel/IIncidentListener.h"
17 #include "GaudiKernel/Service.h"
18 #include "GaudiKernel/ServiceHandle.h"
19 #include "GaudiKernel/IConverter.h"
21 
22 #include <GaudiKernel/ClassID.h> // for CLID
23 #include <GaudiKernel/IInterface.h> // for InterfaceID
24 #include <GaudiKernel/IMessageSvc.h> // for Level
25 #include "GaudiKernel/MsgStream.h"
26 #include "Gaudi/Property.h"
27 #include "GaudiKernel/StatusCode.h"
28 
29 #include "GaudiKernel/DataObjID.h"
30 
31 #include <cstddef> // for size_t
32 #include <list>
33 #include <memory>
34 #include <string>
35 #include <sys/types.h> // for off_t
36 #include <vector>
37 #include <thread>
38 
39 #include "AthenaKernel/StoreID.h"
44 
45 #include <SGTools/StringPool.h>
46 #include "SGTools/ProxyMap.h" /* for SG::ConstProxyIterator */
47 
48 
49 // includes used in SGImplSvc.icc
50 #include "GaudiKernel/IClassIDSvc.h"
52 #include "AthenaKernel/IIOVSvc.h"
53 #include "StoreGate/SGIterator.h"
54 #include "StoreGate/SGWPtr.h"
55 #include "SGTools/SGVersionedKey.h"
57 #include "AthAllocators/Arena.h"
58 
59 #include "GaudiKernel/IIncidentSvc.h"
60 
61 //forward declarations
62 namespace SG {
63  class DataProxy;
64  class TransientAddress;
65  struct RemapImpl;
66  class AuxVectorBase;
67  class AuxElement;
68  class DataStore;
69 }
70 
71 class DataObject;
72 class IConversionSvc;
73 class Incident;
74 class IHistorySvc;
75 
76 // python forward
77 struct _object; typedef _object PyObject;
78 class StoreGateSvc;
79 namespace AthenaInternal {
82 }
83 
84 namespace SG {
85  class NoAuxStore;
86 }
87 
88 //friends...
89 class AthenaOutputStream;
90 class IOVDbSvc;
91 class IOVSvcTool;
92 class SGDeleteAlg;
93 class ActiveStoreSvc;
94 namespace SG {
95  class VarHandleBase;
96 }
97 
107 class SGImplSvc final :
108  public Service,
109  public IProxyDict,
110  public IHiveStoreMgr,
111  public IIncidentListener
112 {
113 
114 public:
115  SGImplSvc (const SGImplSvc&) = delete;
116  SGImplSvc& operator= (const SGImplSvc&) = delete;
117 
118 
121 
122 
125  SG::detail::IteratorBase& cibegin,
126  SG::detail::IteratorBase& ciend) const;
127 
128 
130 
133 
134 
136  StatusCode recordAddress(const std::string& skey,
137  IOpaqueAddress* pAddress, bool clearAddressFlag=true);
139  StatusCode recordAddress(IOpaqueAddress* pAddress, bool clearAddressFlag=true);
140 
142  StatusCode symLink (const void* p2BRegistered, CLID linkID );
143 
145  StatusCode symLink (const CLID id, const std::string& key, const CLID linkid);
146 
148  StatusCode setAlias(CLID clid, const std::string& key, const std::string& aliasKey);
149 
151  StatusCode setAlias(const void* p2BAliased, const std::string& aliasKey);
152 
154  StatusCode setAlias(SG::DataProxy* proxy, const std::string& aliasKey);
155 
157  StatusCode setConst(const void* pointer);
158 
160  StatusCode remove(const void* pObject);
161 
163  StatusCode removeDataAndProxy(const void* pObject);
164 
170  bool transientSwap( const CLID& id,
171  const std::string& keyA, const std::string& keyB );
172 
174 
177 
178 
179  DataObject*
180  typeless_retrievePrivateCopy (const CLID clid, const std::string& key);
181 
182 
186  CLID clid( const std::string& key ) const;
187 
191  std::vector<CLID> clids( const std::string& key ) const;
192 
194  int typeCount(const CLID& id) const;
195 
199  bool contains(const CLID id, const std::string& key) const;
200 
201 
204  bool transientContains(const CLID id, const std::string& key) const;
205 
208  std::string dump() const;
209 
211  void setStoreID(StoreID::type id);
213  StoreID::type storeID() const;
214 
215 
223  void
224  keys(const CLID& id, std::vector<std::string>& vkeys,
225  bool includeAlias = false, bool onlyValid = true);
226 
228  virtual ::IProxyDict* hiveProxyDict() override final {
229  return this;
230  }
231 
233 
236 
237 
239  StatusCode regFcn (const CallBackID& c1,
240  const CallBackID& c2,
241  const IOVSvcCallBackFcn& fcn,
242  bool trigger = false);
243 
245  StatusCode regFcn (const std::string& toolName,
246  const CallBackID& c2,
247  const IOVSvcCallBackFcn& fcn,
248  bool trigger = false);
249 
251 
254  virtual SG::DataProxy* proxy(const void* const pTransient) const override final;
255 
258  virtual SG::DataProxy* proxy(const CLID& id) const final;
259 
261  virtual SG::DataProxy* proxy(const CLID& id, const std::string& key) const override final;
264  virtual SG::DataProxy* proxy(const CLID& id, const char* key) const final
265  { return this->proxy(id, std::string(key)); }
266 
268  virtual StatusCode addToStore (CLID id, SG::DataProxy* proxy) override final;
269 
290  virtual
292  const std::string& key,
293  bool allowMods,
294  bool returnExisting) override final;
295 
296 
300  virtual SG::DataProxy* proxy_exact (SG::sgkey_t sgkey) const override final;
301 
302 
304 
306 
307  virtual SG::DataProxy* proxy(const CLID& id, bool checkValid) const;
312  virtual SG::DataProxy* proxy(const CLID& id, const std::string& key, bool checkValid) const;
316  virtual SG::DataProxy* proxy(const CLID& id, const char* key, bool checkValid) const
317  { return this->proxy(id, std::string(key), checkValid); }
318 
320  virtual std::vector<const SG::DataProxy*> proxies() const override final;
321 
323  std::vector<CLID> clids() const;
324 
327  SG::DataProxy* transientProxy(const CLID& id, const std::string& key) const;
328 
330  DataObject* accessData(const CLID& id) const;
332  DataObject* accessData(const CLID& id, const std::string& key) const;
333 
339 
340 
348  virtual SG::SourceID sourceID (const std::string& key = "EventSelector") const override;
349 
352 
353 
355 
364  virtual
365  sgkey_t stringToKey (const std::string& str, CLID clid) override final;
366 
374  virtual
375  const std::string* keyToString (sgkey_t key) const override final;
376 
385  virtual
386  const std::string* keyToString (sgkey_t key, CLID& clid) const override final;
387 
400  virtual
401  void registerKey (sgkey_t key,
402  const std::string& str,
403  CLID clidid) override final;
404 
405 
414 
415 
417 
420 
421 
422 
430  void remap_impl (sgkey_t source,
431  sgkey_t target,
432  off_t index_offset);
433 
434 
443  virtual bool tryELRemap (sgkey_t sgkey_in, size_t index_in,
444  sgkey_t& sgkey_out, size_t& index_out) override final;
445 
447 
450 
451  SGImplSvc(const std::string& name, ISvcLocator* svc);
452  virtual ~SGImplSvc() override final;
454 
457 
458  virtual StatusCode initialize() override final;
459  virtual StatusCode reinitialize() override final;
460  virtual StatusCode start() override final;
461  virtual StatusCode stop() override final;
462  virtual StatusCode finalize() override final;
463  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override final;
465  static const InterfaceID& interfaceID();
467 
468 
471 
472  virtual void handle(const Incident&) override final;
477 
478 
481 
482  virtual StatusCode clearStore(bool forceRemove=false) override final;
485 
488  virtual void commitNewDataObjects() override final;
490 
491 
498  void setSlotNumber (int slot, int numSlots);
499 
500 
506  virtual void boundHandle (IResetable* handle) override final;
507 
508 
514  virtual void unboundHandle (IResetable* handle) override final;
515 
516 
518  // Const methods:
520 
531  virtual
532  StatusCode createObj (IConverter* cvt,
533  IOpaqueAddress* addr,
534  DataObject*& refpObject) override;
535 
536 
538 private:
539 
540  StatusCode record_HistObj(const CLID& id, const std::string& key,
541  const std::string& store, bool allowMods,
542  bool resetOnly=true);
543 
544 
545  friend
546  PyObject*
550  StatusCode typeless_record( DataObject* obj, const std::string& key,
551  const void* const raw_ptr,
552  bool allowMods, bool resetOnly=true,
553  bool noHist=false );
556  DataObject* obj, const std::string& key,
557  const void* const raw_ptr,
558  bool allowMods,
559  bool noHist=false,
560  const std::type_info* tinfo=0);
561 
562  StatusCode typeless_record( DataObject* obj, const std::string& key,
563  const void* const raw_ptr,
564  bool allowMods, bool resetOnly,
565  bool noHist,
566  const std::type_info* tinfo);
567  StatusCode typeless_record( DataObject* obj, const std::string& key,
568  const void* const raw_ptr,
569  bool allowMods, bool resetOnly,
570  bool noHist,
571  const std::type_info* tinfo,
572  SG::DataProxy** proxy_ret,
573  bool noOverwrite);
574 
577  SG::DataProxy* record_impl( DataObject* obj, const std::string& key,
578  const void* const raw_ptr,
579  bool allowMods, bool resetOnly, bool allowOverwrite,
580  const std::type_info* tinfo);
581 
582 
585  void releaseObject(const CLID& id, const std::string& key);
586 
588  friend class IOVDbSvc;
589  friend class IOVSvcTool;
590  friend class SGDeleteAlg;
591  friend
592  void
597 
599  SG::DataProxy* locatePersistent(const SG::TransientAddress* tAddr,
600  bool checkValid = false) const;
601 
603  friend class AthenaOutputStream;
608 
609  friend class StoreGateSvc;
611  friend class SG::VarHandleBase;
612 
613  SG::DataStore* store();
614  const SG::DataStore* store() const;
615 
616  bool isSymLinked(const CLID& linkID, SG::DataProxy* dp);
617 
619 
620  StatusCode addAlias(const std::string& aliasKey, SG::DataProxy* dp);
621 
623  std::string createKey(const CLID& dataID);
624 
626  SG::DataProxy* setupProxy(const CLID& dataID,
627  const std::string& gK,
628  DataObject* pDObj,
629  bool allowMods,
630  bool resetOnly);
631 
633  void recycle(DataObject* pBadDObj);
635  void emptyTrash();
636 
638  bool bindHandleToProxy(const CLID& id, const std::string& key,
639  IResetable* ir, SG::DataProxy*& dp);
640 
642  bool bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
643  IResetable* ir, SG::DataProxy *&dp);
644  bool bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
645  IResetable* ir, SG::DataProxy *&dp,
646  const CallBackID& c,
648  bool trigger);
649 
653  StatusCode removeProxy(SG::DataProxy* proxy, const void* pTrans,
654  bool forceRemove=false);
656  StatusCode t2pRegister(const void* const pTrans, SG::DataProxy* const pPers);
658  void t2pRemove(const void* const pTrans);
659 
661  void msg_update_handler(Gaudi::Details::PropertyBase& outputLevel);
662 
663  bool associateAux_impl (SG::AuxVectorBase* ptr,
664  const std::string& key,
665  CLID auxclid) const;
666 
667  bool associateAux_impl (SG::AuxElement* ptr,
668  const std::string& key,
669  CLID auxclid) const;
670 
672  void addAutoSymLinks (const std::string& key, CLID clid, SG::DataProxy* dp,
673  const std::type_info* tinfo,
674  bool warn_nobib = true);
675 
676  friend class ActiveStoreSvc;
680  void makeCurrent();
681 
682  ServiceHandle<IClassIDSvc> m_pCLIDSvc;
683  ServiceHandle<IConversionSvc> m_pDataLoader;
684 
686  // Has to be separate from handle due to setProxyProviderSvc() interface.
687  // Can we get rid of that?
689 
691 
692  SG::DataStore* m_pStore;
693  std::list<DataObject*> m_trash;
694 
695  ServiceHandle<IIncidentSvc> m_pIncSvc;
696  bool m_DumpStore;
698  bool m_DumpArena;
699 
700  // typedef std::list<std::string> StrList;
701  StringArrayProperty m_folderNameList;
702 
705 
707 
708  SG::StringPool m_stringpool;
709 
710  SG::RemapImpl* m_remap_impl;
711 
713  SG::Arena m_arena;
714 
717 
720 
725  std::map<std::thread::id, std::vector<IResetable*> > m_newBoundHandles;
726 
727  typedef std::recursive_mutex mutex_t;
728  typedef std::lock_guard<mutex_t> lock_t;
729  mutable mutex_t m_mutex;
732 };
733 
734 
736 void SG_dump (SGImplSvc* sg);
737 void SG_dump (SGImplSvc* sg, const char* fname);
738 
739 
740 #include "StoreGate/tools/SGImplSvc.icc"
741 
742 #endif // STOREGATE_SGIMPLSVC_H
IOVDbSvc
Athena service for Interval Of Validity database. The IOVDbSvc may be in one of three time states whi...
Definition: IOVDbSvc.h:83
SGImplSvc::mergeStringPool
bool mergeStringPool(const SGImplSvc &other)
Merge the string pool from another store into this one.
Definition: SGImplSvc.cxx:1563
SGImplSvc::setProxyProviderSvc
void setProxyProviderSvc(IProxyProviderSvc *pPPSvc)
associate ProxyProviderSvc to this store
SGImplSvc::associateAux_impl
bool associateAux_impl(SG::AuxVectorBase *ptr, const std::string &key, CLID auxclid) const
Definition: SGImplSvc.cxx:1915
SGImplSvc::hiveProxyDict
virtual ::IProxyDict * hiveProxyDict() override final
implements IHiveStore interface for compat with Hive
Definition: SGImplSvc.h:228
common.sgkey
def sgkey(tool)
Definition: common.py:1028
CallBackID
Definition: CallBackID.h:24
IStringPool
Abstract interface for looking up strings/CLIDs in a pool.
Definition: IStringPool.h:28
SGImplSvc::setAlias
StatusCode setAlias(CLID clid, const std::string &key, const std::string &aliasKey)
make an alias to a DataObject (provide data type and old key)
Definition: SGImplSvc.cxx:682
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
SGImplSvc::contains
bool contains(const CLID id, const std::string &key) const
Look up a keyed object in TDS by CLID.
Definition: SGImplSvc.cxx:735
SGImplSvc::createObj
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override
Call converter to create an object, with locking.
Definition: SGImplSvc.cxx:1834
SGImplSvc::operator=
SGImplSvc & operator=(const SGImplSvc &)=delete
SGImplSvc::addSymLink
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:635
SGImplSvc::setConst
StatusCode setConst(const void *pointer)
prevent downstream clients from modifying the pointed-at dobj
Definition: SGImplSvc.cxx:1336
SGImplSvc::SGImplSvc
SGImplSvc(const SGImplSvc &)=delete
SGImplSvc::locatePersistent
SG::DataProxy * locatePersistent(const SG::TransientAddress *tAddr, bool checkValid=false) const
Definition: SGImplSvc.cxx:1261
SGImplSvc::clearStore
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
Definition: SGImplSvc.cxx:268
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SGImplSvc::commitNewDataObjects
virtual void commitNewDataObjects() override final
Reset handles added since the last call to commit.
Definition: SGImplSvc.cxx:1773
SGImplSvc::recordObject
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override final
Record an object in the store.
Definition: SGImplSvc.cxx:856
EventInfoWrite.EventSelector
EventSelector
Definition: EventInfoWrite.py:49
SGObjectWithVersion.h
associate a data object with its VersionedKey
SGImplSvc::boundHandle
virtual void boundHandle(IResetable *handle) override final
Tell the store that a proxy has been bound to a handle.
Definition: SGImplSvc.cxx:1791
extractSporadic.c1
c1
Definition: extractSporadic.py:134
SGVersionedKey.h
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
SGDeleteAlg
an algorithm that resets the data objects listed in a SG::Folder
Definition: SGDeleteAlg.h:38
SGImplSvc::stringToKey
virtual sgkey_t stringToKey(const std::string &str, CLID clid) override final
Find the key for a string/CLID pair.
Definition: SGImplSvc.cxx:1491
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:725
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
SGImplSvc::m_stringPoolMutex
mutex_t m_stringPoolMutex
Definition: SGImplSvc.h:731
SGImplSvc::m_pIncSvc
ServiceHandle< IIncidentSvc > m_pIncSvc
property
Definition: SGImplSvc.h:695
SGImplSvc::emptyTrash
void emptyTrash()
throw away bad objects
Definition: SGImplSvc.cxx:1380
ActiveStoreSvc
A service that caches a pointer to the currently active store. It also implements the IProxyDict stor...
Definition: ActiveStoreSvc.h:31
SGImplSvc::mutex_t
std::recursive_mutex mutex_t
Definition: SGImplSvc.h:727
SGImplSvc::releaseObject
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
Definition: SGImplSvc.cxx:1580
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
SGIterator.h
A standard conforming forward iterator over items in StoreGate.
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SGImplSvc::reinitialize
virtual StatusCode reinitialize() override final
Service reinitialization.
Definition: SGImplSvc.cxx:324
IStringPool::sgkey_t
SG::sgkey_t sgkey_t
Type of the keys.
Definition: IStringPool.h:34
SGImplSvc::sourceID
virtual SG::SourceID sourceID(const std::string &key="EventSelector") const override
Return the metadata source ID for the current event slot.
Definition: SGImplSvc.cxx:1866
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
SGImplSvc::m_ActivateHistory
bool m_ActivateHistory
Activate the history service.
Definition: SGImplSvc.h:697
ProxyMap.h
SGImplSvc::m_storeLoaded
bool m_storeLoaded
FIXME hack needed by loadEventProxies.
Definition: SGImplSvc.h:706
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:716
SGImplSvc::keyToString
virtual const std::string * keyToString(sgkey_t key) const override final
Find the string corresponding to a given key.
Definition: SGImplSvc.cxx:1505
SGImplSvc::initialize
virtual StatusCode initialize() override final
Service initialization.
Definition: SGImplSvc.cxx:147
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SGImplSvc::typeless_overwrite
StatusCode typeless_overwrite(const CLID &id, DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool noHist=false, const std::type_info *tinfo=0)
same as typeless_record, allows to overwrite an object in memory or on disk
Definition: SGImplSvc.cxx:1098
SGImplSvc::bindHandleToProxyAndRegister
bool bindHandleToProxyAndRegister(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
Also do registration with IOVSvc.
Definition: SGImplSvc.cxx:1423
SGImplSvc::storeID
StoreID::type storeID() const
get store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:510
SGImplSvc::unboundHandle
virtual void unboundHandle(IResetable *handle) override final
Tell the store that a handle has been unbound from a proxy.
Definition: SGImplSvc.cxx:1803
AthenaInternal
Definition: AthenaPythonDict.h:31
SGImplSvc::m_pStore
SG::DataStore * m_pStore
Definition: SGImplSvc.h:692
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
IResetable
a resetable object (e.g. a SG DataHandle)
Definition: IResetable.h:15
SG_dump
void SG_dump(SGImplSvc *sg)
These are intended to be easy to call from the debugger.
Definition: SGImplSvc.cxx:1848
SGImplSvc::m_pDataLoader
ServiceHandle< IConversionSvc > m_pDataLoader
Definition: SGImplSvc.h:683
PyObject
_object PyObject
Definition: SGImplSvc.h:77
SGImplSvc::m_DumpStore
bool m_DumpStore
Dump Property flag: triggers dump() at EndEvent.
Definition: SGImplSvc.h:696
SGImplSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: SGImplSvc.cxx:979
SGImplSvc::bindHandleToProxy
bool bindHandleToProxy(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
name says it all
Definition: SGImplSvc.cxx:1391
IResetable.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
SGImplSvc::m_arena
SG::Arena m_arena
Allocation arena to associate with this store.
Definition: SGImplSvc.h:713
SGImplSvc::m_stringpool
SG::StringPool m_stringpool
Definition: SGImplSvc.h:708
DataProxy
DataProxy provides the registry services for StoreGate.
Definition: DataProxy.h:32
StringPool.h
Maintain a mapping of strings to 64-bit ints.
SGImplSvc::accessData
DataObject * accessData(const CLID &id) const
find proxy and access its data. Returns 0 to flag failure
Definition: SGImplSvc.cxx:1008
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
IOVSvcCallBackFcn
boost::function< StatusCode(IOVSVC_CALLBACK_ARGS) > IOVSvcCallBackFcn
the type of an IOVSvc call back: it wraps both the method and the object the method is called on
Definition: IOVSvcDefs.h:58
SGImplSvc
The Athena Transient Store API.
Definition: SGImplSvc.h:112
SGImplSvc::transientContains
bool transientContains(const CLID id, const std::string &key) const
Look up a transient data object in TDS only by CLID.
Definition: SGImplSvc.cxx:744
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
SGImplSvc::m_pHistorySvc
ServiceHandle< IHistorySvc > m_pHistorySvc
Definition: SGImplSvc.h:690
IIOVSvc
Abstract interface for IOVSvc. This is used (usually via StoreGateSvc regFcn and regHandle methods) t...
Definition: IIOVSvc.h:41
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
SGImplSvc::proxy
virtual SG::DataProxy * proxy(const CLID &id, const char *key) const final
get proxy with given id and key.
Definition: SGImplSvc.h:264
SGImplSvc::remove
StatusCode remove(const void *pObject)
Remove pObject, will remove its proxy if not reset only.
Definition: SGImplSvc.cxx:1356
SGImplSvc::remap_impl
void remap_impl(sgkey_t source, sgkey_t target, off_t index_offset)
Declare a remapping.
Definition: SGImplSvc.cxx:1625
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
SGImplSvc::tryELRemap
virtual bool tryELRemap(sgkey_t sgkey_in, size_t index_in, sgkey_t &sgkey_out, size_t &index_out) override final
Test to see if the target of an ElementLink has moved.
Definition: SGImplSvc.cxx:1645
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SGImplSvc::msg_update_handler
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
Definition: SGImplSvc.cxx:1321
StoreID.h
IOVSvcTool
Definition: IOVSvcTool.h:70
SGImplSvc::finalize
virtual StatusCode finalize() override final
Service finalization.
Definition: SGImplSvc.cxx:303
SGImplSvc::m_folderNameList
StringArrayProperty m_folderNameList
FolderNameList Property.
Definition: SGImplSvc.h:701
IProxyDict.h
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
SGImplSvc::retrieve
StatusCode retrieve(CLID clid, SG::detail::IteratorBase &cibegin, SG::detail::IteratorBase &ciend) const
Retrieve all objects of type T: returns an SG::ConstIterator range.
Definition: SGImplSvc.cxx:1884
SGImplSvc::dump
std::string dump() const
dump objects in store.
Definition: SGImplSvc.cxx:557
SGImplSvc::registerKey
virtual void registerKey(sgkey_t key, const std::string &str, CLID clidid) override final
Remember an additional mapping from key to string/CLID.
Definition: SGImplSvc.cxx:1540
SGImplSvc::setStoreID
void setStoreID(StoreID::type id)
set store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:504
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
SGImplSvc::typeCount
int typeCount(const CLID &id) const
Return the number of instances of type T (input CLID)
Definition: SGImplSvc.cxx:727
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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
IProxyProviderSvc
Definition: IProxyProviderSvc.h:34
SGImplSvc::removeDataAndProxy
StatusCode removeDataAndProxy(const void *pObject)
Remove pObject and its proxy no matter what.
Definition: SGImplSvc.cxx:1365
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:698
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
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
IHiveStoreMgr
the interface through which HiveWB control StoreGate instances
Definition: IHiveStoreMgr.h:24
SGImplSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface) override final
Definition: SGImplSvc.cxx:343
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:719
SGImplSvc::symLink
StatusCode symLink(const void *p2BRegistered, CLID linkID)
make a soft link to the object T* already registered
Definition: SGImplSvc.cxx:612
SGImplSvc::addToStore
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
Definition: SGImplSvc.cxx:829
AthenaInternal::py_sg_clearProxyPayload
void py_sg_clearProxyPayload(StoreGateSvc *self, SG::DataProxy *)
Definition: StoreGatePyExt.cxx:458
SGImplSvc::m_pCLIDSvc
ServiceHandle< IClassIDSvc > m_pCLIDSvc
Definition: SGImplSvc.h:682
SGImplSvc::addAlias
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:715
IIOVSvc.h
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
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
Arena.h
Collection of memory allocators with a common lifetime, plus subsystem summary.
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
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:704
SGImplSvc::makeCurrent
void makeCurrent()
The current store is becoming the active store.
Definition: SGImplSvc.cxx:1815
SGImplSvc::m_trash
std::list< DataObject * > m_trash
The Recycle Bin.
Definition: SGImplSvc.h:693
StoreID::type
type
Definition: StoreID.h:24
AthenaOutputStream
algorithm that marks for write data objects in SG
Definition: AthenaOutputStream.h:55
copySelective.target
string target
Definition: copySelective.py:37
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:25
IHiveStoreMgr.h
SG::detail::IteratorBase
Definition: SGIterator.h:36
SGImplSvc::store
SG::DataStore * store()
Definition: SGImplSvc.cxx:597
SGImplSvc::stop
virtual StatusCode stop() override final
Service stop.
Definition: SGImplSvc.cxx:214
SGWPtr.h
SGImplSvc::m_pPPS
IProxyProviderSvc * m_pPPS
Definition: SGImplSvc.h:688
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
SGImplSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: SGImplSvc.h:728
IProxyProviderSvc.h
copySelective.source
string source
Definition: copySelective.py:32
str
Definition: BTagTrackIpAccessor.cxx:11
IOVSvcDefs.h
defines and typedefs for IOVSvc
SGImplSvc::setSlotNumber
void setSlotNumber(int slot, int numSlots)
Set the Hive slot number for this store.
Definition: SGImplSvc.cxx:958
SGImplSvc::proxy
virtual SG::DataProxy * proxy(const CLID &id, const char *key, bool checkValid) const
get proxy with given id and key, optionally checking validity.
Definition: SGImplSvc.h:316
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:45
SGImplSvc::createKey
std::string createKey(const CLID &dataID)
creates a key internally if none specified by client
Definition: SGImplSvc.cxx:262
SGImplSvc::proxy_exact
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override final
Get proxy given a hashed key+clid.
Definition: SGImplSvc.cxx:946
DefaultKey.h
SGImplSvc::m_mutex
mutex_t m_mutex
Definition: SGImplSvc.h:729
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:685
SG::DataProxy
Definition: DataProxy.h:45
SGImplSvc::regFcn
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)
Definition: SGImplSvc.cxx:534
SGImplSvc::start
virtual StatusCode start() override final
Service start.
Definition: SGImplSvc.cxx:199
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
PyObject
_object PyObject
Definition: IPyComponent.h:26
SGImplSvc::t2pRegister
StatusCode t2pRegister(const void *const pTrans, SG::DataProxy *const pPers)
forwarded to DataStore
Definition: SGImplSvc.cxx:1308
python.compressB64.c
def c
Definition: compressB64.py:93
CLASS_DEF.h
macros to associate a CLID to a type
SGImplSvc::proxyProviderSvc
IProxyProviderSvc * proxyProviderSvc()
Return current ProxyProviderSvc.
SGImplSvc::typeless_retrievePrivateCopy
DataObject * typeless_retrievePrivateCopy(const CLID clid, const std::string &key)
Definition: SGImplSvc.cxx:1660
AthenaInternal::recordObjectToStore
PyObject * recordObjectToStore(StoreGateSvc *, PyObject *, PyObject *, bool, bool, bool)
record object to storegate
Definition: StoreGatePyExt.cxx:476
SG::ConstProxyIterator
ProxyMap::const_iterator ConstProxyIterator
Definition: ProxyMap.h:28
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:710
SGImplSvc::transientSwap
bool transientSwap(const CLID &id, const std::string &keyA, const std::string &keyB)
swap the content of 2 keys payload A indexed by keyA will now be accessed via keyB and vice versa Not...
Definition: SGImplSvc.cxx:1024
SGImplSvc::keys
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.
Definition: SGImplSvc.cxx:518
ServiceHandle
Definition: ClusterMakerTool.h:37
SGImplSvc::m_remapMutex
mutex_t m_remapMutex
Definition: SGImplSvc.h:730
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
SGImplSvc::loadEventProxies
StatusCode loadEventProxies()
load proxies at begin event
Definition: SGImplSvc.cxx:243