ATLAS Offline Software
SGImplSvc.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 <algorithm>
6 #include <cassert>
7 #include <iostream>
8 #include <functional>
9 #include <string>
10 #include <unordered_map>
11 
12 #include <sstream>
13 #include <fstream>
14 #include <iomanip>
15 
20 #include "AthenaKernel/IIOVSvc.h"
23 #include "AthenaKernel/StoreID.h"
24 #include "GaudiKernel/IClassIDSvc.h"
25 #include "GaudiKernel/IHistorySvc.h"
26 #include "GaudiKernel/ISvcLocator.h"
27 #include "GaudiKernel/IConversionSvc.h"
28 #include "GaudiKernel/Incident.h"
29 #include "GaudiKernel/IOpaqueAddress.h"
30 #include "GaudiKernel/MsgStream.h"
31 #include "GaudiKernel/StatusCode.h"
32 #include "GaudiKernel/DataHistory.h"
35 #include "SGTools/DataProxy.h"
36 #include "SGTools/DataStore.h"
37 #include "SGTools/StringPool.h"
39 #include "SGTools/SGVersionedKey.h"
44 
45 // StoreGateSvc. must come before SGImplSvc.h
46 #include "StoreGate/StoreGateSvc.h"
48 #include "SGTools/DataStore.h"
49 
50 using std::ostringstream;
51 using std::setw;
52 using std::hex;
53 using std::dec;
54 using std::endl;
55 using std::ends;
56 using std::pair;
57 using std::string;
58 using std::vector;
59 
60 using SG::DataProxy;
61 using SG::DataStore;
63 
65 // Remapping implementation.
66 
67 
68 namespace SG {
69 
70 
71  struct RemapImpl
72  {
74 
75  struct remap_t {
77  off_t index_offset;
78  };
81  };
82 
83 
84 } // namespace SG
85 
86 
89 SGImplSvc::SGImplSvc(const string& name,ISvcLocator* svc)
90  : Service(name, svc), m_pCLIDSvc(0), m_pDataLoader(0),
91  m_pPPSHandle("ProxyProviderSvc", name),
92  m_pPPS(nullptr),
93  m_pHistorySvc(0), m_pStore(new DataStore(*this)),
94  m_pIncSvc("IncidentSvc", name),
95  m_DumpStore(false),
96  m_ActivateHistory(false),
97  m_DumpArena(false),
98  m_pIOVSvc(0),
99  m_storeLoaded(false),
100  m_remap_impl (new SG::RemapImpl),
101  m_arena (name),
102  m_slotNumber(-1),
103  m_numSlots(1)
104 {
105  //our properties
106  declareProperty("ProxyProviderSvc", m_pPPSHandle);
107  declareProperty("Dump", m_DumpStore);
108  declareProperty("ActivateHistory", m_ActivateHistory);
109  declareProperty("DumpArena", m_DumpArena);
110  //StoreGateSvc properties
111  declareProperty("IncidentSvc", m_pIncSvc);
112  //add handler for Service base class property
113  m_outputLevel.declareUpdateHandler(&SGImplSvc::msg_update_handler, this);
114 
116  header->addArena (&m_arena);
117 }
118 
119 
123  header->delArena (&m_arena);
124 
125  delete m_pStore;
126  delete m_remap_impl;
127 }
128 
132 
133  verbose() << "Initializing " << name() << endmsg;
134 
136 
137  if (!m_pStore)
138  m_pStore = new DataStore (*this);
139  if (!m_remap_impl)
141 
142  //properties accessible from now on
143 
145  // If this is the default event store (StoreGateSvc), then declare
146  // our arena as the default for memory allocations.
147  if (this->storeID() == StoreID::EVENT_STORE) {
150  }
151  // set up the incident service:
152  if (!(m_pIncSvc.retrieve()).isSuccess()) {
153  error() << "Could not locate IncidentSvc "
154  << endmsg;
155  return StatusCode::FAILURE;
156  }
157 
158  //start listening to "EndEvent"
159  // const int PRIORITY = 100;
160  // Mother svc should register these incidents
161  // m_pIncSvc->addListener(this, "EndEvent", PRIORITY);
162  // m_pIncSvc->addListener(this, "BeginEvent", PRIORITY);
163 
164  const bool CREATEIF(true);
165  // cache pointer to Persistency Service
166  if (!(service("EventPersistencySvc", m_pDataLoader, CREATEIF)).isSuccess()) {
167  m_pDataLoader = 0;
168  error() << "Could not get pointer to Persistency Service"
169  << endmsg;
170  return StatusCode::FAILURE;
171  }
172 
173  if (!(service("ClassIDSvc", m_pCLIDSvc, CREATEIF)).isSuccess()) {
174  error() << "Could not get pointer to ClassID Service"
175  << endmsg;
176  return StatusCode::FAILURE;
177  }
178 
179  if (!m_pPPSHandle.empty()) {
180  CHECK( m_pPPSHandle.retrieve() );
181  m_pPPS = &*m_pPPSHandle;
182  }
183 
184  if ( m_pPPS && (m_pPPS->preLoadProxies(*m_pStore)).isFailure() )
185  {
186  SG_MSG_DEBUG(" Failed to preLoad proxies");
187  return StatusCode::FAILURE;
188  }
189 
190  // Get hold of History Service
191  if (m_ActivateHistory &&
192  !(service("HistorySvc", m_pHistorySvc, CREATEIF)).isSuccess()) {
193  error() << "Could not locate History Service"
194  << endmsg;
195  return StatusCode::FAILURE;
196  }
197 
198  return StatusCode::SUCCESS;
199 }
202 
203  verbose() << "Start " << name() << endmsg;
204  /*
205  // This will need regFcn clients to be updated first.
206  if ( 0 == m_pPPS || (m_pPPS->preLoadProxies(*m_pStore)).isFailure() ) {
207  debug() << " Failed to preLoad proxies"
208  << endmsg;
209  return StatusCode::FAILURE;
210  }
211  */
212 
213  return StatusCode::SUCCESS;
214 }
217 
218  verbose() << "Stop " << name() << endmsg;
219  //HACK ALERT: ID event store objects refer to det store objects
220  //by setting an ad-hoc priority for event store(s) we make sure they are finalized and hence cleared first
221  // see e.g. https://savannah.cern.ch/bugs/index.php?99993
222  if (store()->storeID() == StoreID::EVENT_STORE) {
223  ISvcManager* pISM(dynamic_cast<ISvcManager*>(serviceLocator().get()));
224  if (!pISM)
225  return StatusCode::FAILURE;
226  pISM->setPriority(name(), pISM->getPriority(name())+1).ignore();
227  verbose() << "stop: setting service priority to " << pISM->getPriority(name())
228  << " so that event stores get finalized and cleared before other stores" <<endmsg;
229  }
230  return StatusCode::SUCCESS;
231 }
232 
235  // Get hold of the IOVSvc
236  if (0 == m_pIOVSvc && !(service("IOVSvc", m_pIOVSvc)).isSuccess()) {
237  warning() << "Could not locate IOVSvc "
238  << endmsg;
239  }
240  return m_pIOVSvc;
241 }
242 
244 void SGImplSvc::handle(const Incident &inc) {
245 
246  if (inc.type() == "EndEvent") {
247  if (m_DumpStore) {
248  SG_MSG_DEBUG("Dumping StoreGate Contents");
249  info() << '\n' << dump() << endl
250  << endmsg;
251  }
252  }
253 }
254 
256  lock_t lock (m_mutex);
257  StatusCode sc(StatusCode::SUCCESS);
258  //FIXME this should probably be dealt with by the providers
259  if (0 != m_pPPS && !m_storeLoaded) {
260  m_storeLoaded = true;
262  }
263  return sc;
264 }
265 
267 // Create a key for a type (used if the client has not specified a key)
268 string SGImplSvc::createKey(const CLID& id)
269 {
270  ostringstream o;
271  o << m_pStore->typeCount(id)+1 << std::ends;
272  string ret(o.str());
273  return ret;
274 }
276 // clear store
278 {
279  {
280  if (m_DumpArena) {
281  std::ostringstream s;
282  m_arena.report(s);
283  info() << "Report for Arena: " << m_arena.name() << '\n'
284  << s.str() << endmsg;
285  }
286  }
287  {
288  lock_t lock (m_mutex);
289  emptyTrash();
290  for (auto& p : m_newBoundHandles)
291  p.second.clear();
292  assert(m_pStore);
293  debug() << "Clearing store with forceRemove="
294  << forceRemove << endmsg;
295  bool hard_reset = (m_numSlots > 1);
296  m_pStore->clearStore(forceRemove, hard_reset, &msgStream(MSG::DEBUG));
297  m_storeLoaded=false; //FIXME hack needed by loadEventProxies
298  }
299  {
300  lock_t remap_lock (m_remapMutex);
301  m_remap_impl->m_remaps.clear();
302  m_arena.reset();
303  }
304 
305  return StatusCode::SUCCESS;
306 }
310  verbose() << "Finalizing " << name() << endmsg ;
311 
312  // Incident service may not work in finalize.
313  // Clear this, so that we won't try to send an incident from clearStore.
314  (m_pIncSvc.release()).ignore();
315 
316  const bool FORCEREMOVE(true);
317  clearStore(FORCEREMOVE).ignore();
318 
319  //protect against double release
320  if (m_pHistorySvc) {
321  m_pHistorySvc->release();
322  m_pHistorySvc = 0;
323  }
324 
326  delete m_pStore;
327  m_pStore = nullptr;
328  delete m_remap_impl;
329  m_remap_impl = 0;
330  m_arena.erase();
331 
332  return Service::finalize();
333 }
337  verbose() << "Reinitializing " << name() << endmsg ;
338  const bool FORCEREMOVE(true);
339  clearStore(FORCEREMOVE).ignore();
340  //not in v20r2p2! return Service::reinitialize();
341  return StatusCode::SUCCESS;
342 }
343 
344 const InterfaceID&
346  static const InterfaceID IID("SGImplSvc", 1, 0);
347  return IID;
348 }
349 
350 // Query the interfaces.
351 // Input: riid, Requested interface ID
352 // ppvInterface, Pointer to requested interface
353 // Return: StatusCode indicating SUCCESS or FAILURE.
354 // N.B. Don't forget to release the interface after use!!!
355 StatusCode SGImplSvc::queryInterface(const InterfaceID& riid, void** ppvInterface)
356 {
357  if ( IProxyDict::interfaceID().versionMatch(riid) ) {
358  *ppvInterface = (IProxyDict*)this;
359  }
360  else if ( IProxyDict::interfaceID().versionMatch(riid) ) {
361  *ppvInterface = (IProxyDict*)this;
362  }
363  else if ( IHiveStoreMgr::interfaceID().versionMatch(riid) ) {
364  *ppvInterface = (IHiveStoreMgr*)this;
365  }
366  else if ( interfaceID().versionMatch(riid) ) {
367  // In principle this should be cast to ISGImplSvc*. However, there
368  // is an anomaly in that existing clients are using the concrete StoreGate
369  // interface instead of an abstract ISGImplSvc interface.
370  *ppvInterface = (SGImplSvc*)this;
371  } else {
372  // Interface is not directly available: try out a base class
373  return Service::queryInterface(riid, ppvInterface);
374  }
375  addRef();
376  return StatusCode::SUCCESS;
377 }
378 
381 // add proxy (with IOpaqueAddress that will later be retrieved from P)
383 StatusCode SGImplSvc::recordAddress(const std::string& skey,
384  IOpaqueAddress* pAddress,
385  bool clearAddressFlag)
386 {
387  lock_t lock (m_mutex);
388  assert(0 != pAddress);
389  CLID dataID = pAddress->clID();
390 
391  if (dataID == 0)
392  {
393  warning() << "recordAddress: Invalid Class ID found in IOpaqueAddress @"
394  << pAddress << ". IOA will not be recorded"
395  << endmsg;
396  return StatusCode::FAILURE;
397  }
398 
399  //do not overwrite a persistent object
400  if (m_pPPS) {
401  DataProxy* dp = m_pStore->proxy (dataID, skey);
402  if (!dp) {
403  dp = m_pPPS->retrieveProxy(dataID, skey, *m_pStore);
404  }
405  if (dp && dp->provider()) {
406  std::string clidTypeName;
407  m_pCLIDSvc->getTypeNameOfID(dataID, clidTypeName).ignore();
408  warning() << "recordAddress: failed for key="<< skey << ", type "
409  << clidTypeName
410  << " (CLID " << dataID << ')'
411  << "\n there is already a persistent version of this object. Will not record a duplicate! "
412  << endmsg;
413  return StatusCode::FAILURE;
414  }
415  }
416 
417  // Check if a key already exists
418  DataProxy* dp = m_pStore->proxy_exact(dataID, skey);
419  if (0 == dp && 0 != m_pPPS) {
420  dp = m_pPPS->retrieveProxy(dataID, skey, *m_pStore);
421  }
422 
423  // Now treat the various cases:
424  if (0 == dp)
425  {
426  // create the proxy object and register it
427  dp = new DataProxy (TransientAddress (dataID, skey,
428  pAddress, clearAddressFlag),
429  m_pDataLoader, true, true);
430  m_pStore->addToStore(dataID, dp).ignore();
431 
432  addAutoSymLinks (skey, dataID, dp, 0, false);
433  }
434  else if ((0 != dp) && (0 == dp->address()))
435  // Note: intentionally not checking dp->isValidAddress()
436  {
437  // Update proxy with IOpaqueAddress
438  dp->setAddress(pAddress);
439  }
440  else
441  {
442  string errType;
443  m_pCLIDSvc->getTypeNameOfID(dataID, errType).ignore();
444  warning() << "recordAddress: preexisting proxy @" << dp
445  << " with non-NULL IOA found for key "
446  << skey << " type " << errType << " (" << dataID << "). \n"
447  << "Cannot record IOpaqueAddress @" << pAddress
448  << endmsg;
449  return StatusCode::FAILURE;
450  }
451 
452  return StatusCode::SUCCESS;
453 
454 }
455 
458 // add proxy (with IOpaqueAddress that will later be retrieved from P)
460 StatusCode SGImplSvc::recordAddress(IOpaqueAddress* pAddress, bool clearAddressFlag)
461 {
462  lock_t lock (m_mutex);
463  assert(0 != pAddress);
464 
465  CLID dataID = pAddress->clID();
466 
467  string gK = (pAddress->par())[1]; // transient name by convention
468  if (gK.empty()) gK = (pAddress->par())[0]; // FIXME backward compatibility
469  if (gK.empty()) gK = createKey(dataID);
470 
471  return this->recordAddress(gK, pAddress, clearAddressFlag);
472 }
473 
475  const string& gK,
476  DataObject* pDObj,
477  bool allowMods,
478  bool resetOnly) {
479  // locate the proxy
480  DataProxy* dp = m_pStore->proxy_exact(dataID, gK);
481 
482  if (0 != dp) { //proxy found
483  if (0 != dp->object())
484  {
485  // Case 0: duplicated proxy
486  warning() << " setupProxy:: error setting up proxy for key "
487  << gK << " and clid " << dataID
488  << "\n Pre-existing valid DataProxy @"<< dp
489  << " found in Store for key " << dp->object()->name()
490  << " with clid " << dp->object()->clID()
491  << endmsg;
492  recycle(pDObj); // commit this object to trash
493  dp = 0;
494  } else {
495  // Case 1: Proxy found... if not valid, update it:
496  dp->setObject(pDObj);
497  if (!allowMods) dp->setConst();
498  }
499  } else {
500  // Case 2: No Proxy found:
501  dp = new DataProxy(pDObj,
502  TransientAddress(dataID, gK),
503  !allowMods, resetOnly);
504  if (!(m_pStore->addToStore(dataID, dp).isSuccess())) {
505  warning() << " setupProxy:: could not addToStore proxy @" << dp
506  << endmsg;
507  recycle(pDObj); // commit this object to trash
508  delete dp;
509  dp = 0;
510  }
511  }
512  return dp;
513 }
514 
517 {
518  lock_t lock (m_mutex);
519  store()->setStoreID(id);
520 }
523 {
524  lock_t lock (m_mutex);
525  return store()->storeID();
526 }
527 
528 
529 void
530 SGImplSvc::keys(const CLID& id, std::vector<std::string>& vkeys,
531  bool includeAlias, bool onlyValid)
532 
533 {
534  lock_t lock (m_mutex);
535  return store()->keys(id, vkeys, includeAlias, onlyValid);
536 }
537 
538 
539 bool SGImplSvc::isSymLinked(const CLID& linkID, DataProxy* dp)
540 {
541  return (0 != dp) ? dp->transientID(linkID) : false;
542 }
543 
544 
545 StatusCode
547  const CallBackID& c2,
548  const IOVSvcCallBackFcn& fcn,
549  bool trigger)
550 {
551  lock_t lock (m_mutex);
552  return ( getIIOVSvc()->regFcn(c1,c2,fcn,trigger) );
553 }
554 
555 
556 StatusCode
557 SGImplSvc::regFcn( const std::string& toolName,
558  const CallBackID& c2,
559  const IOVSvcCallBackFcn& fcn,
560  bool trigger)
561 {
562  lock_t lock (m_mutex);
563  return ( getIIOVSvc()->regFcn(toolName,c2,fcn,trigger) );
564 }
565 
566 
568 // Dump Contents in store:
569 string SGImplSvc::dump() const
570 {
571  lock_t lock (m_mutex);
572  ostringstream ost;
573  ost << "<<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> \n";
574  ost << "SGImplSvc(" + name() + ")::dump():\n";
575 
576  DataStore::ConstStoreIterator s_iter, s_end;
577  store()->tRange(s_iter, s_end).ignore();
578 
579  for (; s_iter != s_end; ++s_iter)
580  {
581 
582  CLID id = s_iter->first;
583  int nProxy = store()->typeCount(id);
584  string tname;
585  m_pCLIDSvc->getTypeNameOfID(id, tname).ignore();
586  ost << "Found " << nProxy << ((nProxy == 1) ? " proxy" : " proxies")
587  << " for ClassID " << id <<" ("<< tname << "): \n";
588 
589  // loop over each type:
590  SG::ConstProxyIterator p_iter = (s_iter->second).begin();
591  SG::ConstProxyIterator p_end = (s_iter->second).end();
592 
593  while (p_iter != p_end) {
594  const DataProxy& dp(*p_iter->second);
595  // ost << " proxy@" << &dp;
596  ost << " flags: ("
597  << setw(7) << (dp.isValid() ? "valid" : "INVALID") << ", "
598  << setw(8) << (dp.isConst() ? "locked" : "UNLOCKED") << ", "
599  << setw(6) << (dp.isResetOnly() ? "reset" : "DELETE")
600  << ") --- data: " << hex << setw(10) << dp.object() << dec
601  << " --- key: " << p_iter->first << '\n';
602  ++p_iter;
603  }
604  }
605  ost << "<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> \n";
606  string ret(ost.str());
607  return ret;
608 
609 }
610 
611 DataStore*
613 {
614  return m_pStore;
615 }
616 
617 const DataStore*
619 {
620  return m_pStore;
621 }
622 
623 
625 // Make a soft link to the object with key
627 StatusCode SGImplSvc::symLink(const void* pObject, CLID linkID)
628 {
629  lock_t lock (m_mutex);
630  SG::DataProxy* dp(proxy(pObject));
631 
632  // if symLink already exists, just return success
633  return isSymLinked(linkID,dp) ?
634  StatusCode::SUCCESS :
635  addSymLink(linkID,dp);
636 }
637 
638 StatusCode SGImplSvc::symLink(const CLID id, const std::string& key, const CLID linkID)
639 {
640  lock_t lock (m_mutex);
641  SG::DataProxy* dp(proxy(id, key, false));
642  // if symLink already exists, just return success
643  return isSymLinked(linkID,dp) ?
644  StatusCode::SUCCESS :
645  addSymLink(linkID,dp);
646 }
647 
648 
651 {
652  if (0 == dp) {
653  warning() << "addSymLink: no target DataProxy found. Sorry, can't link to a non-existing data object"
654  << endmsg;
655  return StatusCode::FAILURE;
656  }
657  StatusCode sc = m_pStore->addSymLink(linkid, dp);
658 
659  // If the symlink is a derived->base conversion, then we may have
660  // a different transient pointer for the symlink.
661  if (sc.isSuccess() && dp->object()) {
662  void* baseptr = SG::DataProxy_cast (dp, linkid);
663  if (baseptr)
664  this->t2pRegister (baseptr, dp).ignore();
665  }
666  return sc;
667 }
668 
669 
670 StatusCode SGImplSvc::setAlias(const void* pObject, const std::string& aliasKey)
671 {
672  lock_t lock (m_mutex);
673 
674  SG::DataProxy* dp(0);
675  dp = proxy(pObject);
676  if (0 == dp) {
677  error() << "setAlias: problem setting alias "
678  << aliasKey << '\n'
679  << "DataObject does not exist, record before setting alias."
680  << endmsg;
681  return StatusCode::FAILURE;
682  }
683 
684  StatusCode sc = addAlias(aliasKey, dp);
685  if (sc.isFailure()) {
686  error() << "setAlias: problem setting alias "
687  << aliasKey << '\n'
688  << "DataObject does not exist, record before setting alias."
689  << endmsg;
690  return StatusCode::FAILURE;
691  }
692 
693  return StatusCode::SUCCESS;
694 }
695 
696 
698  const std::string& key, const std::string& aKey)
699 {
700  lock_t lock (m_mutex);
701 
702  SG::DataProxy* dp(0);
703  dp = proxy(clid, key);
704  if (0 == dp) {
705  error() << "setAlias: problem setting alias "
706  << std::string(aKey) << '\n'
707  << "DataObject does not exist, record before setting alias."
708  << endmsg;
709  return StatusCode::FAILURE;
710  }
711 
712  StatusCode sc = addAlias(aKey, dp);
713  if (sc.isFailure()) {
714  error() << "setAlias: problem setting alias "
715  << (std::string)aKey << '\n'
716  << "DataObject does not exist, record before setting alias."
717  << endmsg;
718  return StatusCode::FAILURE;
719  }
720 
721  return StatusCode::SUCCESS;
722 }
723 
724 StatusCode SGImplSvc::setAlias(SG::DataProxy* proxy, const std::string& aliasKey)
725 {
726  return addAlias( aliasKey, proxy );
727 }
728 
730 SGImplSvc::addAlias(const std::string& aliasKey, DataProxy* proxy)
731 {
732  if (0 == proxy) {
733  warning() << "addAlias: no target DataProxy given, Cannot alias to a non-existing object"
734  << endmsg;
735  return StatusCode::FAILURE;
736  }
737 
738  // add key to proxy and to ProxyStore
739  return m_pStore->addAlias(aliasKey, proxy);
740 }
741 
742 int SGImplSvc::typeCount(const CLID& id) const
743 {
744  lock_t lock (m_mutex);
745  return m_pStore->typeCount(id);
746 }
747 
748 
749 bool
750 SGImplSvc::contains(const CLID id, const std::string& key) const
751 {
752  try {
753  return (0 != proxy(id, key, true));
754  } catch(...) { return false; }
755 }
756 
757 
758 bool
759 SGImplSvc::transientContains(const CLID id, const std::string& key) const
760 {
761  try {
762  return (0 != transientProxy(id, key));
763  } catch(...) { return false; }
764 }
765 
766 
767 DataProxy*
768 SGImplSvc::proxy(const void* const pTransient) const
769 {
770  // No lock needed here --- the T2pmap held by DataStore has its own locking
771  // (and we were seeing contention here).
772  //lock_t lock (m_mutex);
773  return m_pStore->locatePersistent(pTransient);
774 }
775 
776 DataProxy*
777 SGImplSvc::proxy(const CLID& id) const
778 {
779  return proxy(id, false);
780 }
781 
782 DataProxy*
783 SGImplSvc::proxy(const CLID& id, bool checkValid) const
784 {
785  DataProxy* dp = nullptr;
786  {
787  lock_t lock (m_mutex);
788  dp = m_pStore->proxy(id);
789  if (0 == dp && 0 != m_pPPS) {
791  dp = m_pPPS->retrieveProxy(id, string("DEFAULT"), *pStore);
792  }
793  }
795  // Be sure to release the lock before this.
796  // isValid() may call back to the store, so we could otherwise deadlock..
797  if (checkValid && 0 != dp) {
798  // FIXME: For keyless retrieve, this checks only the first instance
799  // of the CLID in store. If that happens to be invalid, but the second
800  // is valid - this does not work (when checkValid is requested).
801  return dp->isValid() ? dp : 0;
802  }
803  return dp;
804 }
805 
806 DataProxy*
807 SGImplSvc::proxy(const CLID& id, const string& key) const
808 {
809  return proxy(id, key, false);
810 }
811 
812 DataProxy*
813 SGImplSvc::proxy(const CLID& id, const string& key, bool checkValid) const
814 {
815  DataProxy* dp = nullptr;
816  {
817  lock_t lock (m_mutex);
818  dp = m_pStore->proxy(id, key);
819  if (0 == dp && 0 != m_pPPS) {
821  dp = m_pPPS->retrieveProxy(id, key, *pStore);
822  }
823  }
824  // Be sure to release the lock before this.
825  // isValid() may call back to the store, so we could otherwise deadlock..
826  if (checkValid && 0 != dp && !(dp->isValid())) dp = 0;
827  return dp;
828 }
829 
830 
837 {
838  lock_t lock (m_mutex);
839  return m_pStore->addToStore (id, proxy);
840 }
841 
842 
864  const std::string& key,
865  bool allowMods,
866  bool returnExisting)
867 {
868  lock_t lock (m_mutex);
869  const void* raw_ptr = obj.get();
870  const std::type_info* tinfo = nullptr;
871 
872  if (DataBucketBase* bucket = dynamic_cast<DataBucketBase*> (obj.get())) {
873  raw_ptr = bucket->object();
874  tinfo = &bucket->tinfo();
875  }
876 
877  if (returnExisting) {
878  SG::DataProxy* proxy = this->proxy (obj->clID(), key);
879  if (proxy && proxy->isValid()) return proxy;
880 
881  // Look for the same object recorded under a different key/clid.
882  proxy = this->proxy (raw_ptr);
883  if (proxy && proxy->isValid()) {
884  if (proxy->transientID (obj->clID())) {
885  // CLID matches. Make an alias.
886  if (addAlias (key, proxy).isFailure()) {
887  CLID clid = proxy->clID();
888  std::string clidTypeName;
889  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
890  warning() << "SGImplSvc::recordObject: addAlias fails for object "
891  << clid << "[" << clidTypeName << "] " << proxy->name()
892  << " and new key " << key
893  << endmsg;
894 
895  proxy = nullptr;
896  }
897  }
898 
899  else if (key == proxy->name() ||
900  proxy->alias().count (key) > 0)
901  {
902  // key matches. Make a symlink.
903  if (addSymLink (obj->clID(), proxy).isFailure()) {
904  CLID clid = proxy->clID();
905  std::string clidTypeName;
906  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
907  CLID newclid = obj->clID();
908  std::string newclidTypeName;
909  m_pCLIDSvc->getTypeNameOfID(newclid, newclidTypeName).ignore();
910  error() << "SGImplSvc::recordObject: addSymLink fails for object "
911  << clid << "[" << clidTypeName << "] " << proxy->name()
912  << " and new clid " << newclid << "[" << newclidTypeName << "]"
913  << endmsg;
914  proxy = nullptr;
915  }
916  }
917 
918  else {
919  CLID clid = proxy->clID();
920  std::string clidTypeName;
921  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
922  CLID newclid = obj->clID();
923  std::string newclidTypeName;
924  m_pCLIDSvc->getTypeNameOfID(newclid, newclidTypeName).ignore();
925  error() << "SGImplSvc::recordObject: existing object found with "
926  << clid << "[" << clidTypeName << "] " << proxy->name()
927  << " but neither clid " << newclid << "[" << newclidTypeName << "]"
928  << " nor key " << key << " match."
929  << endmsg;
930  proxy = nullptr;
931  }
932 
933  return proxy;
934  }
935  }
936 
937  const bool resetOnly = true;
938  const bool noHist = false;
939  SG::DataProxy* proxy = nullptr;
940  if (this->typeless_record (obj.get(), key, raw_ptr,
941  allowMods, resetOnly, noHist, tinfo,
942  &proxy, true).isFailure())
943  {
944  return nullptr;
945  }
946  return proxy;
947 }
948 
949 
954 {
956 }
957 
958 
965 void SGImplSvc::setSlotNumber (int slot, int numSlots)
966 {
967  m_slotNumber = slot;
968  m_numSlots = numSlots;
969 
971  header->setArenaForSlot (slot, &m_arena);
972 }
973 
974 
975 std::vector<const SG::DataProxy*>
977 {
978  lock_t lock (m_mutex);
979  const std::vector<SG::DataProxy*>& proxies = store()->proxies();
980  std::vector<const SG::DataProxy*> ret (proxies.begin(), proxies.end());
981  return ret;
982 }
983 
984 
985 std::vector<CLID>
987 {
988  lock_t lock (m_mutex);
989 
990  using std::distance;
991  DataStore::ConstStoreIterator s_iter, s_end;
992  store()->tRange(s_iter, s_end).ignore();
993 
994  std::vector<CLID> clids;
995  clids.reserve( distance( s_iter, s_end ) );
996 
997  for (; s_iter != s_end; ++s_iter ) {
998  const CLID id = s_iter->first;
999  clids.push_back (id);
1000  }
1001 
1002  return clids;
1003 }
1004 
1005 
1006 DataProxy*
1007 SGImplSvc::transientProxy(const CLID& id, const string& key) const
1008 {
1009  lock_t lock (m_mutex);
1010  DataProxy* dp(m_pStore->proxy(id, key));
1011  return ( (0 != dp && dp->isValidObject()) ? dp : 0 );
1012 }
1013 
1014 DataObject*
1015 SGImplSvc::accessData(const CLID& id) const
1016 {
1017  lock_t lock (m_mutex);
1018  DataProxy* theProxy(proxy(id, true));
1019  return (0 == theProxy) ? 0 : theProxy->accessData();
1020 }
1021 
1022 DataObject*
1023 SGImplSvc::accessData(const CLID& id, const string& key) const
1024 {
1025  lock_t lock (m_mutex);
1026  DataProxy* theProxy(proxy(id, key, true));
1027  return (0 == theProxy) ? 0 : theProxy->accessData();
1028 }
1029 
1030 bool
1032  const std::string& keyA, const std::string& keyB )
1033 {
1034  lock_t lock (m_mutex);
1035  const bool checkValid = true;
1036  DataProxy* a = proxy( id, keyA, checkValid );
1037  DataProxy* b = proxy( id, keyB, checkValid );
1038  if ( 0 == a || 0 == b ) { return false; }
1039  DataObject* objA = a->accessData();
1040  DataObject* objB = b->accessData();
1041 
1042  if ( 0 == objA || 0 == objB ) { return false; }
1043  // prevent 'accidental' release of DataObjects...
1044  const unsigned int refCntA = objA->addRef();
1045  const unsigned int refCntB = objB->addRef();
1046  // in case swap is being specialized for DataObjects
1047  using std::swap;
1048  swap( objA, objB );
1049  a->setObject( objA );
1050  b->setObject( objB );
1051  // and then restore old ref-count;
1052  return ( (refCntA-1) == objA->release() &&
1053  (refCntB-1) == objB->release() );
1054 }
1055 
1056 StatusCode
1057 SGImplSvc::typeless_record( DataObject* obj, const std::string& key,
1058  const void* const raw_ptr,
1059  bool allowMods, bool resetOnly, bool noHist)
1060 {
1061  return typeless_record (obj, key, raw_ptr, allowMods, resetOnly, noHist, 0,
1062  nullptr, true);
1063 }
1064 
1065 
1066 StatusCode
1067 SGImplSvc::typeless_record( DataObject* obj, const std::string& key,
1068  const void* const raw_ptr,
1069  bool allowMods, bool resetOnly, bool noHist,
1070  const std::type_info* tinfo)
1071 {
1072  return typeless_record (obj, key, raw_ptr, allowMods, resetOnly, noHist,tinfo,
1073  nullptr, true);
1074 }
1075 
1076 
1077 StatusCode
1078 SGImplSvc::typeless_record( DataObject* obj, const std::string& key,
1079  const void* const raw_ptr,
1080  bool allowMods, bool resetOnly, bool noHist,
1081  const std::type_info* tinfo,
1082  SG::DataProxy** proxy_ret,
1083  bool noOverwrite)
1084 {
1085  lock_t lock (m_mutex);
1086  SG::DataProxy* proxy =
1087  record_impl( obj, key, raw_ptr, allowMods, resetOnly, !noOverwrite, tinfo);
1088  if ( proxy == nullptr )
1089  return StatusCode::FAILURE;
1090  if (proxy_ret)
1091  *proxy_ret = proxy;
1092 
1093  if ( !m_ActivateHistory || noHist ) {
1094  return StatusCode::SUCCESS;
1095  }
1096 
1097  if ( store()->storeID() != StoreID::EVENT_STORE ) {
1098  return StatusCode::SUCCESS;
1099  } else {
1100  return record_HistObj( obj->clID(), key, name(), allowMods, resetOnly );
1101  }
1102 }
1103 
1104 StatusCode
1106  DataObject* obj,
1107  const std::string& key,
1108  const void* const raw_ptr,
1109  bool allowMods,
1110  bool noHist,
1111  const std::type_info* tinfo)
1112 {
1113  lock_t lock (m_mutex);
1114  StatusCode sc(StatusCode::SUCCESS);
1115  SG::DataProxy* toRemove(proxy(clid, key, false));
1116  if (0 != toRemove) {
1117  toRemove->addRef();
1118  const bool FORCEREMOVE(true);
1119  sc =removeProxy(toRemove, (void*)0, FORCEREMOVE);
1120  }
1121  if (sc.isSuccess()) {
1122  const bool ALLOWOVERWRITE(true);
1123  const bool NORESET(false);
1124  if (record_impl( obj, key, raw_ptr, allowMods, NORESET, ALLOWOVERWRITE, tinfo) == nullptr)
1125  sc = StatusCode::FAILURE;
1126  else if ( m_ActivateHistory && noHist && store()->storeID() == StoreID::EVENT_STORE ) {
1127  sc = record_HistObj( obj->clID(), key, name(), allowMods, NORESET );
1128  }
1129  }
1130  //for detector store objects managed by IIOVSvc, replace the old proxy with the new one (#104311)
1131  if (toRemove && sc.isSuccess() && store()->storeID() == StoreID::DETECTOR_STORE) {
1133  }
1134  if (toRemove)
1135  toRemove->release();
1136  return sc;
1137 }
1138 
1140 SGImplSvc::record_impl( DataObject* pDObj, const std::string& key,
1141  const void* const raw_ptr,
1142  bool allowMods, bool resetOnly, bool allowOverwrite,
1143  const std::type_info* tinfo)
1144 {
1145  CLID clid = pDObj->clID();
1146  std::string rawKey(key);
1147  bool isVKey(SG::VersionedKey::isVersionedKey(key));
1148  if (isVKey) {
1149  //FIXME VersionedKeys will need to be handled more efficiently
1150  SG::VersionedKey vk(rawKey);
1151  DataProxy *dp(proxy(clid, vk.key()));
1152  if (dp) {
1153  //proxies primary key
1154  const std::string& pTAName(dp->name());
1155  //original key as versioned
1156  SG::VersionedKey primaryVK(pTAName);
1157 
1158  //if the existing matching object has no version
1159  //create a versioned alias for the original unversioned key
1160  //so it will remain accessible
1161  if (!SG::VersionedKey::isVersionedKey(pTAName)) {
1162  if (!(this->addAlias(primaryVK.rawVersionKey(), dp)).isSuccess()) {
1163  warning() << "record_impl: Could not setup alias key "
1164  << primaryVK.rawVersionKey()
1165  << " for unversioned object " << pTAName
1166  << endmsg;
1167  return nullptr;
1168  }
1169  }
1170  if (vk.isAuto()) {
1171  //make a new versioned key incrementing the existing version
1172  SG::VersionedKey newVK(primaryVK.key(), primaryVK.version()+1);
1173  //FIXME this will fail in a confusing way if version+1 is in use
1174  //FIXME need a better error message below, probably looking at all
1175  //FIXME aliases
1176  rawKey = newVK.rawVersionKey();
1177  }
1178  }
1179  }
1180  if (!allowOverwrite && m_pPPS) {
1181  //do not overwrite a persistent object
1182  DataProxy* dp = m_pStore->proxy (clid, rawKey);
1183  if (!dp) {
1184  dp = m_pPPS->retrieveProxy(clid, rawKey, *m_pStore);
1185  }
1186  if (dp && dp->provider()) {
1187  std::string clidTypeName;
1188  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1189  warning() << "record_impl: you are recording an object with key "
1190  << rawKey << ", type " << clidTypeName
1191  << " (CLID " << clid << ')'
1192  << "\n There is already a persistent version of this object. Recording a duplicate may lead to unreproducible results and it is deprecated."
1193  << endmsg;
1194  }
1195  }
1196  //now check whether raw_ptr has already been recorded
1197  //We need to do this before we create the bucket, the proxy etc
1198  SG::DataProxy* dp(proxy(raw_ptr));
1199  if (0 != dp) {
1200  std::string clidTypeName;
1201  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1202  warning() << "record_impl: failed for key="<< rawKey << ", type "
1203  << clidTypeName
1204  << " (CLID " << clid << ')'
1205  << "\n object @" << raw_ptr
1206  << " already in store with key="<< dp->name()
1207  << ". Will not record a duplicate! "
1208  << endmsg;
1209  if (pDObj != dp->object()) {
1210  DataBucketBase* pDBB(dynamic_cast<DataBucketBase*>(pDObj));
1211  if (!pDBB) std::abort();
1212  pDBB->relinquish(); //don't own the data obj already recorded!
1213  }
1214  this->recycle(pDObj);
1215  return nullptr;
1216  }
1217 
1218 
1219  // setup the proxy
1220  dp = setupProxy( clid, rawKey, pDObj, allowMods, resetOnly );
1221  if ( 0 == dp ) {
1222  std::string clidTypeName;
1223  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1224  warning() << "record_impl: Problem setting up the proxy for object @"
1225  << raw_ptr
1226  << "\n recorded with key " << rawKey
1227  << " of type " << clidTypeName
1228  << " (CLID " << clid << ") in DataObject @" << pDObj
1229  << endmsg;
1230 
1231  return nullptr;
1232  }
1233 
1234  // record in t2p:
1235  if ( !(this->t2pRegister( raw_ptr, dp )).isSuccess() ) {
1236  std::string clidTypeName;
1237  m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
1238  warning() << "record_impl: can not add to t2p map object @" <<raw_ptr
1239  << "\n with key " << rawKey
1240  << " of type " << clidTypeName
1241  << " (CLID " << clid << ')'
1242  << endmsg;
1243  return nullptr;
1244  }
1245 
1246  addAutoSymLinks (rawKey, clid, dp, tinfo);
1247 
1248  //handle versionedKeys: we register an alias with the "true" key
1249  //unless an object as already been recorded with that key.
1250  //Notice that addAlias overwrites any existing alias, so a generic
1251  //retrieve will always return the last version added
1252  //FIXME not the one with the highest version
1253  if (isVKey) {
1254  SG::VersionedKey vk(rawKey);
1255  if (!(this->addAlias(vk.key(), dp)).isSuccess()) {
1256  warning() << "record_impl: Could not setup alias key " << vk.key()
1257  << " for VersionedKey " << rawKey
1258  << ". Generic access to this object with clid" << clid
1259  << " will not work"
1260  << endmsg;
1261  }
1262  }
1263 
1264  return dp;
1265 }
1266 
1267 DataProxy*
1269  bool checkValid) const
1270 {
1271  DataProxy* dp = m_pStore->proxy(tAddr);
1272 
1273  if (checkValid && 0 != dp) {
1274  return dp->isValid() ? dp : 0;
1275  } else {
1276  return dp;
1277  }
1278 }
1279 
1280 StatusCode
1282  bool forceRemove)
1283 {
1284  lock_t lock (m_mutex);
1285  // check if valid proxy
1286  if (0 == proxy) return StatusCode::FAILURE;
1287 
1288  if (0 == pTrans) {
1289  DataBucketBase* bucket = dynamic_cast<DataBucketBase*>(proxy->object());
1290  if (bucket) pTrans = bucket->object();
1291  }
1292 
1293  // remove all entries from t2p map
1294  // --- only if the proxy actually has an object!
1295  // otherwise, we can trigger I/O.
1296  // besides being useless here, we can get deadlocks if we
1297  // call into the I/O code while holding the SG lock.
1298  if (proxy->isValidObject()) {
1299  this->t2pRemove(pTrans);
1301  for (SG::DataProxy::CLIDCont_t::const_iterator i = clids.begin();
1302  i != clids.end();
1303  ++i)
1304  {
1305  void* ptr = SG::DataProxy_cast (proxy, *i);
1306  this->t2pRemove(ptr);
1307  }
1308  }
1309 
1310  // remove from store
1311  return m_pStore->removeProxy(proxy, forceRemove, true);
1312 }
1313 
1314 StatusCode
1315 SGImplSvc::t2pRegister(const void* const pTrans, DataProxy* const pPers)
1316 {
1317  return m_pStore->t2pRegister(pTrans, pPers);
1318 }
1319 
1320 
1321 void
1322 SGImplSvc::t2pRemove(const void* const pTrans)
1323 {
1324  m_pStore->t2pRemove(pTrans);
1325 }
1326 
1327 void
1328 SGImplSvc::msg_update_handler(Gaudi::Details::PropertyBase& /*outputLevel*/)
1329 {
1330  setUpMessaging();
1331  updateMsgStreamOutputLevel( outputLevel() );
1332  msgSvc()->setOutputLevel(name(), outputLevel());
1333 }
1334 
1335 StatusCode
1338  SG::ConstProxyIterator& end) const {
1339  lock_t lock (m_mutex);
1340  return m_pStore->pRange(id,begin,end);
1341 }
1342 
1343 StatusCode SGImplSvc::setConst(const void* pObject)
1344 {
1345  lock_t lock (m_mutex);
1346  // Check if DataProxy does not exist
1347  DataProxy * dp = proxy(pObject);
1348 
1349  if (0 == dp)
1350  {
1351  warning() << "setConst: NO Proxy for the dobj you want to set const"
1352  << endmsg;
1353  return StatusCode::FAILURE;
1354  }
1355 
1356  dp->setConst();
1357  return StatusCode::SUCCESS;
1358 }
1359 
1360 
1361 // remove an object from Store, will remove its proxy if not reset only
1362 StatusCode
1363 SGImplSvc::remove(const void* pObject)
1364 {
1365  lock_t lock (m_mutex);
1366  return removeProxy(proxy(pObject), pObject);
1367 }
1368 
1369 
1370 // remove an object and its proxy from Store
1371 StatusCode
1372 SGImplSvc::removeDataAndProxy(const void* pObject)
1373 {
1374  lock_t lock (m_mutex);
1375  const bool FORCEREMOVE(true);
1376  return removeProxy(proxy(pObject), pObject, FORCEREMOVE);
1377 }
1378 
1379 //put a bad (unrecordable) dobj away
1380 void SGImplSvc::recycle(DataObject* pBadDObj) {
1381  assert(pBadDObj);
1382  pBadDObj->addRef();
1383  m_trash.push_back(pBadDObj);
1384 }
1385 
1386 //throw away bad objects
1388  lock_t lock (m_mutex);
1389  while (!m_trash.empty()) {
1390  m_trash.front()->release(); //delete the bad data object
1391  m_trash.pop_front(); //remove pointer from list
1392  }
1393 }
1394 
1395 
1396 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1397 
1398 bool SGImplSvc::bindHandleToProxy(const CLID& id, const string& key,
1399  IResetable* ir, DataProxy *&dp)
1400 {
1401  lock_t lock (m_mutex);
1402 
1403  dp = m_pStore->proxy (id, key);
1404  if (dp == nullptr && m_pPPS != nullptr) {
1405  dp = m_pPPS->retrieveProxy(id, key, *m_pStore);
1406  }
1407 
1408  if (0 == dp) return false;
1409 
1410  if (! dp->bindHandle(ir) ) {
1411  fatal() << "DataHandle at " << hex << ir << dec
1412  << " already bound to DataProxy with key " << ir->key()
1413  << ". Cannot bind to proxy " << dp->name() << " as well\n"
1414  << " You have probably registered multiple callbacks via regFcn with the same DataHandle using different keys (DataProxies)\n"
1415  << endmsg;
1416  return false;
1417  }
1418 
1419  //already done in DataHandleBase::setState dp->addRef();
1420 
1421 #ifndef NDEBUG
1422  SG_MSG_DEBUG(" Bound handle " << MSG::hex << ir << " to proxy "
1423  << dp << MSG::dec);
1424 #endif
1425  return true;
1426 }
1427 
1428 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1429 
1430 bool SGImplSvc::bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
1432 {
1433  lock_t lock (m_mutex);
1434  bool ret = bindHandleToProxy (id, key, ir, dp);
1435  if (ret) {
1437  if (sc.isFailure()) return false;
1438  }
1439  return true;
1440 }
1441 
1442 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1443 
1444 bool SGImplSvc::bindHandleToProxyAndRegister (const CLID& id, const std::string& key,
1446  const CallBackID& c,
1447  const IOVSvcCallBackFcn& fcn,
1448  bool trigger)
1449 {
1450  lock_t lock (m_mutex);
1451  bool ret = bindHandleToProxy (id, key, ir, dp);
1452  if (ret) {
1454  if (sc.isFailure()) return false;
1455  sc = getIIOVSvc()->regFcn(dp,c,fcn,trigger);
1456  if (sc.isFailure()) return false;
1457  }
1458  return true;
1459 }
1460 
1461 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1462 
1463 StatusCode
1464 SGImplSvc::record_HistObj(const CLID& id, const std::string& key,
1465  const std::string& store,
1466  bool allowMods, bool resetOnly) {
1467 
1468  assert(m_pHistorySvc);
1469 
1470  DataHistory *dho;
1471  dho = m_pHistorySvc->createDataHistoryObj( id, key, store );
1472 
1473  std::string idname;
1474  StatusCode sc = m_pCLIDSvc->getTypeNameOfID(id, idname);
1475  if (sc.isFailure() || idname.empty() ) {
1476  idname = std::to_string(id);
1477  }
1478  idname += '/';
1479  idname += key;
1480 
1481  DataObject* obj = SG::asStorable(dho);
1482 
1483  const bool ALLOWOVERWRITE(false);
1484  if (record_impl(obj, idname, dho, allowMods, resetOnly, ALLOWOVERWRITE,
1485  &typeid(DataHistory)) == nullptr)
1486  return StatusCode::FAILURE;
1487  return StatusCode::SUCCESS;
1488 }
1489 
1490 
1500 SGImplSvc::stringToKey (const std::string& str, CLID clid)
1501 {
1502  lock_t lock (m_stringPoolMutex);
1503  return m_stringpool.stringToKey (str, clid);
1504 }
1505 
1506 
1514 const std::string* SGImplSvc::keyToString (sgkey_t key) const
1515 {
1516  lock_t lock (m_stringPoolMutex);
1517  return m_stringpool.keyToString (key);
1518 }
1519 
1520 
1529 const std::string*
1531 {
1532  lock_t lock (m_stringPoolMutex);
1533  return m_stringpool.keyToString (key, clid);
1534 }
1535 
1536 
1550  const std::string& str,
1551  CLID clid)
1552 {
1553  lock_t lock (m_stringPoolMutex);
1554  if (!m_stringpool.registerKey (key, str, clid)) {
1555  CLID clid2;
1556  const std::string* str2 = m_stringpool.keyToString (key, clid2);
1557  REPORT_MESSAGE (MSG::WARNING) << "The numeric key " << key
1558  << " maps to multiple string key/CLID pairs: "
1559  << *str2 << "/" << clid2 << " and "
1560  << str << "/" << clid;
1561  }
1562 }
1563 
1564 
1573 {
1574  // We should hold m_stringPoolMutex before touching the pool.
1575  // But if we acquire the locks for both this and the other store,
1576  // we risk a deadlock. So first copy the other pool, so that we
1577  // don't need to hold both locks at the same time.
1579  {
1580  lock_t lock (other.m_stringPoolMutex);
1581  tmp = other.m_stringpool;
1582  }
1583  lock_t lock (m_stringPoolMutex);
1584  return m_stringpool.merge (tmp);
1585 }
1586 
1587 
1588 void
1589 SGImplSvc::releaseObject(const CLID& id, const std::string& key) {
1590  lock_t lock (m_mutex);
1591  DataProxy *pP(0);
1592  if (0 != (pP = proxy(id, key))) {
1593  // remove all entries from t2p map
1595  SG::DataProxy::CLIDCont_t::const_iterator i(clids.begin()), e(clids.end());
1596  while (i != e) t2pRemove(SG::DataProxy_cast (pP, *i++));
1597  DataBucketBase *pDBB(dynamic_cast<DataBucketBase*>(pP->object()));
1598  //tell the bucket to let go of the data object
1599  if (0 != pDBB) pDBB->relinquish(); //somebody else better took ownership
1600  bool hard_reset = (m_numSlots > 1);
1601  pP->reset (hard_reset);
1602  }
1603 }
1604 
1605 void
1607  lock_t lock (m_mutex);
1608 
1609  // Remove transient pointer entries for this proxy.
1610  // But do that only if the proxy has a valid object.
1611  // Otherwise, we could trigger I/O --- which we don't want since it's useless
1612  // (we'd just destroy the object immediately). In some cases it can also
1613  // lead to a deadlock (see ATR-24482).
1614  if (dp->isValidObject()) {
1615  SG::DataProxy::CLIDCont_t clids = dp->transientID();
1616  SG::DataProxy::CLIDCont_t::const_iterator i(clids.begin()), e(clids.end());
1617  while (i != e) {
1619  }
1620  }
1621 
1622  bool hard_reset = (m_numSlots > 1);
1623  dp->reset (hard_reset);
1624 }
1625 
1626 
1635  sgkey_t target,
1636  off_t index_offset)
1637 {
1638  lock_t lock (m_remapMutex);
1640  payload.target = target;
1641  payload.index_offset = index_offset;
1642  m_remap_impl->m_remaps[source] = payload;
1643 }
1644 
1645 
1654 bool SGImplSvc::tryELRemap (sgkey_t sgkey_in, size_t index_in,
1655  sgkey_t& sgkey_out, size_t& index_out)
1656 {
1657  lock_t lock (m_remapMutex);
1659  m_remap_impl->m_remaps.find (sgkey_in);
1660  if (i == m_remap_impl->m_remaps.end())
1661  return false;
1662  const SG::RemapImpl::remap_t& payload = i->second;
1663  sgkey_out = payload.target;
1664  index_out = index_in + payload.index_offset;
1665  return true;
1666 }
1667 
1668 
1670  const std::string& key)
1671 {
1672  lock_t lock (m_mutex);
1673  DataObject* obj = nullptr;
1674  SG::DataProxy* dp = proxy (clid, key);
1675  //we do not want anyone to mess up with our copy hence we release it immediately.
1676  if (dp && dp->isValid()) {
1677  obj = dp->object();
1678  obj->addRef();
1680  }
1681  return obj;
1682 }
1683 
1684 
1685 CLID SGImplSvc::clid( const std::string& key ) const
1686 {
1687  lock_t lock (m_mutex);
1688  SG::DataStore::ConstStoreIterator s_iter, s_end;
1689  store()->tRange(s_iter, s_end).ignore();
1690 
1691  for ( ; s_iter != s_end; ++s_iter ) {
1692  if ( s_iter->second.find( key ) != s_iter->second.end() ) {
1693  return s_iter->first;
1694  }
1695  }
1696 
1697  return CLID_NULL;
1698 }
1699 
1700 
1701 std::vector<CLID> SGImplSvc::clids( const std::string& key ) const
1702 {
1703  lock_t lock (m_mutex);
1704  std::vector<CLID> clids;
1705  SG::DataStore::ConstStoreIterator s_iter, s_end;
1706  store()->tRange(s_iter, s_end).ignore();
1707 
1708  for ( ; s_iter != s_end; ++s_iter ) {
1709  if ( s_iter->second.find( key ) != s_iter->second.end() ) {
1710  clids.push_back(s_iter->first);
1711  }
1712  }
1713 
1714  return clids;
1715 }
1716 
1717 
1719 void SGImplSvc::addAutoSymLinks (const std::string& key,
1720  CLID clid,
1721  DataProxy* dp,
1722  const std::type_info* tinfo,
1723  bool warn_nobib /*= true*/)
1724 {
1725  // Automatically make all legal base class symlinks
1726  if (!tinfo) {
1728  }
1729  const SG::BaseInfoBase* bib = nullptr;
1730  if (tinfo) {
1731  bib = SG::BaseInfoBase::find (*tinfo);
1732  }
1733  if (!bib) {
1734  // Could succeed where the previous fails if clid for DataVector<T>
1735  // but tinfo is for ConstDataVector<DataVector<T> >.
1736  bib = SG::BaseInfoBase::find (clid);
1737  }
1738  if ( bib ) {
1739  const std::vector<CLID>& bases = bib->get_bases();
1740  for ( std::size_t i = 0, iMax = bases.size(); i < iMax; ++i ) {
1741  if ( bases[i] != clid ) {
1742  if ( addSymLink( bases[i], dp ).isSuccess() ) {
1743  // register with t2p
1744  if (dp->object())
1745  this->t2pRegister( SG::DataProxy_cast( dp, bases[i] ), dp ).ignore();
1746  }
1747  else {
1748  warning() << "record_impl: Doing auto-symlinks for object with CLID "
1749  << clid
1750  << " and SG key " << key
1751  << ": Proxy already set for base CLID " << bases[i]
1752  << "; not making auto-symlink." << endmsg;
1753  }
1754  }
1755  }
1756 
1757  // Handle copy conversions.
1758  {
1759  for (CLID copy_clid : bib->get_copy_conversions()) {
1760  if (m_pStore->addSymLink (copy_clid, dp).isFailure()) {
1761  warning() << "record_impl: Doing auto-symlinks for object with CLID "
1762  << clid
1763  << " and SG key " << key
1764  << ": Proxy already set for copy-conversion CLID "
1765  << copy_clid
1766  << "; not making auto-symlink." << endmsg;
1767  }
1768  }
1769  }
1770  }
1771  else {
1772  if (warn_nobib) {
1773  warning() << "record_impl: Could not find suitable SG::BaseInfoBase for CLID ["
1774  << clid << "] (" << key << ") !\t"
1775  << "No auto-symlink established !"
1776  << endmsg;
1777  }
1778  }
1779 }
1780 
1781 void
1783  lock_t lock (m_mutex);
1784 
1785  // Reset handles added since the last call to commit.
1786  bool hard_reset = (m_numSlots > 1);
1787  std::vector<IResetable*> handles;
1788  m_newBoundHandles[std::this_thread::get_id()].swap (handles);
1789  for (IResetable* h : handles)
1790  h->reset (hard_reset);
1791 }
1792 
1793 
1799 void
1801 {
1802  m_newBoundHandles[std::this_thread::get_id()].push_back (handle);
1803 }
1804 
1805 
1811 void
1813 {
1814  std::vector<IResetable*>& v = m_newBoundHandles[std::this_thread::get_id()];
1816  std::find (v.begin(), v.end(), handle);
1817  if (it != v.end())
1818  v.erase (it);
1819 }
1820 
1821 
1825 {
1826  lock_t lock (m_mutex);
1827  m_arena.makeCurrent();
1829 }
1830 
1831 
1842 StatusCode
1843 SGImplSvc::createObj (IConverter* cvt,
1844  IOpaqueAddress* addr,
1845  DataObject*& refpObject)
1846 {
1847  // This lock was here originally, but is probably not really needed ---
1848  // both DataProxy and the I/O components have their own locks.
1849  // Further, this was observed to cause deadlocks for the detector store,
1850  // and would in general be expected to be a contention issue.
1851  //lock_t lock (m_mutex);
1852  return cvt->createObj (addr, refpObject);
1853 }
1854 
1855 
1856 // This is intended to be called from the debugger.
1857 void SG_dump (SGImplSvc* sg)
1858 {
1859  std::cout << sg->dump() << "\n";
1860 }
1861 void SG_dump (SGImplSvc* sg, const char* fname)
1862 {
1863  std::ofstream f (fname);
1864  f << sg->dump() << "\n";
1865  f.close();
1866 }
1867 
1868 
1875 SG::SourceID SGImplSvc::sourceID (const std::string& key /*= "EventSelector"*/) const
1876 {
1877  lock_t lock (m_mutex);
1879  if (dp) {
1880  const DataHeader* dh = SG::DataProxy_cast<DataHeader> (dp);
1881  if (dh) {
1882  return dh->begin()->getToken()->dbID().toString();
1883  }
1884  }
1885  return "";
1886 }
1887 
1888 
1890 // Retrieve a list of collections from Transient Store with no Key.
1891 // const version
1894  SG::detail::IteratorBase& cibegin,
1895  SG::detail::IteratorBase& ciend) const
1896 {
1897  lock_t lock (m_mutex);
1900 
1901  if (!(proxyRange(clid,first,end)).isSuccess()) {
1902  std::string typnam;
1903  m_pCLIDSvc->getTypeNameOfID(clid, typnam).ignore();
1904  SG_MSG_DEBUG("retrieve(range): no object found "
1905  << " of type " << typnam
1906  << "(CLID " << clid << ')');
1907  }
1908 
1909  (ciend.setState(end, end, true)).ignore();
1910 
1911  if (!(cibegin.setState(first, end, true)).isSuccess()) {
1912  std::string typnam;
1913  m_pCLIDSvc->getTypeNameOfID(clid, typnam).ignore();
1914  SG_MSG_DEBUG("retrieve(range): Can't initialize iterator for object range "
1915  << " of type " << typnam
1916  << "(CLID " << clid << ')');
1917  return StatusCode::FAILURE;
1918  }
1919 
1920  return StatusCode::SUCCESS;
1921 }
1922 
1923 
1925  const std::string& key,
1926  CLID auxclid) const
1927 {
1928  // If we already have the aux store (as should usually be the case), return
1929  // without taking out the SG lock. Otherwise, we can deadlock
1930  // if another thread is also trying to dereference a link to the aux store.
1931  // (Should _not_ be holding the SG lock when dereferencing the link!)
1932  if (ptr->hasStore()) return true;
1933 
1934  lock_t lock (m_mutex);
1935  SG_MSG_VERBOSE("called associateAux_impl for key " + key);
1936  // no Aux store set yet
1937  if (!ptr->hasStore()) {
1938  SG::DataProxy* dp = proxy (auxclid, key + "Aux.", true);
1939  if (dp) {
1940  if (!dp->isConst()) {
1941  SG::IAuxStore* pAux = SG::DataProxy_cast<SG::IAuxStore> (dp);
1942  if (pAux) {
1943  ptr->setStore (pAux);
1944  return true;
1945  }
1946  }
1947 
1948  const SG::IConstAuxStore* pAux = SG::DataProxy_cast<SG::IConstAuxStore> (dp);
1949  if (pAux) {
1950  ptr->setStore (pAux);
1951  return true;
1952  }
1953  }
1954  }
1955  return false;
1956 }
1957 
1958 
1960  const std::string& key,
1961  CLID auxclid) const
1962 {
1963  lock_t lock (m_mutex);
1964  SG_MSG_VERBOSE("called associateAux_impl for key " + key);
1965  // no Aux store set yet
1966  if (!ptr->hasStore()) {
1967  SG::DataProxy* dp = proxy (auxclid, key + "Aux.", true);
1968  if (dp) {
1969  if (!dp->isConst()) {
1970  SG::IAuxStore* pAux = SG::DataProxy_cast<SG::IAuxStore> (dp);
1971  if (pAux) {
1972  ptr->setStore (pAux);
1973  return true;
1974  }
1975  }
1976 
1977  const SG::IConstAuxStore* pAux = SG::DataProxy_cast<SG::IConstAuxStore> (dp);
1978  if (pAux) {
1979  ptr->setStore (pAux);
1980  return true;
1981  }
1982  }
1983  }
1984  return false;
1985 }
grepfile.info
info
Definition: grepfile.py:38
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SGImplSvc::mergeStringPool
bool mergeStringPool(const SGImplSvc &other)
Merge the string pool from another store into this one.
Definition: SGImplSvc.cxx:1572
SG::VersionedKey::isVersionedKey
static bool isVersionedKey(const char *)
quickly determine whether a string has the right format to be a VK
Definition: SGVersionedKey.cxx:18
SGImplSvc::associateAux_impl
bool associateAux_impl(SG::AuxVectorBase *ptr, const std::string &key, CLID auxclid) const
Definition: SGImplSvc.cxx:1924
SG::DataStore::typeCount
int typeCount(const CLID &id) const
Count number of object of a given type in store.
Definition: Control/SGTools/src/DataStore.cxx:405
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
common.sgkey
def sgkey(tool)
Definition: common.py:1028
CurrentEventStore.h
Hold a pointer to the current event store.
CallBackID
Definition: CallBackID.h:24
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
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
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::addSymLink
StatusCode addSymLink(const CLID &linkid, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:650
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
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
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
SG::DataStore::t2pRegister
StatusCode t2pRegister(const void *const pTrans, DataProxy *const pPers)
methods to query the T2PMap:
Definition: Control/SGTools/src/DataStore.cxx:613
SGImplSvc::locatePersistent
SG::DataProxy * locatePersistent(const SG::TransientAddress *tAddr, bool checkValid=false) const
Definition: SGImplSvc.cxx:1268
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
header
Definition: hcg.cxx:526
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::RemapImpl::remap_t::target
sgkey_t target
Definition: SGImplSvc.cxx:76
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
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DataBucketBase
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
Definition: DataBucketBase.h:24
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
SG::StringPool
Definition: StringPool.h:35
IProxyProviderSvc::loadProxies
virtual StatusCode loadProxies(IProxyRegistry &dataStore)=0
add new proxies to store every Event:
DataBucketBase.h
SG::VersionedKey::version
unsigned char version() const
Definition: SGVersionedKey.cxx:67
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:446
SGImplSvc::getIIOVSvc
IIOVSvc * getIIOVSvc()
get the IOVSvc "just in time" (breaks recursion at initialize)
Definition: SGImplSvc.cxx:234
DataBucketBase::object
virtual void * object()=0
initialize
void initialize()
Definition: run_EoverP.cxx:894
SG_dump
void SG_dump(SGImplSvc *sg)
These are intended to be easy to call from the debugger.
Definition: SGImplSvc.cxx:1857
DataStore.h
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
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
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
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
SG::RemapImpl::sgkey_t
IStringPool::sgkey_t sgkey_t
Definition: SGImplSvc.cxx:73
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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
SG::TransientAddress
Definition: TransientAddress.h:32
SG::DataStore::addToStore
virtual StatusCode addToStore(const CLID &id, DataProxy *proxy)
add proxy to store.
Definition: Control/SGTools/src/DataStore.cxx:139
SG::DataProxy::accessData
DataObject * accessData()
Access DataObject on-demand using conversion service.
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
SG::CurrentEventStore::setStore
static IProxyDict * setStore(IProxyDict *store)
Set the current store.
Definition: CurrentEventStore.cxx:36
IIOVSvc::regProxy
virtual StatusCode regProxy(SG::DataProxy *proxy, const std::string &key, const std::string &storeName="StoreGateSvc")=0
Subscribe method for DataProxy. key StoreGate key.
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
CLIDRegistry::CLIDToTypeinfo
static const std::type_info * CLIDToTypeinfo(CLID clid)
Translate between CLID and type_info.
Definition: CLIDRegistry.cxx:136
SG::AuxVectorBase::setStore
void setStore(SG::IAuxStore *store)
Set the store associated with this object.
Definition: AuxVectorBase.cxx:96
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
SG::asStorable
DataObject * asStorable(T *pObject)
Definition: StorableConversions.h:158
SG::DataStore::ConstStoreIterator
StoreMap::const_iterator ConstStoreIterator
Definition: Control/SGTools/SGTools/DataStore.h:80
SG::DataStore::clearStore
void clearStore(bool force, bool hard, MsgStream *pmlog)
If HARD is true, then the bound objects should also clear any data that depends on the identity of th...
Definition: Control/SGTools/src/DataStore.cxx:68
SGImplSvc::releaseObject
void releaseObject(const CLID &id, const std::string &key)
release object held by proxy, if any.
Definition: SGImplSvc.cxx:1589
SG::DataProxy::isValid
bool isValid() const
called by destructor
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
IIOVSvc::replaceProxy
virtual StatusCode replaceProxy(SG::DataProxy *pOld, SG::DataProxy *pNew, const std::string &storeName="StoreGateSvc")=0
replace a registered proxy with a new version
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
IHiveStoreMgr::interfaceID
static const InterfaceID & interfaceID()
Gaudi boilerplate.
Definition: IHiveStoreMgr.h:43
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
SG::RemapImpl
Definition: SGImplSvc.cxx:72
SG::BaseInfoBase::get_bases
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
Definition: BaseInfo.cxx:304
SG::DataStore::proxy
virtual DataProxy * proxy(const TransientAddress *tAddr) const
return proxy for a given type/key pair if key is empty returns the default proxy (currently last regi...
Definition: Control/SGTools/src/DataStore.cxx:414
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
SG::VersionedKey::isAuto
static bool isAuto(const std::string &)
quickly determine whether a string has the right format to be a VK with auto-generated version #
Definition: SGVersionedKey.cxx:28
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:51
SG::DataStore::setStoreID
void setStoreID(StoreID::type id)
Definition: Control/SGTools/SGTools/DataStore.h:91
AuxVectorBase.h
Manage index tracking and synchronization of auxiliary data.
SG::detail::IteratorBase::setState
StatusCode setState(SG::ConstProxyIterator itr, SG::ConstProxyIterator itrEnd, bool isConst)
Reset state of the iterator.
Definition: SGIterator.cxx:94
SG::AuxVectorBase
Manage index tracking and synchronization of auxiliary data.
Definition: AuxVectorBase.h:98
python.FakeAthena.Service
def Service(name)
Definition: FakeAthena.py:38
SGImplSvc::m_ActivateHistory
bool m_ActivateHistory
Activate the history service.
Definition: SGImplSvc.h:705
SG::Arena::makeCurrent
ArenaBase * makeCurrent()
Make this Arena the current one for its ArenaHeader.
Definition: Arena.cxx:59
SG::DataProxy::CLIDCont_t
TransientAddress::TransientClidSet CLIDCont_t
Definition: DataProxy.h:53
SGImplSvc::m_storeLoaded
bool m_storeLoaded
FIXME hack needed by loadEventProxies.
Definition: SGImplSvc.h:715
SG::ArenaBase::report
void report(std::ostream &os) const
Generate a report of the memory in use by this Arena.
Definition: ArenaBase.cxx:76
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
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
SG::StringPool::clear
void clear()
Empty the pool.
Definition: StringPool.cxx:350
SGImplSvc::initialize
virtual StatusCode initialize() override final
Service initialization.
Definition: SGImplSvc.cxx:131
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SGImplSvc::typeless_overwrite
StatusCode typeless_overwrite(const CLID &id, DataObject *obj, const std::string &key, const void *const raw_ptr, bool allowMods, bool noHist=false, const std::type_info *tinfo=0)
same as typeless_record, allows to overwrite an object in memory or on disk
Definition: SGImplSvc.cxx:1105
SG::RemapImpl::m_remaps
remap_map_t m_remaps
Definition: SGImplSvc.cxx:80
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
SG::DataStore::proxy_exact
SG::DataProxy * proxy_exact(sgkey_t sgkey) const
get proxy with given key.
Definition: Control/SGTools/src/DataStore.cxx:524
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:54
SGImplSvc::m_pStore
SG::DataStore * m_pStore
Definition: SGImplSvc.h:700
IResetable
a resetable object (e.g. a SG DataHandle)
Definition: IResetable.h:15
ArenaHeader.h
Proxy for a group of Arenas. See Arena.h for an overview of the arena-based memory allocators.
python.UpdateManyBadChannelIOVs.toRemove
tuple toRemove
Definition: UpdateManyBadChannelIOVs.py:87
SGImplSvc::m_DumpStore
bool m_DumpStore
Dump Property flag: triggers dump() at EndEvent.
Definition: SGImplSvc.h:704
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
SGImplSvc::clids
std::vector< CLID > clids() const
Return all CLIDs in the store.
Definition: SGImplSvc.cxx:986
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:124
lumiFormat.i
int i
Definition: lumiFormat.py:92
SG::ArenaHeader
Proxy for a group of Arenas.
Definition: ArenaHeader.h:54
SG::AuxElement::setStore
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
Definition: AuxElement.cxx:221
SGImplSvc::bindHandleToProxy
bool bindHandleToProxy(const CLID &id, const std::string &key, IResetable *ir, SG::DataProxy *&dp)
name says it all
Definition: SGImplSvc.cxx:1398
ret
T ret(T t)
Definition: rootspy.cxx:260
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
SGImplSvc::sgkey_t
IStringPool::sgkey_t sgkey_t
Definition: SGImplSvc.h:358
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ArenaBase::reset
void reset()
Reset all contained allocators.
Definition: ArenaBase.cxx:44
SGImplSvc::m_arena
SG::Arena m_arena
Allocation arena to associate with this store.
Definition: SGImplSvc.h:722
SG::DataProxy::alias
AliasCont_t alias() const
access set of proxy aliases Returns a COPY of the alias set.
SGImplSvc.h
SG::VersionedKey
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of ...
Definition: SGVersionedKey.h:31
SGImplSvc::m_stringpool
SG::StringPool m_stringpool
Definition: SGImplSvc.h:717
SGImplSvc::m_pHistorySvc
IHistorySvc * m_pHistorySvc
Definition: SGImplSvc.h:698
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
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
SG::DataStore::addSymLink
StatusCode addSymLink(const CLID &linkid, DataProxy *proxy)
add symlink to store:
Definition: Control/SGTools/src/DataStore.cxx:330
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
SG::BaseInfoBase::get_copy_conversions
std::vector< CLID > get_copy_conversions() const
Return known copy conversions.
Definition: BaseInfo.cxx:455
SGImplSvc
The Athena Transient Store API.
Definition: SGImplSvc.h:116
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
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
IIOVSvc
Abstract interface for IOVSvc. This is used (usually via StoreGateSvc regFcn and regHandle methods) t...
Definition: IIOVSvc.h:41
SG::StringPool::keyToString
const std::string * keyToString(sgkey_t key) const
Find the string corresponding to a given key.
Definition: StringPool.cxx:286
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
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
SG::ArenaBase::erase
void erase()
Erase all contained allocators.
Definition: ArenaBase.cxx:60
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
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
DataHeader.h
This file contains the class definition for the DataHeader and DataHeaderElement classes.
SG::AuxVectorData::hasStore
bool hasStore() const
Return true if this object has an associated store.
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
IProxyProviderSvc::preLoadProxies
virtual StatusCode preLoadProxies(IProxyRegistry &dataStore)=0
add proxies to the store before Begin Event:
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
SG::DataProxy::clID
CLID clID() const
Retrieve clid.
SGImplSvc::~SGImplSvc
virtual ~SGImplSvc() override final
Standard Destructor.
Definition: SGImplSvc.cxx:121
StoreID::DETECTOR_STORE
@ DETECTOR_STORE
Definition: StoreID.h:27
SGImplSvc::msg_update_handler
void msg_update_handler(Gaudi::Details::PropertyBase &outputLevel)
callback for output level property
Definition: SGImplSvc.cxx:1328
StoreID.h
SGImplSvc::finalize
virtual StatusCode finalize() override final
Service finalization.
Definition: SGImplSvc.cxx:309
SG::DataProxy_cast
DATA * DataProxy_cast(DataProxy *proxy)
cast the proxy into the concrete data object it proxies
IProxyProviderSvc::retrieveProxy
virtual SG::DataProxy * retrieveProxy(const CLID &id, const std::string &key, IProxyRegistry &dataStore)=0
Use a provider to create a proxy for ID/KEY.
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
SG::DataStore::storeID
virtual StoreID::type storeID() const
Definition: Control/SGTools/SGTools/DataStore.h:92
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
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
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
compileRPVLLRates.c2
c2
Definition: compileRPVLLRates.py:361
SG::BaseInfoBase::find
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
Definition: BaseInfo.cxx:569
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
errorcheck.h
Helpers for checking error return status codes and reporting errors.
SG::DataStore::keys
void keys(const CLID &id, std::vector< std::string > &vkeys, bool includeAlias, bool onlyValid)
Definition: Control/SGTools/src/DataStore.cxx:118
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::VersionedKey::rawVersionKey
const std::string & rawVersionKey() const
Definition: SGVersionedKey.h:75
SG::RemapImpl::remap_t::index_offset
off_t index_offset
Definition: SGImplSvc.cxx:77
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
StoreClearedIncident.h
Incident sent after a store is cleared.
SG::DataProxy::name
virtual const name_type & name() const override final
Retrieve data object key == string.
SG::DataStore::locatePersistent
DataProxy * locatePersistent(const void *const pTransient) const
locate the persistent (proxy) for a given T* (void*):
Definition: Control/SGTools/src/DataStore.cxx:606
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
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
SGImplSvc::addToStore
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy) override final
Raw addition of a proxy to the store.
Definition: SGImplSvc.cxx:836
SGImplSvc::addAlias
StatusCode addAlias(const std::string &aliasKey, SG::DataProxy *dp)
Definition: SGImplSvc.cxx:730
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:365
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
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
SG::VersionedKey::key
const std::string & key() const
Definition: SGVersionedKey.cxx:71
CLIDRegistry.h
a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead.
SG::AuxElement::hasStore
bool hasStore() const
Return true if this object has an associated store.
Definition: AuxElement.cxx:355
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
python.PyAthena.v
v
Definition: PyAthena.py:157
SG::DataProxy::isValidObject
bool isValidObject() const
is the object valid?
SG::ArenaHeader::defaultHeader
static ArenaHeader * defaultHeader()
Return the global default Header instance.
Definition: ArenaHeader.cxx:164
SGImplSvc::transientProxy
SG::DataProxy * transientProxy(const CLID &id, const std::string &key) const
get proxy with given id and key.
Definition: SGImplSvc.cxx:1007
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
SG::DataProxy::reset
void reset(bool hard=false)
Other methods of DataProxy (not in Interface IRegistry):
Definition: DataProxy.cxx:240
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
SGImplSvc::m_pDataLoader
IConversionSvc * m_pDataLoader
Definition: SGImplSvc.h:691
h
SGImplSvc::makeCurrent
void makeCurrent()
The current store is becoming the active store.
Definition: SGImplSvc.cxx:1824
SG::DataProxy::transientID
bool transientID(CLID id) const
return the list of transient IDs (primary or symLinked):
SGImplSvc::m_trash
std::list< DataObject * > m_trash
The Recycle Bin.
Definition: SGImplSvc.h:701
StoreID::type
type
Definition: StoreID.h:24
SG::DataStore
Hold DataProxy instances associated with a store.
Definition: Control/SGTools/SGTools/DataStore.h:73
SG::DataStore::proxies
const std::vector< DataProxy * > & proxies() const
All proxies managed by this store.
Definition: Control/SGTools/src/DataStore.cxx:627
SG::DataStore::addAlias
StatusCode addAlias(const std::string &aliasKey, DataProxy *proxy)
add alias to store
Definition: Control/SGTools/src/DataStore.cxx:377
TransientAddress.h
StoreID::findStoreID
static StoreID::type findStoreID(const std::string &storeName)
Definition: StoreID.cxx:21
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:23
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
SG::SGKeyMap
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
Definition: CxxUtils/CxxUtils/sgkey_t.h:93
SG::BaseInfoBase
The non-template portion of the BaseInfo implementation.
Definition: Control/AthenaKernel/AthenaKernel/BaseInfo.h:451
SG::DataStore::t2pRemove
void t2pRemove(const void *const pTrans)
Definition: Control/SGTools/SGTools/DataStore.h:253
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
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
IAuxStore.h
Interface for non-const operations on an auxiliary store.
SGImplSvc::m_pPPS
IProxyProviderSvc * m_pPPS
Definition: SGImplSvc.h:696
DataBucketBase::relinquish
virtual void relinquish()=0
Give up ownership of the DataBucket contents.
SG::DataStore::pRange
StatusCode pRange(const CLID &id, SG::ConstProxyIterator &f, SG::ConstProxyIterator &e) const
Return an iterator over proxy for a given CLID:
Definition: Control/SGTools/src/DataStore.cxx:574
SGImplSvc::lock_t
std::lock_guard< mutex_t > lock_t
Definition: SGImplSvc.h:737
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
IProxyProviderSvc.h
SG::DataStore::removeProxy
StatusCode removeProxy(DataProxy *proxy, bool forceRemove, bool hard)
remove proxy from store, unless proxy is reset only.
Definition: Control/SGTools/src/DataStore.cxx:196
SG::StringPool::merge
bool merge(const StringPool &other)
Merge another pool into this one.
Definition: StringPool.cxx:363
str
Definition: BTagTrackIpAccessor.cxx:11
SGImplSvc::setSlotNumber
void setSlotNumber(int slot, int numSlots)
Set the Hive slot number for this store.
Definition: SGImplSvc.cxx:965
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
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
SG::StringPool::stringToKey
sgkey_t stringToKey(const std::string &str, sgaux_t aux=0)
Find the key for a string.
Definition: StringPool.cxx:248
IConstAuxStore.h
Interface for const operations on an auxiliary store.
SG::RemapImpl::remap_t
Definition: SGImplSvc.cxx:75
get_generator_info.error
error
Definition: get_generator_info.py:40
SG::IConstAuxStore
Interface for const operations on an auxiliary store.
Definition: IConstAuxStore.h:64
SGImplSvc::m_mutex
mutex_t m_mutex
Definition: SGImplSvc.h:738
checker_macros.h
Define macros for attributes used to control the static checker.
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
IIOVSvc::regFcn
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false)=0
register callback function
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
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
SG::DataStore::tRange
StatusCode tRange(ConstStoreIterator &f, ConstStoreIterator &e) const
Return an iterator over the StoreMap:
Definition: Control/SGTools/src/DataStore.cxx:596
SGImplSvc::t2pRegister
StatusCode t2pRegister(const void *const pTrans, SG::DataProxy *const pPers)
forwarded to DataStore
Definition: SGImplSvc.cxx:1315
SG::DataStore::proxy_exact_unlocked
SG::DataProxy * proxy_exact_unlocked(sgkey_t sgkey, std::recursive_mutex &mutex) const
Like proxy_exact, but intended to be called without holding the store lock.
Definition: Control/SGTools/src/DataStore.cxx:543
SG::RemapImpl::remap_map_t
SGKeyMap< remap_t > remap_map_t
Definition: SGImplSvc.cxx:79
StoreGateSvc.h
python.compressB64.c
def c
Definition: compressB64.py:93
SG::ArenaBase::name
const std::string & name() const
Return this Arena's name.
Definition: ArenaBase.cxx:114
SGImplSvc::typeless_retrievePrivateCopy
DataObject * typeless_retrievePrivateCopy(const CLID clid, const std::string &key)
Definition: SGImplSvc.cxx:1669
SG::ConstProxyIterator
ProxyMap::const_iterator ConstProxyIterator
Definition: ProxyMap.h:28
SG::StringPool::registerKey
bool registerKey(sgkey_t key, const std::string &str, sgaux_t aux=0)
Remember an additional mapping from key to string.
Definition: StringPool.cxx:319
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
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
DataProxy.h