ATLAS Offline Software
SGImplSvc.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2025 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 #include "CxxUtils/RefCountedPtr.h"
45 
46 #include <SGTools/StringPool.h>
47 #include "SGTools/ProxyMap.h" /* for SG::ConstProxyIterator */
48 
49 
50 // includes used in SGImplSvc.icc
51 #include "GaudiKernel/IClassIDSvc.h"
53 #include "AthenaKernel/IIOVSvc.h"
54 #include "StoreGate/SGIterator.h"
55 #include "StoreGate/SGWPtr.h"
56 #include "SGTools/SGVersionedKey.h"
58 #include "AthAllocators/Arena.h"
59 
60 #include "GaudiKernel/IIncidentSvc.h"
61 
62 //forward declarations
63 namespace SG {
64  class DataProxy;
65  class TransientAddress;
66  struct RemapImpl;
67  class AuxVectorBase;
68  class AuxElement;
69  class DataStore;
70 }
71 
72 class DataObject;
73 class IConversionSvc;
74 class Incident;
75 class IHistorySvc;
76 
77 // python forward
78 struct _object; typedef _object PyObject;
79 class StoreGateSvc;
80 namespace AthenaInternal {
83 }
84 
85 namespace SG {
86  class NoAuxStore;
87 }
88 
89 //friends...
90 class AthenaOutputStream;
91 class IOVDbSvc;
92 class IOVSvcTool;
93 class ActiveStoreSvc;
94 namespace SG {
95  class VarHandleBase;
96 }
97 
106 class SGImplSvc final : public extends<Service,
107  IProxyDict,
108  IHiveStoreMgr,
109  IIncidentListener>
110 {
111 
112 public:
113  SGImplSvc (const SGImplSvc&) = delete;
114  SGImplSvc& operator= (const SGImplSvc&) = delete;
115 
116 
119 
120 
123  SG::detail::IteratorBase& cibegin,
124  SG::detail::IteratorBase& ciend) const;
125 
126 
128 
131 
132 
134  StatusCode recordAddress(const std::string& skey,
136  bool clearAddressFlag=true);
139  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;
464 
465 
468 
469  virtual void handle(const Incident&) override final;
474 
475 
478 
479  virtual StatusCode clearStore(bool forceRemove=false) override final;
482 
485  virtual void commitNewDataObjects() override final;
487 
488 
495  void setSlotNumber (int slot, int numSlots);
496 
497 
503  virtual void boundHandle (IResetable* handle) override final;
504 
505 
511  virtual void unboundHandle (IResetable* handle) override final;
512 
513 
515  // Const methods:
517 
528  virtual
529  StatusCode createObj (IConverter* cvt,
530  IOpaqueAddress* addr,
531  DataObject*& refpObject) override;
532 
533 
535 private:
536 
537  StatusCode record_HistObj(const CLID& id, const std::string& key,
538  const std::string& store, bool allowMods,
539  bool resetOnly=true);
540 
541 
542  friend
543  PyObject*
547  StatusCode typeless_record( DataObject* obj, const std::string& key,
548  const void* const raw_ptr,
549  bool allowMods, bool resetOnly=true,
550  bool noHist=false );
553  DataObject* obj, const std::string& key,
554  const void* const raw_ptr,
555  bool allowMods,
556  bool noHist=false,
557  const std::type_info* tinfo=0);
558 
559  StatusCode typeless_record( DataObject* obj, const std::string& key,
560  const void* const raw_ptr,
561  bool allowMods, bool resetOnly,
562  bool noHist,
563  const std::type_info* tinfo);
564  StatusCode typeless_record( DataObject* obj, const std::string& key,
565  const void* const raw_ptr,
566  bool allowMods, bool resetOnly,
567  bool noHist,
568  const std::type_info* tinfo,
569  SG::DataProxy** proxy_ret,
570  bool noOverwrite);
571 
574  SG::DataProxy* record_impl( DataObject* obj, const std::string& key,
575  const void* const raw_ptr,
576  bool allowMods, bool resetOnly, bool allowOverwrite,
577  const std::type_info* tinfo);
578 
579 
582  void releaseObject(const CLID& id, const std::string& key);
583 
585  friend class IOVDbSvc;
586  friend class IOVSvcTool;
587  friend
588  void
593 
595  SG::DataProxy* locatePersistent(const SG::TransientAddress* tAddr,
596  bool checkValid = false) const;
597 
599  friend class AthenaOutputStream;
604 
605  friend class StoreGateSvc;
607  friend class SG::VarHandleBase;
608 
609  SG::DataStore* store();
610  const SG::DataStore* store() const;
611 
612  bool isSymLinked(const CLID& linkID, SG::DataProxy* dp);
613 
615 
616  StatusCode addAlias(const std::string& aliasKey, SG::DataProxy* dp);
617 
619  std::string createKey(const CLID& dataID);
620 
622  SG::DataProxy* setupProxy(const CLID& dataID,
623  const std::string& gK,
624  DataObject* pDObj,
625  bool allowMods,
626  bool resetOnly);
627 
629  void recycle(DataObject* pBadDObj);
631  void emptyTrash();
632 
634  bool bindHandleToProxy(const CLID& id, const std::string& key,
635  IResetable* ir, SG::DataProxy*& dp);
636 
638  bool bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
639  IResetable* ir, SG::DataProxy *&dp);
640  bool bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
641  IResetable* ir, SG::DataProxy *&dp,
642  const CallBackID& c,
644  bool trigger);
645 
649  StatusCode removeProxy(SG::DataProxy* proxy, const void* pTrans,
650  bool forceRemove=false);
652  StatusCode t2pRegister(const void* const pTrans, SG::DataProxy* const pPers);
654  void t2pRemove(const void* const pTrans);
655 
657  void msg_update_handler(Gaudi::Details::PropertyBase& outputLevel);
658 
659  bool associateAux_impl (SG::AuxVectorBase* ptr,
660  const std::string& key,
661  CLID auxclid) const;
662 
663  bool associateAux_impl (SG::AuxElement* ptr,
664  const std::string& key,
665  CLID auxclid) const;
666 
668  void addAutoSymLinks (const std::string& key, CLID clid, SG::DataProxy* dp,
669  const std::type_info* tinfo,
670  bool warn_nobib = true);
671 
672  friend class ActiveStoreSvc;
676  void makeCurrent();
677 
678  ServiceHandle<IClassIDSvc> m_pCLIDSvc;
679  ServiceHandle<IConversionSvc> m_pDataLoader;
680 
682  // Has to be separate from handle due to setProxyProviderSvc() interface.
683  // Can we get rid of that?
685 
687 
688  SG::DataStore* m_pStore;
689  std::list<DataObject*> m_trash;
690 
691  ServiceHandle<IIncidentSvc> m_pIncSvc;
692  bool m_DumpStore;
694  bool m_DumpArena;
695 
696  // typedef std::list<std::string> StrList;
697  StringArrayProperty m_folderNameList;
698 
701 
703 
704  SG::StringPool m_stringpool;
705 
706  SG::RemapImpl* m_remap_impl;
707 
709  SG::Arena m_arena;
710 
713 
716 
721  std::map<std::thread::id, std::vector<IResetable*> > m_newBoundHandles;
722 
723  typedef std::recursive_mutex mutex_t;
724  typedef std::lock_guard<mutex_t> lock_t;
725  mutable mutex_t m_mutex;
728 };
729 
730 
732 void SG_dump (SGImplSvc* sg);
733 void SG_dump (SGImplSvc* sg, const char* fname);
734 
735 
736 #include "StoreGate/tools/SGImplSvc.icc"
737 
738 #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:82
SGImplSvc::mergeStringPool
bool mergeStringPool(const SGImplSvc &other)
Merge the string pool from another store into this one.
Definition: SGImplSvc.cxx:1529
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:1881
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:1027
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:649
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:842
SGImplSvc::contains
bool contains(const CLID id, const std::string &key) const
Look up a keyed object in TDS by CLID.
Definition: SGImplSvc.cxx:702
SGImplSvc::createObj
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override
Call converter to create an object, with locking.
Definition: SGImplSvc.cxx:1800
SGImplSvc::operator=
SGImplSvc & operator=(const SGImplSvc &)=delete
SGImplSvc::addSymLink
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:602
SGImplSvc::setConst
StatusCode setConst(const void *pointer)
prevent downstream clients from modifying the pointed-at dobj
Definition: SGImplSvc.cxx:1302
SGImplSvc::SGImplSvc
SGImplSvc(const SGImplSvc &)=delete
SGImplSvc::locatePersistent
SG::DataProxy * locatePersistent(const SG::TransientAddress *tAddr, bool checkValid=false) const
Definition: SGImplSvc.cxx:1227
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:1739
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:823
EventInfoWrite.EventSelector
EventSelector
Definition: EventInfoWrite.py:50
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:1757
extractSporadic.c1
c1
Definition: extractSporadic.py:133
SGImplSvc::recordAddress
StatusCode recordAddress(const std::string &skey, CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
Definition: SGImplSvc.cxx:336
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:1240
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:1457
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:721
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:1295
SGImplSvc::m_stringPoolMutex
mutex_t m_stringPoolMutex
Definition: SGImplSvc.h:727
RefCountedPtr.h
Simple smart pointer for Gaudi-style refcounted objects.
SGImplSvc::m_pIncSvc
ServiceHandle< IIncidentSvc > m_pIncSvc
property
Definition: SGImplSvc.h:691
SGImplSvc::emptyTrash
void emptyTrash()
throw away bad objects
Definition: SGImplSvc.cxx:1346
ActiveStoreSvc
A service that caches a pointer to the currently active store. It also implements the IProxyDict stor...
Definition: ActiveStoreSvc.h:30
SGImplSvc::mutex_t
std::recursive_mutex mutex_t
Definition: SGImplSvc.h:723
CxxUtils::RefCountedPtr< IOpaqueAddress >
SGImplSvc::releaseObject
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
Definition: SGImplSvc.cxx:1546
SGImplSvc::proxies
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
Definition: SGImplSvc.cxx:935
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
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:1832
SGImplSvc::m_ActivateHistory
bool m_ActivateHistory
Activate the history service.
Definition: SGImplSvc.h:693
ProxyMap.h
SGImplSvc::m_storeLoaded
bool m_storeLoaded
FIXME hack needed by loadEventProxies.
Definition: SGImplSvc.h:702
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:712
SGImplSvc::keyToString
virtual const std::string * keyToString(sgkey_t key) const override final
Find the string corresponding to a given key.
Definition: SGImplSvc.cxx:1471
SGImplSvc::initialize
virtual StatusCode initialize() override final
Service initialization.
Definition: SGImplSvc.cxx:147
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
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:1064
SGImplSvc::bindHandleToProxyAndRegister
bool bindHandleToProxyAndRegister(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
Also do registration with IOVSvc.
Definition: SGImplSvc.cxx:1389
SGImplSvc::storeID
StoreID::type storeID() const
get store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:477
SGImplSvc::unboundHandle
virtual void unboundHandle(IResetable *handle) override final
Tell the store that a handle has been unbound from a proxy.
Definition: SGImplSvc.cxx:1769
AthenaInternal
Definition: AthenaPythonDict.h:31
SGImplSvc::m_pStore
SG::DataStore * m_pStore
Definition: SGImplSvc.h:688
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:122
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:1814
SGImplSvc::m_pDataLoader
ServiceHandle< IConversionSvc > m_pDataLoader
Definition: SGImplSvc.h:679
PyObject
_object PyObject
Definition: SGImplSvc.h:78
SGImplSvc::m_DumpStore
bool m_DumpStore
Dump Property flag: triggers dump() at EndEvent.
Definition: SGImplSvc.h:692
SGImplSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: SGImplSvc.cxx:945
SGImplSvc::bindHandleToProxy
bool bindHandleToProxy(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
name says it all
Definition: SGImplSvc.cxx:1357
IResetable.h
SGImplSvc::sgkey_t
IStringPool::sgkey_t sgkey_t
Definition: SGImplSvc.h:354
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:709
SGImplSvc::m_stringpool
SG::StringPool m_stringpool
Definition: SGImplSvc.h:704
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:974
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:1563
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:429
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:110
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:711
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
SGImplSvc::m_pHistorySvc
ServiceHandle< IHistorySvc > m_pHistorySvc
Definition: SGImplSvc.h:686
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:1322
SGImplSvc::remap_impl
void remap_impl(sgkey_t source, sgkey_t target, off_t index_offset)
Declare a remapping.
Definition: SGImplSvc.cxx:1591
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:1099
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:1611
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
columnar::final
CM final
Definition: ColumnAccessor.h:106
SGImplSvc::msg_update_handler
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
Definition: SGImplSvc.cxx:1287
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:697
IProxyDict.h
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:1850
SGImplSvc::dump
std::string dump() const
dump objects in store.
Definition: SGImplSvc.cxx:524
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:1506
SGImplSvc::setStoreID
void setStoreID(StoreID::type id)
set store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:471
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
SGImplSvc::typeCount
int typeCount(const CLID &id) const
Return the number of instances of type T (input CLID)
Definition: SGImplSvc.cxx:694
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:1423
IProxyProviderSvc
Definition: IProxyProviderSvc.h:34
SGImplSvc::removeDataAndProxy
StatusCode removeDataAndProxy(const void *pObject)
Remove pObject and its proxy no matter what.
Definition: SGImplSvc.cxx:1331
SGImplSvc::recycle
void recycle(DataObject *pBadDObj)
put a bad (unrecordable) dobj away
Definition: SGImplSvc.cxx:1339
SGImplSvc::m_DumpArena
bool m_DumpArena
DumpArena Property flag : trigger m_arena->report() at clearStore.
Definition: SGImplSvc.h:694
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:1642
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:1016
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: sgkey_t.h:32
SGImplSvc::m_numSlots
int m_numSlots
The total number of slots. 1 if this isn't a Hive store.
Definition: SGImplSvc.h:715
SGImplSvc::symLink
StatusCode symLink(const void *p2BRegistered, CLID linkID)
make a soft link to the object T* already registered
Definition: SGImplSvc.cxx:579
SGImplSvc::addToStore
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
Definition: SGImplSvc.cxx:796
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:678
SGImplSvc::addAlias
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:682
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:66
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:966
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:700
SGImplSvc::makeCurrent
void makeCurrent()
The current store is becoming the active store.
Definition: SGImplSvc.cxx:1781
SGImplSvc::m_trash
std::list< DataObject * > m_trash
The Recycle Bin.
Definition: SGImplSvc.h:689
StoreID::type
type
Definition: StoreID.h:24
AthenaOutputStream
algorithm that marks for write data objects in SG
Definition: AthenaOutputStream.h:54
copySelective.target
string target
Definition: copySelective.py:36
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:25
IHiveStoreMgr.h
SG::detail::IteratorBase
Definition: SGIterator.h:37
SGImplSvc::store
SG::DataStore * store()
Definition: SGImplSvc.cxx:564
SGImplSvc::stop
virtual StatusCode stop() override final
Service stop.
Definition: SGImplSvc.cxx:214
SGWPtr.h
SGImplSvc::m_pPPS
IProxyProviderSvc * m_pPPS
Definition: SGImplSvc.h:684
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
SGImplSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: SGImplSvc.h:724
private
#define private
Definition: xAODTruthCnvAlg.h:20
IProxyProviderSvc.h
copySelective.source
string source
Definition: copySelective.py:31
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:924
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:912
DefaultKey.h
SGImplSvc::m_mutex
mutex_t m_mutex
Definition: SGImplSvc.h:725
SGImplSvc::t2pRemove
void t2pRemove(const void *const pTrans)
forwarded to DataStore
Definition: SGImplSvc.cxx:1281
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SGImplSvc::m_pPPSHandle
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
Definition: SGImplSvc.h:681
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:501
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:720
SGImplSvc::isSymLinked
bool isSymLinked(const CLID &linkID, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:494
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:1274
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:1626
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:1676
SGImplSvc::m_remap_impl
SG::RemapImpl * m_remap_impl
Definition: SGImplSvc.h:706
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:990
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:485
ServiceHandle
Definition: ClusterMakerTool.h:37
SGImplSvc::m_remapMutex
mutex_t m_remapMutex
Definition: SGImplSvc.h:726
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
SGImplSvc::loadEventProxies
StatusCode loadEventProxies()
load proxies at begin event
Definition: SGImplSvc.cxx:243