ATLAS Offline Software
Loading...
Searching...
No Matches
StoreGateSvc.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef STOREGATE_STOREGATESVC_H
8#define STOREGATE_STOREGATESVC_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#include "GaudiKernel/Service.h"
16#include "GaudiKernel/SmartIF.h"
18
24
25#include <GaudiKernel/ClassID.h> // for CLID
26#include <GaudiKernel/IMessageSvc.h> // for Level
27#include "Gaudi/Property.h"
28#include "GaudiKernel/ServiceHandle.h"
29#include "GaudiKernel/StatusCode.h"
30#include "GaudiKernel/DataObjID.h"
31#include "GaudiKernel/IAlgContextSvc.h"
32
33#include <cstddef> // for size_t
34#include <memory>
35#include <mutex>
36#include <sys/types.h> // for off_t
37#include <vector>
38#include <type_traits>
39
42#include "AthAllocators/Arena.h"
43
44#include <SGTools/StringPool.h>
45
46// includes used in StoreGateSvc.icc
48#include "StoreGate/SGWPtr.h"
50
51#include "GaudiKernel/IIncidentListener.h"
52
54
55//forward declarations
56namespace SG {
57 class DataProxy;
58 class TransientAddress;
59 struct RemapImpl;
60 class TestHiveStoreSvc;
61 class HiveMgrSvc;
62}
63namespace xAODMaker {
64 class AuxStoreWrapper;
65}
66
67class DataObject;
68class IConversionSvc;
69class IIncidentSvc;
71class IHistorySvc;
72
73// python forward
74struct _object; typedef _object PyObject;
75class StoreGateSvc;
76namespace AthenaInternal {
79}
80namespace SG {
81 class NoAuxStore;
82}
83
84//friends...
86class IOVDbSvc;
87class IOVSvcTool;
88class PileUpMergeSvc;
89namespace SG {
90 class VarHandleBase;
91}
92
108class StoreGateSvc : public extends<Service,
109 IProxyDict,
110 IHiveStore,
111 IHiveStoreMgr,
112 IIncidentListener>
113{
114
115public:
118
119
137
138 template <typename T, typename TKEY, typename... ARGS>
139 SG::WPtr<T> create(const TKEY& key, ARGS... constructorArgs);
141
144
145
147 template <typename T, typename TKEY>
148 StatusCode record(T* p2BRegistered, const TKEY& key);
149
151 template <typename T, typename TKEY>
152 StatusCode record(const T* p2BRegistered, const TKEY& key);
153
154
157 template <typename T, typename TKEY>
158 StatusCode record(T* p2BRegistered, const TKEY& key,
159 bool allowMods, bool resetOnly=true, bool noHist=false);
160
162 template <typename T, typename TKEY>
163 StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key);
164
166 template <typename T, typename TKEY>
167 StatusCode record(std::unique_ptr<const T> pUnique, const TKEY& key);
168
171 template <typename T, typename TKEY>
172 StatusCode record(std::unique_ptr<T> pUnique, const TKEY& key,
173 bool allowMods, bool resetOnly=true, bool noHist=false);
174
176
179
180
182 template <typename T>
183 StatusCode retrieve(const T*& ptr) const;
184
186 template <typename T>
187 StatusCode retrieve(T*& ptr) const;
188
191 template <typename T>
192 T* retrieve () const;
193
196 template <typename T>
197 T* tryRetrieve () const;
198 template <typename T>
199 const T* tryConstRetrieve() const;
200
202 template <typename T, typename TKEY>
203 StatusCode retrieve(const T*& ptr, const TKEY& key) const requires KeyConcept<TKEY>;
204
207 template <typename T>
208 StatusCode retrieve(const T*& ptr, const std::string& key) const;
209
210
212 template <typename T, typename TKEY>
213 StatusCode retrieve(T*& ptr, const TKEY& key) const requires KeyConcept<TKEY>;
214
217 template <typename T>
218 StatusCode retrieve(T*& ptr, const std::string& key) const;
219
220
223 template <typename T, class TKEY>
224 T* retrieve (const TKEY& key) const;
225
228 template <typename T, class TKEY>
229 T* tryRetrieve (const TKEY& key) const requires KeyConcept<TKEY>;
230 template <typename T, class TKEY>
231 const T* tryConstRetrieve(const TKEY& key) const requires KeyConcept<TKEY>;
232
233
234
236 template <typename T>
237 StatusCode retrieve(SG::ConstIterator<T>& begin,
238 SG::ConstIterator<T>& end) const;
239
241 StatusCode retrieve(CLID id,
243 SG::TypelessIterator& end) const;
244
249 template <typename T, typename TKEY>
250 bool contains(const TKEY& key) const;
251
253
256
257
259 template <typename T, KeyConcept TKEY>
260 StatusCode overwrite(std::unique_ptr<T> pUnique, const TKEY& key,
261 bool allowMods, bool noHist=false);
262
264 StatusCode recordAddress(const std::string& skey,
266 bool clearAddressFlag=true,
267 const std::vector<CLID>& bases = {});
270 bool clearAddressFlag=true,
271 const std::vector<CLID>& bases = {});
272
274 // You generally should not be using this. If base class declarations
275 // are im place, then symlinks for valid conversions should be made
276 // automatically.
277 // If you do need to make a symlink explicitly, prefer doing it
278 // via WriteHandle.
279 template <KeyConcept TKEY>
280 StatusCode symLink (const CLID id, const TKEY& key, const CLID linkid);
281
283 // You generally should not be using this.
284 // Prefer calling alias() from Read/WriteHandle.
285 template <typename T, typename AKEY>
286 StatusCode setAlias(const T* p2BAliased, const AKEY& aliasKey) requires KeyConcept<AKEY>;
287
289 StatusCode setConst(const void* pointer);
290
292 template <typename T>
293 StatusCode remove(const T* pObject);
294
296 template <typename T>
297 StatusCode removeDataAndProxy(const T* pObject);
298
300
303
304
308 template<typename TKEY>
309 CLID clid( const TKEY& key ) const;
310
314 template <typename TKEY>
315 bool contains(const CLID& id, const TKEY& key) const;
316
317
322 template <typename T, typename TKEY>
323 bool transientContains(const TKEY& key) const;
324
327 template <typename TKEY>
328 bool transientContains(const CLID& id, const TKEY& key) const;
329
332 std::string dump() const;
333
335 void setStoreID(StoreID::type id);
337 virtual StoreID::type storeID() const override;
338
339
346 template <typename T>
347 void
348 keys(std::vector<std::string>& vkeys,
349 bool includeAlias = false, bool onlyValid = true) const;
350
358 void
359 keys(const CLID& id, std::vector<std::string>& vkeys,
360 bool includeAlias = false, bool onlyValid = true) const;
361
363
364
366 // FIXME pointer to unsafe impl exposed
367 virtual ::IProxyDict* hiveProxyDict() override final {
369 }
370
373
374
377
378
380 virtual StatusCode clearStore(bool forceRemove=false) override final;
381
384 virtual void commitNewDataObjects() override final;
386
388 static void setSlot(SG::HiveEventSlot* pSlot);
389
390
392
394 virtual SG::DataProxy* proxy(const void* const pTransient) const override final;
395
397 virtual SG::DataProxy* proxy(const CLID& id) const final;
398
400 virtual SG::DataProxy* proxy(const CLID& id, const std::string& key) const override final;
403 SG::DataProxy* proxy(const CLID& id, const char* key) const;
404
406 virtual StatusCode addToStore (CLID id, SG::DataProxy* proxy) override final;
407
428 virtual
429 SG::DataProxy* recordObject (SG::DataObjectSharedPtr<DataObject> obj,
430 const std::string& key,
431 bool allowMods,
432 bool returnExisting) override final;
433
434
438 virtual SG::DataProxy* proxy_exact (SG::sgkey_t sgkey) const override final;
439
440
442
444
445
447 virtual SG::DataProxy* proxy(const CLID& id, bool checkValid) const final;
450 virtual SG::DataProxy* proxy(const CLID& id, const std::string& key, bool checkValid) const final;
454 virtual SG::DataProxy* proxy(const CLID& id, const char* key, bool checkValid) const final
455 { return this->proxy(id, std::string(key), checkValid); }
456
458 virtual std::vector<const SG::DataProxy*> proxies() const override final;
459
462
465 SG::DataProxy* transientProxy(const CLID& id, const std::string& key) const;
466
468 DataObject* accessData(const CLID& id) const;
470 DataObject* accessData(const CLID& id, const std::string& key) const;
471
477
478
486 virtual SG::SourceID sourceID (const std::string& key = "EventSelector") const override;
487
488
491
492
494
503 virtual
504 sgkey_t stringToKey (const std::string& str, CLID clid) override final;
505
513 virtual
514 const std::string* keyToString (sgkey_t key) const override final;
515
524 virtual
525 const std::string* keyToString (sgkey_t key, CLID& clid) const override final;
526
539 virtual
540 void registerKey (sgkey_t key,
541 const std::string& str,
542 CLID clidid) override final;
543
545
548
549
550
573 template <class TKEY>
575 const TKEY& source,
576 const TKEY& target,
577 off_t index_offset);
578
579
587 void remap_impl (sgkey_t source,
588 sgkey_t target,
589 off_t index_offset);
590
591
600 virtual bool tryELRemap (sgkey_t sgkey_in, size_t index_in,
601 sgkey_t& sgkey_out, size_t& index_out) override final;
602
604
607
608 StoreGateSvc(const std::string& name, ISvcLocator* svc);
609 virtual ~StoreGateSvc() override;
611
614
615 virtual StatusCode initialize() override;
616 virtual StatusCode stop() override;
617 virtual StatusCode finalize() override;
619
622
623 virtual void handle(const Incident&) override final;
625 StatusCode loadEventProxies();
627
628
639 virtual
640 StatusCode createObj (IConverter* cvt,
641 IOpaqueAddress* addr,
642 DataObject*& refpObject) override;
643
647 void makeCurrent();
648
649
650private:
652
653 ServiceHandle<IProxyProviderSvc> m_pPPSHandle{this, "ProxyProviderSvc", "ProxyProviderSvc"};
654 ServiceHandle<IIncidentSvc> m_incSvc{this, "IncidentSvc", "IncidentSvc"};
655 ServiceHandle<IAlgContextSvc> m_algContextSvc{this, "AlgContextSvc", "AlgContextSvc"};
656 Gaudi::Property<bool> m_DumpStore{this, "Dump", false, "Dump contents at EndEvent"};
657 Gaudi::Property<bool> m_ActivateHistory{this, "ActivateHistory", false, "record DataObjects history"};
658 Gaudi::Property<bool> m_DumpArena{this, "DumpArena", false, "Dump Arena usage stats"};
659 Gaudi::Property<bool> m_pruneIncidents{this, "PruneIncidents", false, "Don't send StoreCleared incidents if there are no registered listeners on the first event."};
661
664
665 SmartIF<SGImplSvc> m_defaultStore;
666
669
670 friend class SG::HiveMgrSvc;
673
674
679 void releaseObject(const CLID& id, const std::string& key);
680
681
683 friend class PileUpMergeSvc;
685 friend class IOVDbSvc;
686 friend class IOVSvcTool;
687 friend
688 void
690
694
696 friend class SG::VarHandleBase;
697 friend
698 PyObject*
702 StatusCode typeless_record( DataObject* obj, const std::string& key,
703 const void* const raw_ptr,
704 bool allowMods, bool resetOnly=true,
705 bool noHist=false );
707 StatusCode typeless_overwrite( const CLID& id,
708 DataObject* obj, const std::string& key,
709 const void* const raw_ptr,
710 bool allowMods,
711 bool noHist=false,
712 const std::type_info* tinfo=0);
713
714 // Helper for record.
715 template <typename T, typename TKEY>
716 StatusCode record1(DataObject* obj, T* pObject, const TKEY& key,
717 bool allowMods, bool resetOnly=true, bool noHist=false) requires KeyConcept<TKEY>;
718
719 bool isSymLinked(const CLID& linkID, SG::DataProxy* dp);
720
721 StatusCode addSymLink(const CLID& linkid, SG::DataProxy* dp);
722
723 StatusCode addAlias(const std::string& aliasKey, SG::DataProxy* dp);
724
726 std::string createKey(const CLID& dataID);
727
730 const std::string& gK,
731 DataObject* pDObj,
732 bool allowMods,
733 bool resetOnly);
734
736 void recycle(DataObject* pBadDObj);
738 void emptyTrash();
739
745 StatusCode removeProxy(SG::DataProxy* proxy, const void* pTrans,
746 bool forceRemove=false);
748 StatusCode t2pRegister(const void* const pTrans, SG::DataProxy* const pPers);
750 void t2pRemove(const void* const pTrans);
751
753 void msg_update_handler(Gaudi::Details::PropertyBase& outputLevel);
754
756 void addAutoSymLinks (const std::string& key, CLID clid, SG::DataProxy* dp,
757 const std::type_info* tinfo,
758 bool warn_nobib = true);
759
761 : public DataObjID
762 {
763 public:
764 BadListItem (CLID clid, const std::string& key, const std::string& algo)
765 : DataObjID (clid, key), m_algo (algo)
766 {}
767 std::string m_algo;
768 };
769 typedef std::unordered_set<BadListItem, DataObjID_Hasher> BadItemList;
770
773 // Thread-safe, since they're protected by m_badMutex.
774 mutable BadItemList m_badRetrieves ATLAS_THREAD_SAFE;
775 mutable BadItemList m_badRecords ATLAS_THREAD_SAFE;
776
778 typedef std::mutex mutex_t;
779 typedef std::lock_guard<mutex_t> lock_t;
781
782
783 // State of PruneIncidents checking.
784 // HAVE_LISTENERS means that there are listeners for the ClearStore
785 // incident; NO_LISTENERS means that there aren't any.
786 // UNCHECKED means that we haven't checked yet.
788 std::atomic<ListenerState> m_listenerState { UNCHECKED };
789
790
796 void rememberBadRetrieve (CLID clid, const std::string& key) const;
797
798
804 void rememberBadRecord (CLID clid, const std::string& key) const;
805
806
814 CLID clid,
815 const std::string& key) const;
816
817
823 void printBadList (const BadItemList& bad,
824 const std::string& what) const;
825
826
832 template <class DOBJ>
833 bool associateAux (DOBJ*,
834 const std::string& key,
835 bool ignoreMissing=true) const;
836 template <class DOBJ>
837 bool associateAux (const DOBJ*,
838 const std::string& key,
839 bool ignoreMissing=true) const;
840
841 template <class DOBJ, class AUXSTORE>
842 bool associateAux_impl(DOBJ* ptr,
843 const std::string& key,
844 const AUXSTORE*) const;
845 template <class DOBJ>
846 bool associateAux_impl(DOBJ* /*ptr*/,
847 const std::string& /*key*/,
848 const SG::NoAuxStore*) const;
849
850
851private:
854};
855
856
858void SG_dump (StoreGateSvc* sg);
859void SG_dump (StoreGateSvc* sg, const char* fname);
860
861
863
864
865//- PyGate: StoreGate access from python -------------------------------------
866template< class T >
867struct PyGate {
868 // default object retrieval
869 static const T* retrieve( StoreGateSvc* psg ) {
870 const T* obj = 0;
871 if ( StatusCode::SUCCESS == psg->retrieve( obj ) )
872 return obj;
873 return 0;
874 }
875
876 // object retrieval with string key
877 static const T* retrieve( StoreGateSvc* psg, const std::string& key ) {
878 const T* obj = 0;
879 if ( StatusCode::SUCCESS == psg->retrieve( obj, key ) )
880 return obj;
881 return 0;
882 }
883};
884
885#endif // STOREGATE_STOREGATESVC_H
Collection of memory allocators with a common lifetime, plus subsystem summary.
uint32_t CLID
The Class ID type.
_object PyObject
Simple smart pointer for Gaudi-style refcounted objects.
A standard conforming forward iterator over items in StoreGate.
return type of StoreGateSvc::create.
void SG_dump(StoreGateSvc *sg)
These are intended to be easy to call from the debugger.
Maintain a mapping of strings to 64-bit ints.
Define macros for attributes used to control the static checker.
algorithm that marks for write data objects in SG
Simple smart pointer for Gaudi-style refcounted objects.
DataProxy provides the registry services for StoreGate.
A structure created by HiveMgrSvc and used by SGHiveStoreSvc to forward the StoreGateSvc method to a ...
Athena service for Interval Of Validity database.
Definition IOVDbSvc.h:72
Abstract interface for looking up strings/CLIDs in a pool.
Definition IStringPool.h:28
the preferred mechanism to access information from the different event stores in a pileup job.
The Athena Transient Store API.
Definition SGImplSvc.h:107
a const_iterator facade to DATA.
Definition SGIterator.h:285
Mark that there's no associated AuxStore class.
an iterator facade to DataProxy*.
Definition SGIterator.h:194
Base class for VarHandle types.
The Athena Transient Store API.
StatusCode retrieve(T *&ptr) const
Retrieve the default object into a T*.
StatusCode record(T *p2BRegistered, const TKEY &key, bool allowMods, bool resetOnly=true, bool noHist=false)
Record an object with a key, allow possibility of specifying const-access.
SG::WPtr< T > create(const TKEY &key, ARGS... constructorArgs)
Create an object with one of its constructors and record it with a key.
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override final
Record an object in the store.
friend class SG::TestHiveStoreSvc
const T * tryConstRetrieve(const TKEY &key) const
virtual StatusCode finalize() override
static SG::HiveEventSlot * currentSlot()
std::string dump() const
dump objects in store.
bool isSymLinked(const CLID &linkID, SG::DataProxy *dp)
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override
Call converter to create an object, with locking.
IProxyProviderSvc * proxyProviderSvc()
Return current ProxyProviderSvc.
virtual void handle(const Incident &) override final
StatusCode record(std::unique_ptr< T > pUnique, const TKEY &key, bool allowMods, bool resetOnly=true, bool noHist=false)
Record an object with a key, allow possibility of specifying const-access.
virtual void registerKey(sgkey_t key, const std::string &str, CLID clidid) override final
Remember an additional mapping from key to string/CLID.
DataObject * accessData(const CLID &id) const
find proxy and access its data. Returns 0 to flag failure
StoreGateSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
SmartIF< SGImplSvc > m_defaultStore
T * tryRetrieve(const TKEY &key) const
Variant of the above which doesn't print a warning message.
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
StatusCode loadEventProxies()
load proxies at begin event
BadItemList m_badRetrieves ATLAS_THREAD_SAFE
Remember calls to retrieve and record for a MT store, so we can warn about them during finalize().
Gaudi::Property< bool > m_DumpArena
bool associateAux_impl(DOBJ *ptr, const std::string &key, const AUXSTORE *) const
Gaudi::Property< bool > m_pruneIncidents
StatusCode retrieve(SG::ConstIterator< T > &begin, SG::ConstIterator< T > &end) const
Retrieve all objects of type T: returns an SG::ConstIterator range.
StatusCode retrieve(T *&ptr, const std::string &key) const
Retrieve an object with "key", into a T*.
T * retrieve() const
Variant of the above which doesn't return a status code.
friend class IOVSvcTool
void remap_impl(sgkey_t source, sgkey_t target, off_t index_offset)
Declare a remapping.
bool transientContains(const CLID &id, const TKEY &key) const
Look up a transient data object in TDS only by CLID.
StatusCode symLink(const CLID id, const TKEY &key, const CLID linkid)
make a soft link to the object pointed by id/key
void rememberBad(BadItemList &bad, CLID clid, const std::string &key) const
Remember that retrieve or record was called for a MT store.
StatusCode retrieve(T *&ptr, const TKEY &key) const
Retrieve an object with "key", into a T*.
void t2pRemove(const void *const pTrans)
forwarded to DataStore
static StoreGateSvc * currentStoreGate()
get current StoreGate
StatusCode retrieve(const T *&ptr, const std::string &key) const
Retrieve an object with "key", into a const T*.
StatusCode record(const T *p2BRegistered, const TKEY &key)
Record a const object with a key.
virtual StoreID::type storeID() const override
get store ID. request forwarded to DataStore:
SG::DataProxy * setupProxy(const CLID &dataID, const std::string &gK, DataObject *pDObj, bool allowMods, bool resetOnly)
try to locate a proxy or create it if needed
std::lock_guard< mutex_t > lock_t
T * tryRetrieve() const
Variant of the above which doesn't print a warning message.
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
const T * tryConstRetrieve() const
void clearProxyPayload(SG::DataProxy *)
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method corre...
StatusCode remove(const T *pObject)
Remove pObject, will remove its proxy if not reset only.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
StatusCode record1(DataObject *obj, T *pObject, const TKEY &key, bool allowMods, bool resetOnly=true, bool noHist=false)
Gaudi::Property< bool > m_DumpStore
bool contains(const CLID &id, const TKEY &key) const
Look up a keyed object in TDS by CLID.
void setStoreID(StoreID::type id)
set store ID. request forwarded to DataStore:
std::unordered_set< BadListItem, DataObjID_Hasher > BadItemList
IStringPool::sgkey_t sgkey_t
void rememberBadRetrieve(CLID clid, const std::string &key) const
Remember that retrieve() was called for a MT store.
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
CLID clid(const TKEY &key) const
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!
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.
StatusCode removeDataAndProxy(const T *pObject)
Remove pObject and its proxy no matter what.
friend class PileUpMergeSvc
access emptyTrash
StoreID::type m_storeID
Cache store type in the facade class.
bool associateAux_impl(DOBJ *, const std::string &, const SG::NoAuxStore *) const
virtual void commitNewDataObjects() override final
Reset handles added since the last call to commit.
StoreGateSvc & operator=(const StoreGateSvc &)
void makeCurrent()
The current store is becoming the active store.
bool associateAux(DOBJ *, const std::string &key, bool ignoreMissing=true) const
try to associate a data object to its auxiliary store if ignoreMissing=false
virtual SG::SourceID sourceID(const std::string &key="EventSelector") const override
Return the metadata source ID for the current event slot.
SGImplSvc * currentStore() const
returns pointer to the current SGImplSvc
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
std::mutex mutex_t
Protect access to m_bad* members.
void emptyTrash()
throw away bad objects
bool transientContains(const TKEY &key) const
Look up a transient data object in TDS only (no Proxy lookup) returns false if object not available i...
virtual StatusCode initialize() override
Service initialization.
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
T * retrieve(const TKEY &key) const
Variant of the above which doesn't return a status code.
void printBadList(const BadItemList &bad, const std::string &what) const
Print out a list of bad calls during finalization.
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
Properties.
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...
ServiceHandle< IAlgContextSvc > m_algContextSvc
StatusCode recordAddress(const std::string &skey, CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress, bool clearAddressFlag=true, const std::vector< CLID > &bases={})
Create a proxy object using an IOpaqueAddress and a transient key.
virtual const std::string * keyToString(sgkey_t key) const override final
Find the string corresponding to a given key.
std::atomic< ListenerState > m_listenerState
StatusCode retrieve(const T *&ptr, const TKEY &key) const
Retrieve an object with "key", into a const T*.
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
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.
virtual sgkey_t stringToKey(const std::string &str, CLID clid) override final
Find the key for a string/CLID pair.
virtual StatusCode stop() override
Service start.
std::vector< CLID > clids() const
Return all CLIDs in the store.
void rememberBadRecord(CLID clid, const std::string &key) const
Remember that retrieve() was called for a MT store.
std::string createKey(const CLID &dataID)
creates a key internally if none specified by client
Gaudi::Property< bool > m_ActivateHistory
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
StatusCode setAlias(const T *p2BAliased, const AKEY &aliasKey)
make an alias to a DataObject (provide only valid pointer)
void recycle(DataObject *pBadDObj)
put a bad (unrecordable) dobj away
mutex_t m_badMutex
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory
void remap(CLID clid, const TKEY &source, const TKEY &target, off_t index_offset)
Declare a remapping.
friend class IOVDbSvc
access clearProxyPayload
StatusCode setConst(const void *pointer)
prevent downstream clients from modifying the pointed-at dobj
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override final
Get proxy given a hashed key+clid.
void keys(std::vector< std::string > &vkeys, bool includeAlias=false, bool onlyValid=true) const
provide list of all StoreGate keys associated with an object.
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
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
bool contains(const TKEY &key) const
Look up a keyed object in TDS (compare also tryRetrieve) returns false if object not available in TDS...
void setProxyProviderSvc(IProxyProviderSvc *pPPSvc)
associate ProxyProviderSvc to this store
ServiceHandle< IIncidentSvc > m_incSvc
StatusCode removeProxy(SG::DataProxy *proxy, const void *pTrans, bool forceRemove=false)
remove proxy from store, unless it is reset only.
bool associateAux(const DOBJ *, const std::string &key, bool ignoreMissing=true) const
StatusCode record(std::unique_ptr< const T > pUnique, const TKEY &key)
Record a const object with a key.
StoreGateSvc(const StoreGateSvc &)
StatusCode t2pRegister(const void *const pTrans, SG::DataProxy *const pPers)
forwarded to DataStore
virtual::IProxyDict * hiveProxyDict() override final
implements IHiveStore interface
static void setSlot(SG::HiveEventSlot *pSlot)
set the hive event slot pointer: used by the event loop mgrs
StatusCode overwrite(std::unique_ptr< T > pUnique, const TKEY &key, bool allowMods, bool noHist=false)
Record an object with a key, overwriting any existing object with same key.
StatusCode record(std::unique_ptr< T > pUnique, const TKEY &key)
Record an object with a key, take ownership of the unique_ptr obj.
Algorithm preparing auxiliary store objects for slimming.
PyObject * recordObjectToStore(StoreGateSvc *, PyObject *, PyObject *, bool, bool, bool)
record object to storegate
void py_sg_clearProxyPayload(StoreGateSvc *self, SG::DataProxy *)
=============================================================================
Forward declaration.
T * WPtr
Definition SGWPtr.h:15
STL namespace.
static const T * retrieve(StoreGateSvc *psg)
static const T * retrieve(StoreGateSvc *psg, const std::string &key)
BadListItem(CLID clid, const std::string &key, const std::string &algo)
#define private
Definition testRead.cxx:27