ATLAS Offline Software
StoreGateSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/IIncidentSvc.h"
9 
10 #include "StoreGate/StoreGateSvc.h"
12 #include "SGTools/DataStore.h"
13 
14 #include "Gaudi/Interfaces/IOptionsSvc.h"
15 #include "GaudiKernel/IAppMgrUI.h"
16 #include <fstream>
17 #include <algorithm>
18 
19 using namespace SG;
20 using namespace std;
21 
22 namespace {
23  thread_local HiveEventSlot* currentHiveEventSlot = nullptr;
24  thread_local StoreGateSvc* currentStoreGate = nullptr;
25 }
26 
28 StoreGateSvc::StoreGateSvc(const std::string& name,ISvcLocator* svc) :
29  Service(name,svc),
30  m_defaultStore(0),
31  m_pPPSHandle("ProxyProviderSvc", name),
32  m_incSvc("IncidentSvc", name),
33  m_storeID (StoreID::findStoreID(name)),
34  m_algContextSvc ("AlgContextSvc", name)
35 {
36 
37 
38  //our properties
39  //properties of SGImplSvc
40  declareProperty("Dump", m_DumpStore=false, "Dump contents at EndEvent");
41  declareProperty("ActivateHistory", m_ActivateHistory=false, "record DataObjects history");
42  declareProperty("DumpArena", m_DumpArena=false, "Dump Arena usage stats");
43  declareProperty("ProxyProviderSvc", m_pPPSHandle);
44  declareProperty("IncidentSvc", m_incSvc);
45 
46  //add handler for Service base class property
47  //FIXME m_outputLevel.declareUpdateHandler(&SGImplSvc::msg_update_handler, this);
48 }
49 
52 {}
53 
54 void
55 StoreGateSvc::setDefaultStore(SGImplSvc* pStore) {
56  if (m_defaultStore) m_defaultStore->release();
57  m_defaultStore = pStore;
58  if (m_defaultStore) m_defaultStore->addRef();
59 }
60 
61 void
63  currentHiveEventSlot=pSlot;
64  if ( 0 != currentHiveEventSlot) {
65  currentHiveEventSlot->pEvtStore->makeCurrent();
66  }
67 }
68 
70  if (!::currentStoreGate) {
71  // this is a static function so we don't have many conveniences
72  ISvcLocator *svcLocator = Gaudi::svcLocator();
73  SmartIF<StoreGateSvc> sg{svcLocator->service("StoreGateSvc/StoreGateSvc")};
74  if ( !sg.isValid() ) {
75  throw GaudiException(
76  "Could not get \"StoreGateSvc\" to initialize currentStoreGate",
77  "StoreGateSvc", StatusCode::FAILURE);
78  }
79  sg->makeCurrent();
80  return sg;
81  }
82  return ::currentStoreGate;
83 }
84 
87  return currentHiveEventSlot;
88 }
89 
91 
92 
93 void
95  _SGVOIDCALL(commitNewDataObjects, ());
96 }
97 
100 StoreGateSvc::recordAddress(const std::string& skey,
101  IOpaqueAddress* pAddress, bool clearAddressFlag) {
102  _SGXCALL(recordAddress, (skey, pAddress, clearAddressFlag), StatusCode::FAILURE);
103 }
105 StatusCode
106 StoreGateSvc::recordAddress(IOpaqueAddress* pAddress, bool clearAddressFlag) {
107  _SGXCALL(recordAddress, (pAddress, clearAddressFlag), StatusCode::FAILURE);
108 }
109 
110 
111 StatusCode
112 StoreGateSvc::setConst(const void* pObject) {
113  _SGXCALL(setConst, (pObject), StatusCode::FAILURE);
114 }
115 
116 
120 
121  // Initialize service:
123 
124  verbose() << "Initializing " << name() << endmsg;
125 
126  SmartIF<Gaudi::Interfaces::IOptionsSvc> pJOSvc{serviceLocator()->service("JobOptionsSvc")};
127  if ( !pJOSvc.isValid() ) {
128  error() << "Failed to retrieve JobOptionsSvc" << endmsg;
129  }
130  //copy our properties to the prototype (default) SGImplSvc
131  const std::string implStoreName = name() + "_Impl";
132  for (const Gaudi::Details::PropertyBase* p : getProperties()) {
133  pJOSvc->set( implStoreName + "." + p->name(), p->toString() );
134  }
135 
136  //HACK ALERT: using createService rather then the customary service(...,CREATEIF=true) we set our pointer
137  // to SGImplSvc early (even before it is initialized). This should help take care of some initialize loops
138  // for example when we try to record an address from one of the address providers initialize methods
139 
140  std::string implStoreFullName = "SGImplSvc/" + implStoreName;
141  debug() << "trying to create store " << implStoreFullName << endmsg;
142 
143  ISvcManager* pSM(dynamic_cast<ISvcManager*>(&*serviceLocator()));
144  if (!pSM) std::abort();
145  m_defaultStore = dynamic_cast<SGImplSvc*>( (pSM->createService(implStoreFullName)).get() );
146 
147  if (!m_defaultStore) {
148  error() << "Could not create store " << implStoreFullName << endmsg;
149  return StatusCode::FAILURE;
150  }
151 
152  if ( m_defaultStore->sysInitialize().isSuccess() ) {
153  // createService returns to us a reference to the service; we shouldn't
154  // increment it again.
155  //m_defaultStore->addRef();
156 
157  // If this is the default event store (StoreGateSvc), then declare
158  // our arena as the default for memory allocations.
159  if (name() == "StoreGateSvc") {
160  m_defaultStore->makeCurrent();
161  }
162  } else {
163  error() << "Could not initialize default store " << implStoreFullName
164  << endmsg;
165  return StatusCode::FAILURE;
166  }
167  if ( !m_incSvc.retrieve().isSuccess() ) {
168  error() << "Could not locate IncidentSvc" << endmsg;
169  return StatusCode::FAILURE;
170  }
171 
172  // Don't retrieve m_activeStoreSvc here to prevent a possible
173  // initialization loop.
174 
175  const int PRIORITY=100;
176  m_incSvc->addListener(this, "EndEvent",PRIORITY);
177  m_incSvc->addListener(this, "BeginEvent", PRIORITY);
178 
179  return StatusCode::SUCCESS;
180 }
181 
184  verbose() << "Stop " << name() << endmsg;
185  //HACK ALERT: ID event store objects refer to det store objects
186  //by setting an ad-hoc priority for event store(s) we make sure they are finalized and hence cleared first
187  // see e.g. https://savannah.cern.ch/bugs/index.php?99993
188  if (m_defaultStore->store()->storeID() == StoreID::EVENT_STORE) {
189  ISvcManager* pISM(dynamic_cast<ISvcManager*>(serviceLocator().get()));
190  if (!pISM)
191  return StatusCode::FAILURE;
192  pISM->setPriority(name(), pISM->getPriority(name())+1).ignore();
193  verbose() << "stop: setting service priority to " << pISM->getPriority(name())
194  << " so that event stores get finalized and cleared before other stores" <<endmsg;
195  }
196  return StatusCode::SUCCESS;
197 }
198 
199 void StoreGateSvc::handle(const Incident &inc) {
200  currentStore()->handle(inc);
201 }
202 
204 
208  verbose() << "Finalizing " << name() << endmsg;
209  if (m_defaultStore) {
210  // m_defaultStore is not active, so ServiceManager won't finalize it!
211  CHECK( m_defaultStore->finalize());
212  m_defaultStore->release();
213  }
214 
215  printBadList (m_badRetrieves, "retrieve()");
216  printBadList (m_badRecords, "record()");
217  return StatusCode::SUCCESS;
218 }
219 
220 
222 DataProxy*
223 StoreGateSvc::proxy(const void* const pTransient) const {
224  _SGXCALL(proxy, (pTransient), 0);
225 }
226 
228 DataProxy*
229 StoreGateSvc::proxy(const CLID& id) const {
230  _SGXCALL(proxy, (id), 0);
231 }
232 
234 DataProxy*
235 StoreGateSvc::proxy(const CLID& id, const std::string& key) const {
236  _SGXCALL(proxy, (id, key), 0);
237 }
238 
239 
243 StoreGateSvc::proxy(const CLID& id, bool checkValid) const {
244  _SGXCALL(proxy, (id, checkValid), 0);
245 }
246 
250 StoreGateSvc::proxy(const CLID& id, const std::string& key, bool checkValid) const {
251  _SGXCALL(proxy, (id, key, checkValid), 0);
252 }
253 
254 
261 {
262  _SGXCALL(addToStore, (id, proxy), StatusCode::FAILURE);
263 }
264 
265 
288  const std::string& key,
289  bool allowMods,
290  bool returnExisting)
291 {
292  _SGXCALL(recordObject, (std::move(obj), key, allowMods, returnExisting), nullptr);
293 }
294 
295 
297 vector<const SG::DataProxy*>
299  vector<const SG::DataProxy*> nullV;
300  _SGXCALL(proxies, (), nullV);
301 }
302 
304 vector<CLID>
306 {
307  vector<CLID> nullV;
308  _SGXCALL(clids, (), nullV);
309 }
310 
314 StoreGateSvc::transientProxy(const CLID& id, const std::string& key) const {
315  _SGXCALL(transientProxy, (id, key), 0);
316 }
317 
318 
320 DataObject*
321 StoreGateSvc::accessData(const CLID& id) const {
322  _SGXCALL(accessData, (id), 0);
323 }
324 
326 DataObject*
327 StoreGateSvc::accessData(const CLID& id, const std::string& key) const {
328  _SGXCALL(accessData, (id, key), 0);
329 }
330 
331 bool
333  const std::string& keyA, const std::string& keyB ) {
334  _SGXCALL(transientSwap, (id, keyA, keyB), false);
335 }
336 
339 StatusCode
340 StoreGateSvc::typeless_record( DataObject* obj, const std::string& key,
341  const void* const raw_ptr,
342  bool allowMods, bool resetOnly,
343  bool noHist ) {
344  _SGXCALL(typeless_record, (obj, key, raw_ptr, allowMods, resetOnly, noHist), StatusCode::FAILURE);
345 }
347 StatusCode
349  DataObject* obj, const std::string& key,
350  const void* const raw_ptr,
351  bool allowMods,
352  bool noHist,
353  const std::type_info* tinfo) {
354  _SGXCALL(typeless_overwrite, (id, obj, key, raw_ptr, allowMods, noHist, tinfo), StatusCode::FAILURE);
355 }
356 
358 void
360 {
361  m_storeID = id;
362  // FIXME: should broadcast this to all instances.
363  _SGVOIDCALL(setStoreID,(id));
364 }
365 
366 void
367 StoreGateSvc::keys(const CLID& id, std::vector<std::string>& vkeys,
368  bool includeAlias, bool onlyValid) const
369 {
370  _SGVOIDCALL(keys,(id, vkeys, includeAlias, onlyValid));
371 }
372 
373 
374 
375 std::string
377  std::string nullS = "\n>>>>>>>NO CURRENT STORE<<<<<<<\n";
378  _SGXCALL(dump, (), nullS);
379 }
380 
381 int
382 StoreGateSvc::typeCount(const CLID& clid) const{
383  _SGXCALL(typeCount, (clid), -1);
384 }
385 
386 
387 
388 typename StoreGateSvc::sgkey_t
389 StoreGateSvc::stringToKey (const std::string& str, CLID clid) {
390  _SGXCALL( stringToKey, (str, clid), 0 );
391 }
392 
393 const std::string*
395  _SGXCALL( keyToString, (key), 0 );
396 }
397 
398 const std::string*
399 StoreGateSvc::keyToString (sgkey_t key, CLID& clid) const {
400  _SGXCALL( keyToString, (key, clid), 0 );
401 }
402 
403 void
405  const std::string& str,
406  CLID clidid) {
407  _SGVOIDCALL( registerKey, (key, str, clidid) );
408 }
409 void
411  sgkey_t target,
412  off_t index_offset) {
413  _SGVOIDCALL( remap_impl, (source, target, index_offset) );
414 }
415 
416 bool
417 StoreGateSvc::tryELRemap (sgkey_t sgkey_in, size_t index_in,
418  sgkey_t& sgkey_out, size_t& index_out) {
419  _SGXCALL( tryELRemap, (sgkey_in, index_in, sgkey_out, index_out), false );
420 }
421 
422 StatusCode
425  SG::ConstProxyIterator& end) const {
426  _SGXCALL( proxyRange, (id, beg, end), StatusCode::FAILURE );
427 }
428 
429 
430 void
431 StoreGateSvc::releaseObject(const CLID& id, const std::string& key) {
432  _SGVOIDCALL( releaseObject, (id, key) );
433 }
434 
435 void
437  _SGVOIDCALL( clearProxyPayload, (proxy) );
438 }
439 
440 
441 StatusCode
443  this->makeCurrent();
444  _SGXCALL(loadEventProxies, (), StatusCode::FAILURE);
445 }
446 
448 // clear store
449 StatusCode
450 StoreGateSvc::clearStore(bool forceRemove)
451 {
452  StatusCode sc = currentStore()->clearStore(forceRemove);
453 
454  // Send a notification that the store was cleared.
455  if (sc.isSuccess()) {
456  m_incSvc->fireIncident(StoreClearedIncident (this, name()));
457  }
458  return sc;
459 }
460 
461 void
463  _SGVOIDCALL( emptyTrash, () );
464 }
465 
466 const InterfaceID&
468  static const InterfaceID IDStoreGateSvc("StoreGateSvc", 1, 0);
469  return IDStoreGateSvc;
470 }
471 StatusCode StoreGateSvc::queryInterface(const InterfaceID& riid, void** ppvInterface)
472 {
473  if ( interfaceID().versionMatch(riid) ) {
474  *ppvInterface = (StoreGateSvc*)this;
475  }
476  else if ( IProxyDict::interfaceID().versionMatch(riid) ) {
477  *ppvInterface = (IProxyDict*)this;
478  }
479  else if ( IHiveStore::interfaceID().versionMatch(riid) ) {
480  *ppvInterface = (IHiveStore*)this;
481  }
482  else if ( IHiveStoreMgr::interfaceID().versionMatch(riid) ) {
483  *ppvInterface = (IHiveStoreMgr*)this;
484  }
485  else {
486  // Interface is not directly available: try out a base class
487  return Service::queryInterface(riid, ppvInterface);
488  }
489  addRef();
490  return StatusCode::SUCCESS;
491 }
492 
497  ::currentStoreGate = this;
498  _SGVOIDCALL (makeCurrent, ());
499 }
500 
502  bool forceRemove) {
503  _SGXCALL(removeProxy, (proxy, pTrans, forceRemove), StatusCode::FAILURE);
504 }
505 
506 
518 StoreGateSvc::createObj (IConverter* cvt,
519  IOpaqueAddress* addr,
520  DataObject*& refpObject)
521 {
522  _SGXCALL( createObj, (cvt, addr, refpObject), StatusCode::FAILURE );
523 }
524 
525 
533  CLID clid, const std::string& key) const
534 {
535  if (m_storeID == StoreID::EVENT_STORE && currentHiveEventSlot != nullptr) {
536  lock_t lock (m_badMutex);
537  std::string algo;
538  if (m_algContextSvc.isValid()) {
539  if (IAlgorithm* alg = m_algContextSvc->currentAlg()) {
540  if (alg->type() == "AthenaOutputStream") return;
541  if (alg->type() == "AthIncFirerAlg") return;
542  algo = alg->type() + "/" + alg->name();
543  bad.insert (BadListItem (clid, key, algo));
544  }
545  }
546  }
547 }
548 
549 
556  const std::string& what) const
557 {
558  if (bad.empty()) return;
559  std::vector<std::string> lines;
560  for (const BadListItem& id : bad) {
561  lines.push_back (id.fullKey() + " [" + id.m_algo + "]");
562  }
563  std::sort (lines.begin(), lines.end());
564  warning() << "Called " << what << " on these objects in a MT store" << endmsg;
565  for (const std::string& s : lines) {
566  warning() << s << endmsg;
567  }
568 }
569 
570 
572 {
573  std::cout << sg->dump() << "\n";
574 }
575 
576 void SG_dump (StoreGateSvc* sg, const char* fname)
577 {
578  std::ofstream f (fname);
579  f << sg->dump() << "\n";
580  f.close();
581 }
582 
StoreGateSvc::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: StoreGateSvc.cxx:332
bad
@ bad
Definition: SUSYToolsTester.cxx:100
SG::HiveEventSlot
Definition: SGHiveEventSlot.h:19
StoreGateSvc::typeCount
int typeCount() const
Return the number of instances of an object of type T int i = p_store->typeCount<T>(); Note that th...
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
StoreGateSvc::setSlot
static void setSlot(SG::HiveEventSlot *pSlot)
set the hive event slot pointer: used by the event loop mgrs
Definition: StoreGateSvc.cxx:62
StoreGateSvc::clearProxyPayload
void clearProxyPayload(SG::DataProxy *)
use to reset a proxy (clearing the data object it contains) Unlike DataProxy::reset this method corre...
Definition: StoreGateSvc.cxx:436
SGout2dot.alg
alg
Definition: SGout2dot.py:243
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
StoreGateSvc::interfaceID
static const InterfaceID & interfaceID()
Should rather be in IStoreGateSvc.h if we had one.
Definition: StoreGateSvc.cxx:467
SG_dump
void SG_dump(StoreGateSvc *sg)
These are intended to be easy to call from the debugger.
Definition: StoreGateSvc.cxx:571
StoreGateSvc::stop
virtual StatusCode stop() override
Service start.
Definition: StoreGateSvc.cxx:183
StoreGateSvc::handle
virtual void handle(const Incident &) override final
Definition: StoreGateSvc.cxx:199
initialize
void initialize()
Definition: run_EoverP.cxx:894
DataStore.h
StoreGateSvc::makeCurrent
void makeCurrent()
The current store is becoming the active store.
Definition: StoreGateSvc.cxx:496
StoreGateSvc::~StoreGateSvc
virtual ~StoreGateSvc() override
Standard Destructor.
Definition: StoreGateSvc.cxx:51
StoreGateSvc::m_ActivateHistory
bool m_ActivateHistory
property: activate the history service
Definition: StoreGateSvc.h:921
StoreGateSvc::m_DumpStore
bool m_DumpStore
property Dump: triggers dump() at EndEvent
Definition: StoreGateSvc.h:920
StoreGateSvc::printBadList
void printBadList(const BadItemList &bad, const std::string &what) const
Print out a list of bad calls during finalization.
Definition: StoreGateSvc.cxx:555
StoreGateSvc::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: StoreGateSvc.cxx:348
StoreGateSvc::commitNewDataObjects
virtual void commitNewDataObjects() override final
Reset handles added since the last call to commit.
Definition: StoreGateSvc.cxx:94
StoreGateSvc::m_pPPSHandle
ServiceHandle< IProxyProviderSvc > m_pPPSHandle
property
Definition: StoreGateSvc.h:810
StoreGateSvc::keys
void keys(std::vector< std::string > &vkeys, bool includeAlias=false, bool onlyValid=true) const
provide list of all StoreGate keys associated with an object.
IStringPool::sgkey_t
SG::sgkey_t sgkey_t
Type of the keys.
Definition: IStringPool.h:34
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
StoreGateSvc::removeProxy
StatusCode removeProxy(SG::DataProxy *proxy, const void *pTrans, bool forceRemove=false)
remove proxy from store, unless it is reset only.
Definition: StoreGateSvc.cxx:501
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
StoreGateSvc::remap_impl
void remap_impl(sgkey_t source, sgkey_t target, off_t index_offset)
Declare a remapping.
Definition: StoreGateSvc.cxx:410
run_Egamma1_LArStrip_Fex.dump
dump
Definition: run_Egamma1_LArStrip_Fex.py:88
StoreGateSvc::proxyRange
StatusCode proxyRange(const CLID &id, SG::ConstProxyIterator &beg, SG::ConstProxyIterator &end) const
return a range to all proxies of a given CLID
Definition: StoreGateSvc.cxx:423
StoreGateSvc::emptyTrash
void emptyTrash()
throw away bad objects
Definition: StoreGateSvc.cxx:462
StoreGateSvc::m_DumpArena
bool m_DumpArena
DumpArena Property flag : trigger m_arena->report() at clearStore.
Definition: StoreGateSvc.h:922
StoreGateSvc::finalize
virtual StatusCode finalize() override
Definition: StoreGateSvc.cxx:206
ArenaHeader.h
Proxy for a group of Arenas. See Arena.h for an overview of the arena-based memory allocators.
StoreGateSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface) override
Definition: StoreGateSvc.cxx:471
StoreGateSvc::releaseObject
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
Definition: StoreGateSvc.cxx:431
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
StoreGateSvc::initialize
virtual StatusCode initialize() override
Service initialization.
Definition: StoreGateSvc.cxx:119
StoreGateSvc::dump
std::string dump() const
dump objects in store.
Definition: StoreGateSvc.cxx:376
CaloCondBlobAlgs_fillNoiseFromASCII.lines
lines
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:104
StoreGateSvc::BadItemList
std::unordered_set< BadListItem, DataObjID_Hasher > BadItemList
Definition: StoreGateSvc.h:939
StoreGateSvc::sgkey_t
IStringPool::sgkey_t sgkey_t
Definition: StoreGateSvc.h:646
StoreGateSvc::m_incSvc
ServiceHandle< IIncidentSvc > m_incSvc
property
Definition: StoreGateSvc.h:811
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SGImplSvc.h
StoreGateSvc::currentStoreGate
static StoreGateSvc * currentStoreGate()
get current StoreGate
Definition: StoreGateSvc.cxx:69
StoreGateSvc::setDefaultStore
void setDefaultStore(SGImplSvc *pStore)
set pointer to default event store: used by ActiveStoreSvc
Definition: StoreGateSvc.cxx:55
StoreGateSvc::keyToString
virtual const std::string * keyToString(sgkey_t key) const override final
Find the string corresponding to a given key.
StoreGateSvc::loadEventProxies
StatusCode loadEventProxies()
load proxies at begin event
Definition: StoreGateSvc.cxx:442
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
StoreID
defines an enum used by address providers to decide what kind of StoreGateSvc they are providing addr...
Definition: StoreID.h:18
hist_file_dump.f
f
Definition: hist_file_dump.py:135
StoreGateSvc::clearStore
virtual StatusCode clearStore(bool forceRemove=false) override final
clear DataStore contents: called by the event loop mgrs
Definition: StoreGateSvc.cxx:450
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
StoreGateSvc::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: StoreGateSvc.cxx:404
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::HiveEventSlot::pEvtStore
SGImplSvc * pEvtStore
Definition: SGHiveEventSlot.h:23
StoreGateSvc::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: StoreGateSvc.cxx:340
StoreGateSvc::stringToKey
virtual sgkey_t stringToKey(const std::string &str, CLID clid) override final
Find the key for a string/CLID pair.
Definition: StoreGateSvc.cxx:389
StoreGateSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: StoreGateSvc.cxx:305
StoreGateSvc::createObj
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject) override
Call converter to create an object, with locking.
Definition: StoreGateSvc.cxx:518
StoreGateSvc::rememberBad
void rememberBad(BadItemList &bad, CLID clid, const std::string &key) const
Remember that retrieve or record was called for a MT store.
Definition: StoreGateSvc.cxx:532
python.ExitCodes.what
def what(code)
Definition: ExitCodes.py:73
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
StoreGateSvc::proxy
virtual SG::DataProxy * proxy(const void *const pTransient) const override final
get proxy for a given data object address in memory
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
StoreGateSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: StoreGateSvc.h:949
errorcheck.h
Helpers for checking error return status codes and reporting errors.
StoreGateSvc::setConst
StatusCode setConst(const void *pointer)
prevent downstream clients from modifying the pointed-at dobj
Definition: StoreGateSvc.cxx:112
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
IHiveStoreMgr
the interface through which HiveWB control StoreGate instances
Definition: IHiveStoreMgr.h:24
StoreClearedIncident.h
Incident sent after a store is cleared.
StoreGateSvc::recordAddress
StatusCode recordAddress(const std::string &skey, IOpaqueAddress *pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
StoreGateSvc::accessData
DataObject * accessData(const CLID &id) const
find proxy and access its data. Returns 0 to flag failure
Definition: StoreGateSvc.cxx:321
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
StoreGateSvc::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: StoreGateSvc.cxx:287
StoreGateSvc::proxies
virtual std::vector< const SG::DataProxy * > proxies() const override final
return the list of all current proxies in store
Definition: StoreGateSvc.cxx:298
StoreGateSvc::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: StoreGateSvc.cxx:417
hydjet.StoreGateSvc
StoreGateSvc
Definition: hydjet.minbias.pbpb5520.r12345.job.py:40
StoreID::type
type
Definition: StoreID.h:24
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
copySelective.target
string target
Definition: copySelective.py:37
StoreGateSvc::setStoreID
void setStoreID(StoreID::type id)
set store ID. request forwarded to DataStore:
Definition: StoreGateSvc.cxx:359
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
copySelective.source
string source
Definition: copySelective.py:32
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
StoreGateSvc::transientProxy
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
Definition: StoreGateSvc.cxx:314
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:45
StoreGateSvc::addToStore
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
Definition: StoreGateSvc.cxx:260
get_generator_info.error
error
Definition: get_generator_info.py:40
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:45
StoreGateSvc.h
IHiveStore
the interface that provides access to the current hive store
Definition: IHiveStore.h:23
StoreGateSvc::BadListItem
Definition: StoreGateSvc.h:932
StoreGateSvc::StoreGateSvc
StoreGateSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: StoreGateSvc.cxx:28
StoreGateSvc::currentSlot
static SG::HiveEventSlot * currentSlot()
Definition: StoreGateSvc.cxx:86
SG::ConstProxyIterator
ProxyMap::const_iterator ConstProxyIterator
Definition: ProxyMap.h:28
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
StoreClearedIncident
Incident sent after a store is cleared.
Definition: StoreClearedIncident.h:30