ATLAS Offline Software
SGImplSvc.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2023 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 //FIXME class IIncidentSvc;
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 IOVSvc;
93 class IOVSvcTool;
94 class PileUpMergeSvc;
95 class SGDeleteAlg;
96 class ActiveStoreSvc;
97 namespace SG {
98  class VarHandleBase;
99 }
100 namespace PerfMon { class StorePayloadMon; }
101 
111 class SGImplSvc final :
112  public Service,
113  public IProxyDict,
114  public IHiveStoreMgr,
115  public IIncidentListener
116 {
117 
118 public:
119  SGImplSvc (const SGImplSvc&) = delete;
120  SGImplSvc& operator= (const SGImplSvc&) = delete;
121 
122 
125 
126 
129  SG::detail::IteratorBase& cibegin,
130  SG::detail::IteratorBase& ciend) const;
131 
132 
134 
137 
138 
140  StatusCode recordAddress(const std::string& skey,
141  IOpaqueAddress* pAddress, bool clearAddressFlag=true);
143  StatusCode recordAddress(IOpaqueAddress* pAddress, bool clearAddressFlag=true);
144 
146  StatusCode symLink (const void* p2BRegistered, CLID linkID );
147 
149  StatusCode symLink (const CLID id, const std::string& key, const CLID linkid);
150 
152  StatusCode setAlias(CLID clid, const std::string& key, const std::string& aliasKey);
153 
155  StatusCode setAlias(const void* p2BAliased, const std::string& aliasKey);
156 
158  StatusCode setAlias(SG::DataProxy* proxy, const std::string& aliasKey);
159 
161  StatusCode setConst(const void* pointer);
162 
164  StatusCode remove(const void* pObject);
165 
167  StatusCode removeDataAndProxy(const void* pObject);
168 
174  bool transientSwap( const CLID& id,
175  const std::string& keyA, const std::string& keyB );
176 
178 
181 
182 
183  DataObject*
184  typeless_retrievePrivateCopy (const CLID clid, const std::string& key);
185 
186 
190  CLID clid( const std::string& key ) const;
191 
195  std::vector<CLID> clids( const std::string& key ) const;
196 
198  int typeCount(const CLID& id) const;
199 
203  bool contains(const CLID id, const std::string& key) const;
204 
205 
208  bool transientContains(const CLID id, const std::string& key) const;
209 
212  std::string dump() const;
213 
215  void setStoreID(StoreID::type id);
217  StoreID::type storeID() const;
218 
219 
227  void
228  keys(const CLID& id, std::vector<std::string>& vkeys,
229  bool includeAlias = false, bool onlyValid = true);
230 
232  virtual ::IProxyDict* hiveProxyDict() override final {
233  return this;
234  }
235 
237 
240 
241 
243  StatusCode regFcn (const CallBackID& c1,
244  const CallBackID& c2,
245  const IOVSvcCallBackFcn& fcn,
246  bool trigger = false);
247 
249  StatusCode regFcn (const std::string& toolName,
250  const CallBackID& c2,
251  const IOVSvcCallBackFcn& fcn,
252  bool trigger = false);
253 
255 
258  virtual SG::DataProxy* proxy(const void* const pTransient) const override final;
259 
262  virtual SG::DataProxy* proxy(const CLID& id) const final;
263 
265  virtual SG::DataProxy* proxy(const CLID& id, const std::string& key) const override final;
268  virtual SG::DataProxy* proxy(const CLID& id, const char* key) const final
269  { return this->proxy(id, std::string(key)); }
270 
272  virtual StatusCode addToStore (CLID id, SG::DataProxy* proxy) override final;
273 
294  virtual
296  const std::string& key,
297  bool allowMods,
298  bool returnExisting) override final;
299 
300 
304  virtual SG::DataProxy* proxy_exact (SG::sgkey_t sgkey) const override final;
305 
306 
308 
310 
311  virtual SG::DataProxy* proxy(const CLID& id, bool checkValid) const;
316  virtual SG::DataProxy* proxy(const CLID& id, const std::string& key, bool checkValid) const;
320  virtual SG::DataProxy* proxy(const CLID& id, const char* key, bool checkValid) const
321  { return this->proxy(id, std::string(key), checkValid); }
322 
324  virtual std::vector<const SG::DataProxy*> proxies() const override final;
325 
327  std::vector<CLID> clids() const;
328 
331  SG::DataProxy* transientProxy(const CLID& id, const std::string& key) const;
332 
334  DataObject* accessData(const CLID& id) const;
336  DataObject* accessData(const CLID& id, const std::string& key) const;
337 
343 
344 
352  virtual SG::SourceID sourceID (const std::string& key = "EventSelector") const override;
353 
356 
357 
359 
368  virtual
369  sgkey_t stringToKey (const std::string& str, CLID clid) override final;
370 
378  virtual
379  const std::string* keyToString (sgkey_t key) const override final;
380 
389  virtual
390  const std::string* keyToString (sgkey_t key, CLID& clid) const override final;
391 
404  virtual
405  void registerKey (sgkey_t key,
406  const std::string& str,
407  CLID clidid) override final;
408 
409 
418 
419 
421 
424 
425 
426 
434  void remap_impl (sgkey_t source,
435  sgkey_t target,
436  off_t index_offset);
437 
438 
447  virtual bool tryELRemap (sgkey_t sgkey_in, size_t index_in,
448  sgkey_t& sgkey_out, size_t& index_out) override final;
449 
451 
454 
455  SGImplSvc(const std::string& name, ISvcLocator* svc);
456  virtual ~SGImplSvc() override final;
458 
461 
462  virtual StatusCode initialize() override final;
463  virtual StatusCode reinitialize() override final;
464  virtual StatusCode start() override final;
465  virtual StatusCode stop() override final;
466  virtual StatusCode finalize() override final;
467  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override final;
469  static const InterfaceID& interfaceID();
471 
472 
475 
476  virtual void handle(const Incident&) override final;
481 
482 
485 
486  virtual StatusCode clearStore(bool forceRemove=false) override final;
489 
492  virtual void commitNewDataObjects() override final;
494 
495 
502  void setSlotNumber (int slot, int numSlots);
503 
504 
510  virtual void boundHandle (IResetable* handle) override final;
511 
512 
518  virtual void unboundHandle (IResetable* handle) override final;
519 
520 
522  // Const methods:
524 
535  virtual
536  StatusCode createObj (IConverter* cvt,
537  IOpaqueAddress* addr,
538  DataObject*& refpObject) override;
539 
540 
542 private:
543 
544  StatusCode record_HistObj(const CLID& id, const std::string& key,
545  const std::string& store, bool allowMods,
546  bool resetOnly=true);
547 
548 
549  friend
550  PyObject*
554  StatusCode typeless_record( DataObject* obj, const std::string& key,
555  const void* const raw_ptr,
556  bool allowMods, bool resetOnly=true,
557  bool noHist=false );
560  DataObject* obj, const std::string& key,
561  const void* const raw_ptr,
562  bool allowMods,
563  bool noHist=false,
564  const std::type_info* tinfo=0);
565 
566  StatusCode typeless_record( DataObject* obj, const std::string& key,
567  const void* const raw_ptr,
568  bool allowMods, bool resetOnly,
569  bool noHist,
570  const std::type_info* tinfo);
571  StatusCode typeless_record( DataObject* obj, const std::string& key,
572  const void* const raw_ptr,
573  bool allowMods, bool resetOnly,
574  bool noHist,
575  const std::type_info* tinfo,
576  SG::DataProxy** proxy_ret,
577  bool noOverwrite);
578 
581  SG::DataProxy* record_impl( DataObject* obj, const std::string& key,
582  const void* const raw_ptr,
583  bool allowMods, bool resetOnly, bool allowOverwrite,
584  const std::type_info* tinfo);
585 
586 
589  void releaseObject(const CLID& id, const std::string& key);
590 
592  friend class IOVDbSvc;
593  friend class IOVSvcTool;
594  friend class SGDeleteAlg;
595  friend class PerfMon::StorePayloadMon;
596  friend
597  void
602 
604  SG::DataProxy* locatePersistent(const SG::TransientAddress* tAddr,
605  bool checkValid = false) const;
606 
608  friend class AthenaOutputStream;
613 
615  friend class IOVSvc; // FIXME
616  friend class PileUpMergeSvc; // FIXME needs to call tRange
617  friend class StoreGateSvc;
619  friend class SG::VarHandleBase;
620 
621  SG::DataStore* store();
622  const SG::DataStore* store() const;
623 
624  bool isSymLinked(const CLID& linkID, SG::DataProxy* dp);
625 
627 
628  StatusCode addAlias(const std::string& aliasKey, SG::DataProxy* dp);
629 
631  std::string createKey(const CLID& dataID);
632 
634  SG::DataProxy* setupProxy(const CLID& dataID,
635  const std::string& gK,
636  DataObject* pDObj,
637  bool allowMods,
638  bool resetOnly);
639 
641  void recycle(DataObject* pBadDObj);
643  void emptyTrash();
644 
646  bool bindHandleToProxy(const CLID& id, const std::string& key,
647  IResetable* ir, SG::DataProxy*& dp);
648 
650  bool bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
651  IResetable* ir, SG::DataProxy *&dp);
652  bool bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
653  IResetable* ir, SG::DataProxy *&dp,
654  const CallBackID& c,
656  bool trigger);
657 
661  StatusCode removeProxy(SG::DataProxy* proxy, const void* pTrans,
662  bool forceRemove=false);
664  StatusCode t2pRegister(const void* const pTrans, SG::DataProxy* const pPers);
666  void t2pRemove(const void* const pTrans);
667 
669  void msg_update_handler(Gaudi::Details::PropertyBase& outputLevel);
670 
671  bool associateAux_impl (SG::AuxVectorBase* ptr,
672  const std::string& key,
673  CLID auxclid) const;
674 
675  bool associateAux_impl (SG::AuxElement* ptr,
676  const std::string& key,
677  CLID auxclid) const;
678 
680  void addAutoSymLinks (const std::string& key, CLID clid, SG::DataProxy* dp,
681  const std::type_info* tinfo,
682  bool warn_nobib = true);
683 
684  friend class ActiveStoreSvc;
688  void makeCurrent();
689 
690  IClassIDSvc* m_pCLIDSvc;
691  IConversionSvc* m_pDataLoader;
692 
694  // Has to be separate from handle due to setProxyProviderSvc() interface.
695  // Can we get rid of that?
697 
698  IHistorySvc* m_pHistorySvc;
699 
700  SG::DataStore* m_pStore;
701  std::list<DataObject*> m_trash;
702 
703  ServiceHandle<IIncidentSvc> m_pIncSvc;
704  bool m_DumpStore;
706  bool m_DumpArena;
707 
708  // typedef std::list<std::string> StrList;
709  StringArrayProperty m_folderNameList;
710 
712  IIOVSvc* getIIOVSvc();
714 
716 
717  SG::StringPool m_stringpool;
718 
719  SG::RemapImpl* m_remap_impl;
720 
722  SG::Arena m_arena;
723 
726 
729 
734  std::map<std::thread::id, std::vector<IResetable*> > m_newBoundHandles;
735 
736  typedef std::recursive_mutex mutex_t;
737  typedef std::lock_guard<mutex_t> lock_t;
738  mutable mutex_t m_mutex;
741 };
742 
743 
745 void SG_dump (SGImplSvc* sg);
746 void SG_dump (SGImplSvc* sg, const char* fname);
747 
748 
749 #include "StoreGate/tools/SGImplSvc.icc"
750 
751 #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:1572
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:1924
SGImplSvc::hiveProxyDict
virtual ::IProxyDict * hiveProxyDict() override final
implements IHiveStore interface for compat with Hive
Definition: SGImplSvc.h:232
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:697
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:750
SGImplSvc::createObj
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override
Call converter to create an object, with locking.
Definition: SGImplSvc.cxx:1843
SGImplSvc::operator=
SGImplSvc & operator=(const SGImplSvc &)=delete
SGImplSvc::addSymLink
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:650
SGImplSvc::setConst
StatusCode setConst(const void *pointer)
prevent downstream clients from modifying the pointed-at dobj
Definition: SGImplSvc.cxx:1343
SGImplSvc::SGImplSvc
SGImplSvc(const SGImplSvc &)=delete
SGImplSvc::locatePersistent
SG::DataProxy * locatePersistent(const SG::TransientAddress *tAddr, bool checkValid=false) const
Definition: SGImplSvc.cxx:1268
SGImplSvc::clearStore
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
Definition: SGImplSvc.cxx:277
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:1782
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:863
EventInfoWrite.EventSelector
EventSelector
Definition: EventInfoWrite.py:49
SGObjectWithVersion.h
associate a data object with its VersionedKey
SGImplSvc::getIIOVSvc
IIOVSvc * getIIOVSvc()
get the IOVSvc "just in time" (breaks recursion at initialize)
Definition: SGImplSvc.cxx:234
SGImplSvc::boundHandle
virtual void boundHandle(IResetable *handle) override final
Tell the store that a proxy has been bound to a handle.
Definition: SGImplSvc.cxx:1800
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:1281
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:1500
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:734
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:1336
SGImplSvc::m_stringPoolMutex
mutex_t m_stringPoolMutex
Definition: SGImplSvc.h:740
SGImplSvc::m_pIncSvc
ServiceHandle< IIncidentSvc > m_pIncSvc
property
Definition: SGImplSvc.h:703
SGImplSvc::emptyTrash
void emptyTrash()
throw away bad objects
Definition: SGImplSvc.cxx:1387
ActiveStoreSvc
A service that caches a pointer to the currently active store. It also implements the IProxyDict stor...
Definition: ActiveStoreSvc.h:32
SGImplSvc::mutex_t
std::recursive_mutex mutex_t
Definition: SGImplSvc.h:736
SGImplSvc::releaseObject
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
Definition: SGImplSvc.cxx:1589
SGImplSvc::proxies
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
Definition: SGImplSvc.cxx:976
SGIterator.h
A standard conforming forward iterator over items in StoreGate.
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
SGImplSvc::reinitialize
virtual StatusCode reinitialize() override final
Service reinitialization.
Definition: SGImplSvc.cxx:336
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:1875
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:51
python.FakeAthena.Service
def Service(name)
Definition: FakeAthena.py:38
SGImplSvc::m_ActivateHistory
bool m_ActivateHistory
Activate the history service.
Definition: SGImplSvc.h:705
IOVSvc
Definition: IOVSvc.h:54
ProxyMap.h
SGImplSvc::m_storeLoaded
bool m_storeLoaded
FIXME hack needed by loadEventProxies.
Definition: SGImplSvc.h:715
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:725
SGImplSvc::keyToString
virtual const std::string * keyToString(sgkey_t key) const override final
Find the string corresponding to a given key.
Definition: SGImplSvc.cxx:1514
SGImplSvc::initialize
virtual StatusCode initialize() override final
Service initialization.
Definition: SGImplSvc.cxx:131
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
PileUpMergeSvc
the preferred mechanism to access information from the different event stores in a pileup job.
Definition: PileUpMergeSvc.h:58
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:1105
SGImplSvc::bindHandleToProxyAndRegister
bool bindHandleToProxyAndRegister(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
Also do registration with IOVSvc.
Definition: SGImplSvc.cxx:1430
SGImplSvc::storeID
StoreID::type storeID() const
get store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:522
SGImplSvc::unboundHandle
virtual void unboundHandle(IResetable *handle) override final
Tell the store that a handle has been unbound from a proxy.
Definition: SGImplSvc.cxx:1812
AthenaInternal
Definition: AthenaPythonDict.h:31
SGImplSvc::m_pStore
SG::DataStore * m_pStore
Definition: SGImplSvc.h:700
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
IResetable
a resetable object (e.g. a SG DataHandle)
Definition: IResetable.h:15
PerfMon
a simple malloc wrapper that keeps track of the amount of memory allocated on the heap.
Definition: CallGraphAuditor.cxx:24
SG_dump
void SG_dump(SGImplSvc *sg)
These are intended to be easy to call from the debugger.
Definition: SGImplSvc.cxx:1857
PyObject
_object PyObject
Definition: SGImplSvc.h:78
SGImplSvc::m_DumpStore
bool m_DumpStore
Dump Property flag: triggers dump() at EndEvent.
Definition: SGImplSvc.h:704
SGImplSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: SGImplSvc.cxx:986
SGImplSvc::bindHandleToProxy
bool bindHandleToProxy(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
name says it all
Definition: SGImplSvc.cxx:1398
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:722
SGImplSvc::m_stringpool
SG::StringPool m_stringpool
Definition: SGImplSvc.h:717
SGImplSvc::m_pHistorySvc
IHistorySvc * m_pHistorySvc
Definition: SGImplSvc.h:698
DataProxy
DataProxy provides the registry services for StoreGate.
Definition: DataProxy.h:31
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:1015
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:1606
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:474
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:116
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:759
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
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:268
SGImplSvc::remove
StatusCode remove(const void *pObject)
Remove pObject, will remove its proxy if not reset only.
Definition: SGImplSvc.cxx:1363
SGImplSvc::remap_impl
void remap_impl(sgkey_t source, sgkey_t target, off_t index_offset)
Declare a remapping.
Definition: SGImplSvc.cxx:1634
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:1140
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:1654
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
fcn
void fcn(int &, double *, double &result, double par[], int)
this is where we write out chi2
Definition: Chi2LJets.cxx:183
SGImplSvc::msg_update_handler
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
Definition: SGImplSvc.cxx:1328
StoreID.h
IOVSvcTool
Definition: IOVSvcTool.h:70
SGImplSvc::finalize
virtual StatusCode finalize() override final
Service finalization.
Definition: SGImplSvc.cxx:309
SGImplSvc::m_folderNameList
StringArrayProperty m_folderNameList
FolderNameList Property.
Definition: SGImplSvc.h:709
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:383
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:1893
SGImplSvc::dump
std::string dump() const
dump objects in store.
Definition: SGImplSvc.cxx:569
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:1549
SGImplSvc::setStoreID
void setStoreID(StoreID::type id)
set store ID. request forwarded to DataStore:
Definition: SGImplSvc.cxx:516
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:742
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
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:1464
IProxyProviderSvc
Definition: IProxyProviderSvc.h:34
compileRPVLLRates.c2
c2
Definition: compileRPVLLRates.py:361
SGImplSvc::removeDataAndProxy
StatusCode removeDataAndProxy(const void *pObject)
Remove pObject and its proxy no matter what.
Definition: SGImplSvc.cxx:1372
SGImplSvc::recycle
void recycle(DataObject *pBadDObj)
put a bad (unrecordable) dobj away
Definition: SGImplSvc.cxx:1380
SGImplSvc::m_DumpArena
bool m_DumpArena
DumpArena Property flag : trigger m_arena->report() at clearStore.
Definition: SGImplSvc.h:706
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:1685
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:1057
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:26
SGImplSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface) override final
Definition: SGImplSvc.cxx:355
SGImplSvc::interfaceID
static const InterfaceID & interfaceID()
Should rather be in ISGImplSvc.h if we had one.
Definition: SGImplSvc.cxx:345
SGImplSvc::m_numSlots
int m_numSlots
The total number of slots. 1 if this isn't a Hive store.
Definition: SGImplSvc.h:728
SGImplSvc::symLink
StatusCode symLink(const void *p2BRegistered, CLID linkID)
make a soft link to the object T* already registered
Definition: SGImplSvc.cxx:627
SGImplSvc::addToStore
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
Definition: SGImplSvc.cxx:836
AthenaInternal::py_sg_clearProxyPayload
void py_sg_clearProxyPayload(StoreGateSvc *self, SG::DataProxy *)
Definition: StoreGatePyExt.cxx:458
SGImplSvc::addAlias
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:730
IIOVSvc.h
SGImplSvc::handle
virtual void handle(const Incident &) override final
triggered by Incident service
Definition: SGImplSvc.cxx:244
SGImplSvc::m_pCLIDSvc
IClassIDSvc * m_pCLIDSvc
Definition: SGImplSvc.h:690
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.
SGImplSvc::transientProxy
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
Definition: SGImplSvc.cxx:1007
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
SGImplSvc::m_pDataLoader
IConversionSvc * m_pDataLoader
Definition: SGImplSvc.h:691
SGImplSvc::makeCurrent
void makeCurrent()
The current store is becoming the active store.
Definition: SGImplSvc.cxx:1824
SGImplSvc::m_trash
std::list< DataObject * > m_trash
The Recycle Bin.
Definition: SGImplSvc.h:701
StoreID::type
type
Definition: StoreID.h:24
AthenaOutputStream
algorithm that marks for write data objects in SG
Definition: AthenaOutputStream.h:58
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:23
IHiveStoreMgr.h
SG::detail::IteratorBase
Definition: SGIterator.h:36
SGImplSvc::store
SG::DataStore * store()
Definition: SGImplSvc.cxx:612
SGImplSvc::stop
virtual StatusCode stop() override final
Service stop.
Definition: SGImplSvc.cxx:216
SGWPtr.h
SGImplSvc::m_pPPS
IProxyProviderSvc * m_pPPS
Definition: SGImplSvc.h:696
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
SGImplSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: SGImplSvc.h:737
IProxyProviderSvc.h
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:965
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:320
COOLRates.target
target
Definition: COOLRates.py:1106
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:46
SGImplSvc::createKey
std::string createKey(const CLID &dataID)
creates a key internally if none specified by client
Definition: SGImplSvc.cxx:268
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:953
DefaultKey.h
SGImplSvc::m_mutex
mutex_t m_mutex
Definition: SGImplSvc.h:738
SGImplSvc::t2pRemove
void t2pRemove(const void *const pTrans)
forwarded to DataStore
Definition: SGImplSvc.cxx:1322
python.PyAthena.obj
obj
Definition: PyAthena.py:135
SGImplSvc::m_pPPSHandle
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
Definition: SGImplSvc.h:693
SG::DataProxy
Definition: DataProxy.h:44
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:546
SGImplSvc::m_pIOVSvc
IIOVSvc * m_pIOVSvc
Definition: SGImplSvc.h:713
SGImplSvc::start
virtual StatusCode start() override final
Service start.
Definition: SGImplSvc.cxx:201
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:768
SGImplSvc::isSymLinked
bool isSymLinked(const CLID &linkID, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:539
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:1315
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:1669
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:1719
SGImplSvc::m_remap_impl
SG::RemapImpl * m_remap_impl
Definition: SGImplSvc.h:719
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:1031
PhysDESDM_Quirks.trigger
trigger
Definition: PhysDESDM_Quirks.py:27
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:530
ServiceHandle
Definition: ClusterMakerTool.h:37
SGImplSvc::m_remapMutex
mutex_t m_remapMutex
Definition: SGImplSvc.h:739
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
SGImplSvc::loadEventProxies
StatusCode loadEventProxies()
load proxies at begin event
Definition: SGImplSvc.cxx:255