4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
7/** @file StoreGateSvc.icc
10#ifndef STOREGATE_STOREGATESVC_ICC
11#define STOREGATE_STOREGATESVC_ICC
12#include "StoreGate/constraints/KeyConcept.h"
13#include "AthContainersInterfaces/AuxStore_traits.h"
14#include "AthenaKernel/ClassName.h"
15#include "CxxUtils/checker_macros.h"
18/// macro to help writing the function calls.
19/// first looks if there is a hive slot defined, otherwise forwards to the "serial" implementation
20#define _SGXCALL(FUN,ARGS,ONERR) \
21 SGImplSvc* impl = this->currentStore(); \
23 return impl->FUN ARGS; \
28/// macro to help writing the function calls
29#define _SGVOIDCALL(FUN,ARGS) \
30 SGImplSvc* impl = this->currentStore(); \
38StoreGateSvc::storeID() const
46StoreGateSvc::currentStore() const {
47 if (m_storeID == StoreID::EVENT_STORE) {
48 SG::HiveEventSlot* slot = currentSlot();
49 if (slot) return slot->pEvtStore;
51 return m_defaultStore;
57StoreGateSvc::proxy(const CLID& id, const char* key) const {
58 _SGXCALL( proxy, (id, key), 0 );
63StoreGateSvc::proxy_exact (SG::sgkey_t sgkey) const {
64 _SGXCALL( proxy_exact, (sgkey), 0 );
67///////////////////////////////////////////////////////////////////
68// create an object and record it with key
69//////////////////////////////////////////////////////////////////
70template <typename T, typename TKEY, typename... ARGS>
72StoreGateSvc::create(const TKEY& key, ARGS... constructorArgs) {
73 T* pT = new T(constructorArgs...);
74 if(!(this->record(pT, key).isSuccess())) {
75 SG_MSG_ERROR ("create: problem recording created object @{} using key {}",
76 static_cast<void*>(pT), key);
77 pT=0; //record will take care of deleting pT even if it fails
81///////////////////////////////////////////////////////////////////
82// record an object with key
83//////////////////////////////////////////////////////////////////
84template <typename T, typename TKEY>
85StatusCode StoreGateSvc::record(T* pObject, const TKEY& key)
87 const bool ALLOWMODS(true);
88 return record(pObject, key, ALLOWMODS); //allow mods by default
90//-------------------------------------------------------------------
91template <typename T, typename TKEY>
92StatusCode StoreGateSvc::record(const T* pObject, const TKEY& key)
94 const bool NOMODS(false);
95 // Ok --- we hold objects as non-const pointers internally, but mark
96 // them as const, so they can only be retrieved as const.
97 T* pObject_nc ATLAS_THREAD_SAFE = const_cast<T*> (pObject);
98 return record(pObject_nc, key, NOMODS); // do not allow mods
101//-------------------------------------------------------------------
102template <typename T, typename TKEY>
103StatusCode StoreGateSvc::record(T* pObject, const TKEY& key,
104 bool allowMods, bool resetOnly, bool noHist)
106 return record1 (SG::asStorable<T>(pObject), pObject, key,
107 allowMods, resetOnly, noHist);
111//-------------------------------------------------------------------
114template <typename T, typename TKEY>
115StatusCode StoreGateSvc::record1(DataObject* obj,
116 T* pObject, const TKEY& key,
117 bool allowMods, bool resetOnly, bool noHist)
118requires KeyConcept<TKEY>
120 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
121 rememberBadRecord (ClassID_traits<T>::ID(), key);
124 // make sure the BaseInfo(Base) structure is initialized
125 SG::BaseInfo<T>::baseinfo();
127 // If s_isConst is set for this type, then we want to automatically
128 // make it const when recorded.
129 if (ClassID_traits<T>::s_isConst)
132 StatusCode sc = this->currentStore()->typeless_record( obj, key, pObject,
133 allowMods, resetOnly, noHist,
136 if (sc.isSuccess()) {
138 "Recorded object @{} with key {} of type {} (CLID {})\n"
139 " in DataObject @{}\n"
140 " object {}modifiable when retrieved",
141 static_cast<void*>(pObject),
142 static_cast<std::string>(key),
143 ClassID_traits<T>::typeName(),
144 ClassID_traits<T>::ID(),
145 static_cast<void*>(obj),
146 (allowMods ? "" : "not "));
154//-------------------------------------------------------------------
157template <typename T, typename TKEY>
158StatusCode StoreGateSvc::overwrite1(DataObject* obj, T* pObject,
160 bool allowMods, bool noHist)
161requires KeyConcept<TKEY>
163 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
164 rememberBadRecord (ClassID_traits<T>::ID(), key);
167 // make sure the BaseInfo(Base) structure is initialized
168 SG::BaseInfo<T>::baseinfo();
170 // If s_isConst is set for this type, then we want to automatically
171 // make it const when recorded.
172 if (ClassID_traits<T>::s_isConst) allowMods = false;
174 StatusCode sc = this->currentStore()->typeless_overwrite(ClassID_traits<T>::ID(),
176 pObject, allowMods, noHist,
179 if (sc.isSuccess()) {
180 SG_MSG_DEBUG("overwrite: Recorded object @{} with key {} of type {} (CLID {})\n"
181 " in DataObject @{}\n"
182 " object {}modifiable when retrieved",
183 static_cast<void*>(pObject),
184 static_cast<std::string>(key),
185 ClassID_traits<T>::typeName(),
186 ClassID_traits<T>::ID() ,
187 static_cast<void*>(obj),
188 (allowMods ? "" : "not "));
194//////////////////////////////////////////////////////////////////
195// Retrieve the default object (with no key) as a const pointer
196//////////////////////////////////////////////////////////////////
198StatusCode StoreGateSvc::retrieve(const T*& ptr) const
200 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
201 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
204 SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
205 if (!dp || !dp->isValid()) {
206 SG_MSG_WARNING ("retrieve(default): No valid proxy for default object \n"
207 " of type {} (CLID {})",
208 ClassID_traits<T>::typeName(),
209 ClassID_traits<T>::ID());
210 return StatusCode::FAILURE;
212 ptr = SG::DataProxy_cast<T> (dp);
214 return StatusCode::FAILURE;
217 //for types with an associated store, try to retrieve it and associate it
218 this->associateAux (ptr, SG::DEFAULTKEY);
220 SG_MSG_DEBUG("retrieve(default): Retrieved const pointer to default object \n"
221 " of type {} (CLID {})",
222 ClassID_traits<T>::typeName() ,
223 ClassID_traits<T>::ID());
226 return StatusCode::SUCCESS;
229//////////////////////////////////////////////////////////////////
230// Retrieve the default object (with no key) as a pointer (non-const)
231//////////////////////////////////////////////////////////////////
233StatusCode StoreGateSvc::retrieve(T*& ptr) const
235 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
236 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
239 SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
240 if (!dp || !dp->isValid() || dp->isConst()) {
241 SG_MSG_WARNING ("retrieve(default): No valid proxy for default object "
242 " of type {} (CLID {})\n Try to use a const retrieve ",
243 ClassID_traits<T>::typeName(),
244 ClassID_traits<T>::ID());
245 return StatusCode::FAILURE;
247 ptr = SG::DataProxy_cast<T> (dp);
249 return StatusCode::FAILURE;
252 //for types with an associated store, try to retrieve it and associate it
253 this->associateAux (ptr, SG::DEFAULTKEY);
255 SG_MSG_DEBUG("retrieve(default): Retrieved non-const pointer to default object \n"
256 " of type {} (CLID {})",
257 ClassID_traits<T>::typeName() ,
258 ClassID_traits<T>::ID());
261 return StatusCode::SUCCESS;
264//////////////////////////////////////////////////////////////////
265// Retrieve the keyed object as a const pointer
266// Overload for std::string key type
267//////////////////////////////////////////////////////////////////
269StatusCode StoreGateSvc::retrieve(const T*& ptr, const std::string& key) const
271 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
272 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
275 SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
278 if (!dp || !dp->isValid()) {
279 SG_MSG_WARNING ("retrieve(const): "
280 "No valid proxy for object {} of type {} (CLID {})",
282 ClassID_traits<T>::typeName(),
283 ClassID_traits<T>::ID());
284 return StatusCode::FAILURE;
286 ptr = SG::DataProxy_cast<T> (dp);
288 return StatusCode::FAILURE;
291 //for types with an associated store, try to retrieve it and associate it
292 this->associateAux (ptr, key);
294 SG_MSG_DEBUG ("Retrieved const pointer to object {} of type {} (CLID {})",
296 ClassID_traits<T>::typeName(),
297 ClassID_traits<T>::ID());
300 return StatusCode::SUCCESS;
303//////////////////////////////////////////////////////////////////
304// Retrieve the keyed object as a const pointer
305//////////////////////////////////////////////////////////////////
306template <typename T, typename TKEY>
307StatusCode StoreGateSvc::retrieve(const T*& ptr, const TKEY& key) const
308requires KeyConcept<TKEY>
310 return this->retrieve(ptr, static_cast<std::string>(key));
313//////////////////////////////////////////////////////////////////
314// Retrieve the keyed object as a non-const pointer
315// Overload for std::string key type
316//////////////////////////////////////////////////////////////////
318StatusCode StoreGateSvc::retrieve(T*& ptr, const std::string& key) const
320 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
321 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
324 SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
327 if (!dp || !dp->isValid() || dp->isConst()) {
328 SG_MSG_WARNING("retrieve(non-const): No valid proxy for object {} of type {} (CLID {})\n"
329 " Try to use a const retrieve",
331 ClassID_traits<T>::typeName(),
332 ClassID_traits<T>::ID());
333 return StatusCode::FAILURE;
335 ptr = SG::DataProxy_cast<T> (dp);
337 return StatusCode::FAILURE;
340 //for types with an associated store, try to retrieve it and associate it
341 this->associateAux (ptr, key);
343 SG_MSG_DEBUG("Retrieved non-const pointer to object {} of type {} (CLID {})",
344 static_cast<std::string>(key),
345 ClassID_traits<T>::typeName(),
346 ClassID_traits<T>::ID());
349 return StatusCode::SUCCESS;
352//////////////////////////////////////////////////////////////////
353// Retrieve the keyed object as a non-const pointer
354//////////////////////////////////////////////////////////////////
355template <typename T, typename TKEY>
356StatusCode StoreGateSvc::retrieve(T*& ptr, const TKEY& key) const
357requires KeyConcept<TKEY>
359 return this->retrieve(ptr, static_cast<std::string>(key));
362/// Retrieve all objects of type T: returns an SG::ConstIterator range
365StoreGateSvc::retrieve(SG::ConstIterator<T>& begin,
366 SG::ConstIterator<T>& end) const {
367 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
368 rememberBadRetrieve (ClassID_traits<T>::ID(), "(iterator)");
370 _SGXCALL(retrieve, (ClassID_traits<T>::ID(), begin, end), StatusCode::FAILURE);
375 * @brief Retrieve an object of type @c T from StoreGate.
376 * Return 0 if not found.
380T* StoreGateSvc::retrieve () const
383 retrieve (p).ignore();
388 * @brief Retrieve an object of type @c T from StoreGate.
389 * Return 0 if not found.
390 * @param key The key to use for the lookup.
392template <typename T, class TKEY>
393T* StoreGateSvc::retrieve (const TKEY& key) const
396 retrieve (p, key).ignore();
401 * @brief Retrieve an object of type @c T from StoreGate.
402 * Return 0 if not found.
405T* StoreGateSvc::tryRetrieve () const
407 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
408 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
411 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
412 if (dp && dp->isValid() && !dp->isConst()) {
413 T* ptr = SG::DataProxy_cast<T> (dp);
415 this->associateAux (ptr, SG::DEFAULTKEY);
423const T* StoreGateSvc::tryConstRetrieve() const
425 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
426 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
429 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
430 if (dp && dp->isValid()) {
431 const T* ptr = SG::DataProxy_cast<T> (dp);
433 this->associateAux (ptr, SG::DEFAULTKEY);
441 * @brief Retrieve an object of type @c T from StoreGate.
442 * Return 0 if not found. Don't print any WARNINGs
443 * @param key The key to use for the lookup.
445template <typename T, class TKEY>
446T* StoreGateSvc::tryRetrieve (const TKEY& key) const
447requires KeyConcept<TKEY>
449 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
450 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
452 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
453 static_cast<std::string> (key),
455 if (dp && dp->isValid() && !dp->isConst()) {
456 T* ptr = SG::DataProxy_cast<T> (dp);
458 this->associateAux (ptr, key);
465template <typename T, class TKEY>
466const T* StoreGateSvc::tryConstRetrieve (const TKEY& key) const
467requires KeyConcept<TKEY>
469 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
470 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
473 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
474 static_cast<std::string> (key),
476 if (dp && dp->isValid()) {
477 const T* ptr = SG::DataProxy_cast<T> (dp);
479 this->associateAux (ptr, key);
487int StoreGateSvc::typeCount() const
489 return typeCount(ClassID_traits<T>::ID());
493template <typename T, typename TKEY>
495StoreGateSvc::contains(const TKEY& key) const
497 return this->contains(ClassID_traits<T>::ID(), key);
500template <typename TKEY>
502StoreGateSvc::contains(const CLID& clid, const TKEY& key) const
504 _SGXCALL( contains, (clid,key), false );
507template <typename T, typename TKEY>
509StoreGateSvc::transientContains(const TKEY& key) const
511 return transientContains(ClassID_traits<T>::ID(), key);
516template <typename TKEY>
518StoreGateSvc::transientContains(const CLID& id, const TKEY& key) const
520 _SGXCALL(transientContains, (id, key), false);
523//-------------------------end of contains methods--------------------
526StoreGateSvc::keys(std::vector<std::string>& vkeys,
527 bool includeAlias, bool onlyValid) const {
528 return this->keys(ClassID_traits<T>::ID(), vkeys, includeAlias, onlyValid);
532//-------------------------------------------------------------------
533template <typename T, typename TKEY>
534StatusCode StoreGateSvc::record(std::unique_ptr<T> pUnique, const TKEY& key)
536 const bool ALLOWMODS(true);
537 return record(std::move(pUnique), key, ALLOWMODS); //allow mods by default
539//-------------------------------------------------------------------
540template <typename T, typename TKEY>
541StatusCode StoreGateSvc::record(std::unique_ptr<const T> pUnique,
544 const bool NOMODS(false);
545 // Ok --- we hold objects as non-const pointers internally, but mark
546 // them as const, so they can only be retrieved as const.
547 T* ptr ATLAS_THREAD_SAFE = const_cast<T*> (pUnique.release());
548 return record1(SG::asStorable (ptr), ptr,
549 key, NOMODS); // do not allow mods
552//-------------------------------------------------------------------
553template <typename T, typename TKEY>
554StatusCode StoreGateSvc::record(std::unique_ptr<T> pUnique, const TKEY& key,
555 bool allowMods, bool resetOnly, bool noHist)
557 T* ptr = pUnique.get();
558 return record1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
559 allowMods, resetOnly, noHist);
562template <typename T, typename TKEY>
563StatusCode StoreGateSvc::overwrite(T* p2BRegistered, const TKEY& key)
565 const bool ALLOWMODS(true);
566 return overwrite(p2BRegistered, key, ALLOWMODS); //SG takes ownership
569template <typename T, typename TKEY>
571StoreGateSvc::overwrite(T* pObject, const TKEY& key,
572 bool allowMods, bool noHist)
574 return overwrite1 (SG::asStorable<T>(pObject), pObject, key,
578template <typename T, typename TKEY>
579StatusCode StoreGateSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key)
581 const bool ALLOWMODS(true);
582 return overwrite(std::move(pUnique), key, ALLOWMODS); //allow mods by default
585template <typename T, typename TKEY>
586StatusCode StoreGateSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key,
587 bool allowMods, bool noHist)
589 T* ptr = pUnique.get();
590 return overwrite1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
594template <typename T, typename AKEY>
595StatusCode StoreGateSvc::setAlias(const T* pObject, const AKEY& aKey)
596requires KeyConcept<AKEY>
598 _SGXCALL(setAlias, (pObject, aKey), StatusCode::FAILURE);
600//-------------------------------------------------------------------
601template <typename T, typename TKEY, typename AKEY>
603StoreGateSvc::setAlias(const T* /*dummy*/,
604 const TKEY& key, const AKEY& aKey)
605requires KeyConcept<TKEY> && KeyConcept<AKEY>
607 _SGXCALL(setAlias, (ClassID_traits<T>::ID(), key, aKey), StatusCode::FAILURE);
612StoreGateSvc::setAlias(SG::DataProxy* proxy, const std::string& aliasKey)
614 _SGXCALL(setAlias, (proxy, aliasKey), StatusCode::FAILURE);
617//////////////////////////////////////////////////////////////////
618// Make a soft link to the object with key: return non_const link
619//////////////////////////////////////////////////////////////////
620template <typename T, typename TLINK>
622StoreGateSvc::symLink(const T* pObject, TLINK* /*dummy*/)
624 _SGXCALL(symLink, (pObject, ClassID_traits<TLINK>::ID()), StatusCode::FAILURE);
627//////////////////////////////////////////////////////////////////
628// Make a soft link to the object with key: set const link
629//////////////////////////////////////////////////////////////////
630template <typename T, typename TLINK>
632StoreGateSvc::symLink(const T* pObject, const TLINK* /*dummy*/)
634 _SGXCALL(symLink, (pObject, ClassID_traits<TLINK>::ID()), StatusCode::FAILURE);
637template <KeyConcept TKEY>
639StoreGateSvc::symLink(const CLID id, const TKEY& key, const CLID linkid)
641 _SGXCALL(symLink, (id, key, linkid), StatusCode::FAILURE);
645/// Remove pObject, will remove its proxy if not reset only.
648StoreGateSvc::remove(const T* pObject) {
649 _SGXCALL(remove, (pObject), StatusCode::FAILURE);
652/// Remove pObject and its proxy no matter what.
655StoreGateSvc::removeDataAndProxy(const T* pObject) {
656 _SGXCALL(removeDataAndProxy, (pObject), StatusCode::FAILURE);
659template <typename T, class TKEY>
661StoreGateSvc::retrieveHighestVersion(SG::ObjectWithVersion<T>& dobjWithVersion,
662 const TKEY& requestedKey) const
664 std::list< SG::ObjectWithVersion<T> > allVersions;
665 StatusCode sc(this->retrieveAllVersions(allVersions,requestedKey));
666 if (sc.isSuccess()) {
667 allVersions.sort(); // on highest version number
668 dobjWithVersion.versionedKey.copyVK(allVersions.back().versionedKey.rawVersionKey());
673template <typename T, class TKEY>
675StoreGateSvc::retrieveAllVersions(std::list< SG::ObjectWithVersion<T> >& allVersions,
676 const TKEY& requestedKey) const
678 StatusCode sc(StatusCode::FAILURE);
679 SG::ConstIterator<T> i,e;
680 if ((this->retrieve<T>(i,e)).isSuccess()){
681 SG::VersionedKey reqVK(requestedKey);
683 SG::VersionedKey vk(i.key());
684 if (reqVK.sameKey(vk)) {
685 sc = StatusCode::SUCCESS;
686 SG::ObjectWithVersion<T> okOWV(vk, i.proxy());
687 allVersions.push_back(okOWV);
698StoreGateSvc::retrieveUniquePrivateCopy (const std::string& key)
700 CLID clid = ClassID_traits<T>::ID();
701 DataObject* obj = this->currentStore()->typeless_retrievePrivateCopy(clid, key);
702 std::unique_ptr<T> ret (SG::Storable_cast<T>(obj));
703 if (DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (obj))
711//////////////////////////////////////////////////////////////////
712// Retrieve the @c CLID of a given "key"
714//////////////////////////////////////////////////////////////////
715template<typename TKEY>
717StoreGateSvc::clid( const TKEY& key ) const
719 _SGXCALL(clid, (key), CLID_NULL);
722//////////////////////////////////////////////////////////////////
723// Retrieve the @c CLID s of a given "key"
725//////////////////////////////////////////////////////////////////
726template<typename TKEY>
728StoreGateSvc::clids( const TKEY& key ) const
730 std::vector<CLID> nullV;
731 _SGXCALL(clids, (key), nullV);
734///////////////////////////////////////////////////////////////////////////
738StoreGateSvc::setProxyProviderSvc(IProxyProviderSvc* pPPSvc) {
739 _SGVOIDCALL(setProxyProviderSvc, (pPPSvc));
745StoreGateSvc::proxyProviderSvc() {
746 _SGXCALL(proxyProviderSvc, (), nullptr);
751 * @brief Return the metadata source ID for the current event slot.
752 * @param key SG key of the DataHeader to query.
753 * Returns an empty string if no source has been set.
755 * The default version always returns an empty string.
759StoreGateSvc::sourceID (const std::string& key /*= "EventSelector"*/) const {
760 _SGXCALL(sourceID, (key), "");
766StoreGateSvc::remap (CLID clid,
769 off_t index_offset) {
770 _SGVOIDCALL(remap_impl, (this->stringToKey (source, clid),
771 this->stringToKey (target, clid),
777 * @brief Remember that retrieve() was called for a MT store.
778 * @param clid CLID of the operation.
779 * @param key Key of the operation.
782void StoreGateSvc::rememberBadRetrieve (CLID clid, const std::string& key) const
784 rememberBad (m_badRetrieves, clid, key);
789 * @brief Remember that retrieve() was called for a MT store.
790 * @param clid CLID of the operation.
791 * @param key Key of the operation.
794void StoreGateSvc::rememberBadRecord (CLID clid, const std::string& key) const
796 rememberBad (m_badRecords, clid, key);
800template <class DOBJ, class AUXSTORE>
801bool StoreGateSvc::associateAux_impl (DOBJ* ptr,
802 const std::string& key,
803 const AUXSTORE*) const
805 CLID auxclid = ClassID_traits<AUXSTORE>::ID();
806 _SGXCALL( associateAux_impl, (ptr, key, auxclid), false);
811bool StoreGateSvc::associateAux_impl (DOBJ* /*ptr*/,
812 const std::string& /*key*/,
813 const SG::NoAuxStore*) const
820 * @brief associate a data object to its auxiliary store
821 * Return false if the aux store is not found.
822 * @param key The key to use for the lookup.
825bool StoreGateSvc::associateAux (DOBJ* ptr,
826 const std::string& key,
827 bool ignoreMissing) const
829 typename SG::AuxStore_traits<DOBJ>::type* pDummy(0); //used to pass down auxstore type
830 bool hasAux=associateAux_impl(ptr, key, pDummy) || ignoreMissing;
832 SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type {}\n"
833 " to object of type {} (CLID {}) with key {}",
834 SG::AuxStore_traits<DOBJ>::const_typeName(),
835 ClassID_traits<DOBJ>::typeName(),
836 ClassID_traits<DOBJ>::ID(),
844bool StoreGateSvc::associateAux (const DOBJ* ptr,
845 const std::string& key,
846 bool ignoreMissing) const
848 typename SG::AuxStore_traits<DOBJ>::const_type* pDummy(0); //used to pass down auxstore type
849 // Should generally be ok, since any actual modification is done
850 // inside the store lock. Still kind of a wart that we still do this, though.
851 DOBJ* ptr_nc ATLAS_THREAD_SAFE = const_cast<DOBJ*> (ptr);
852 bool hasAux=associateAux_impl(ptr_nc, key, pDummy) || ignoreMissing;
854 SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type {}\n"
855 " to object of type {} (CLID {}) with key {}",
856 SG::AuxStore_traits<DOBJ>::const_typeName(),
857 ClassID_traits<DOBJ>::typeName(),
858 ClassID_traits<DOBJ>::ID(),
865#endif //STOREGATE_STOREGATESVC_ICC