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 error() << "create: problem recording created object @"
76 << pT << " using key " << key << endmsg;
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 @" << pObject
139 << " with key " << (std::string)key
140 << " of type " << ClassID_traits<T>::typeName()
141 << "(CLID " << ClassID_traits<T>::ID()
142 << ")\n in DataObject @" << obj
143 << "\n object " << (allowMods ? "" : "not ")
144 << "modifiable when retrieved");
152//-------------------------------------------------------------------
155template <typename T, typename TKEY>
156StatusCode StoreGateSvc::overwrite1(DataObject* obj, T* pObject,
158 bool allowMods, bool noHist)
159requires KeyConcept<TKEY>
161 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
162 rememberBadRecord (ClassID_traits<T>::ID(), key);
165 // make sure the BaseInfo(Base) structure is initialized
166 SG::BaseInfo<T>::baseinfo();
168 // If s_isConst is set for this type, then we want to automatically
169 // make it const when recorded.
170 if (ClassID_traits<T>::s_isConst) allowMods = false;
172 StatusCode sc = this->currentStore()->typeless_overwrite(ClassID_traits<T>::ID(),
174 pObject, allowMods, noHist,
177 if (sc.isSuccess()) {
179 "overwrite: Recorded object @" << pObject
180 << " with key " << (std::string)key
181 << " of type " << ClassID_traits<T>::typeName()
182 << "(CLID " << ClassID_traits<T>::ID()
183 << ")\n in DataObject @" << obj
184 << "\n object " << (allowMods ? "" : "not ")
185 << "modifiable when retrieved");
191//////////////////////////////////////////////////////////////////
192// Retrieve the default object (with no key) as a const pointer
193//////////////////////////////////////////////////////////////////
195StatusCode StoreGateSvc::retrieve(const T*& ptr) const
197 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
198 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
201 SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
202 if (!dp || !dp->isValid()) {
204 << "retrieve(default): No valid proxy for default object \n"
205 << " of type " << ClassID_traits<T>::typeName() << "(CLID "
206 << ClassID_traits<T>::ID() << ')' << endmsg;
207 return StatusCode::FAILURE;
209 ptr = SG::DataProxy_cast<T> (dp);
211 return StatusCode::FAILURE;
214 //for types with an associated store, try to retrieve it and associate it
215 this->associateAux (ptr, SG::DEFAULTKEY);
217 SG_MSG_DEBUG("retrieve(default): Retrieved const pointer to default object \n"
218 << " of type " << ClassID_traits<T>::typeName()
219 << "(CLID " << ClassID_traits<T>::ID() << ')');
222 return StatusCode::SUCCESS;
225//////////////////////////////////////////////////////////////////
226// Retrieve the default object (with no key) as a pointer (non-const)
227//////////////////////////////////////////////////////////////////
229StatusCode StoreGateSvc::retrieve(T*& ptr) const
231 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
232 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
235 SG::DataProxy* dp =proxy(ClassID_traits<T>::ID());
236 if (!dp || !dp->isValid() || dp->isConst()) {
238 << "retrieve(default): No valid proxy for default object "
239 << " of type " << ClassID_traits<T>::typeName() << "(CLID "
240 << ClassID_traits<T>::ID() << ")\n Try to use a const retrieve "
242 return StatusCode::FAILURE;
244 ptr = SG::DataProxy_cast<T> (dp);
246 return StatusCode::FAILURE;
249 //for types with an associated store, try to retrieve it and associate it
250 this->associateAux (ptr, SG::DEFAULTKEY);
252 SG_MSG_DEBUG("retrieve(default): Retrieved non-const pointer to default object \n"
253 << " of type " << ClassID_traits<T>::typeName()
254 << "(CLID " << ClassID_traits<T>::ID() << ')');
257 return StatusCode::SUCCESS;
260//////////////////////////////////////////////////////////////////
261// Retrieve the keyed object as a const pointer
262// Overload for std::string key type
263//////////////////////////////////////////////////////////////////
265StatusCode StoreGateSvc::retrieve(const T*& ptr, const std::string& key) const
267 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
268 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
271 SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
274 if (!dp || !dp->isValid()) {
276 << "retrieve(const): No valid proxy for object " << key << ' '
277 << " of type " << ClassID_traits<T>::typeName() << "(CLID "
278 << ClassID_traits<T>::ID() << ')' << endmsg;
279 return StatusCode::FAILURE;
281 ptr = SG::DataProxy_cast<T> (dp);
283 return StatusCode::FAILURE;
286 //for types with an associated store, try to retrieve it and associate it
287 this->associateAux (ptr, key);
289 SG_MSG_DEBUG( "Retrieved const pointer to object " << key << ' '
290 << " of type " << ClassID_traits<T>::typeName()
291 << "(CLID " << ClassID_traits<T>::ID() << ')');
294 return StatusCode::SUCCESS;
297//////////////////////////////////////////////////////////////////
298// Retrieve the keyed object as a const pointer
299//////////////////////////////////////////////////////////////////
300template <typename T, typename TKEY>
301StatusCode StoreGateSvc::retrieve(const T*& ptr, const TKEY& key) const
302requires KeyConcept<TKEY>
304 return this->retrieve(ptr, static_cast<std::string>(key));
307//////////////////////////////////////////////////////////////////
308// Retrieve the keyed object as a non-const pointer
309// Overload for std::string key type
310//////////////////////////////////////////////////////////////////
312StatusCode StoreGateSvc::retrieve(T*& ptr, const std::string& key) const
314 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
315 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
318 SG::DataProxy* dp =proxy (ClassID_traits<T>::ID(),
321 if (!dp || !dp->isValid() || dp->isConst()) {
322 SG_MSG_WARNING("retrieve(non-const): No valid proxy for object "
324 << " of type " << ClassID_traits<T>::typeName() << "(CLID "
325 << ClassID_traits<T>::ID()
326 << ") \n Try to use a const retrieve" );
327 return StatusCode::FAILURE;
329 ptr = SG::DataProxy_cast<T> (dp);
331 return StatusCode::FAILURE;
334 //for types with an associated store, try to retrieve it and associate it
335 this->associateAux (ptr, key);
337 SG_MSG_DEBUG("Retrieved non-const pointer to object " << (std::string)key
338 << ' ' << " of type " << ClassID_traits<T>::typeName()
339 << "(CLID " << ClassID_traits<T>::ID() << ')');
342 return StatusCode::SUCCESS;
345//////////////////////////////////////////////////////////////////
346// Retrieve the keyed object as a non-const pointer
347//////////////////////////////////////////////////////////////////
348template <typename T, typename TKEY>
349StatusCode StoreGateSvc::retrieve(T*& ptr, const TKEY& key) const
350requires KeyConcept<TKEY>
352 return this->retrieve(ptr, static_cast<std::string>(key));
355/// Retrieve all objects of type T: returns an SG::ConstIterator range
358StoreGateSvc::retrieve(SG::ConstIterator<T>& begin,
359 SG::ConstIterator<T>& end) const {
360 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
361 rememberBadRetrieve (ClassID_traits<T>::ID(), "(iterator)");
363 _SGXCALL(retrieve, (ClassID_traits<T>::ID(), begin, end), StatusCode::FAILURE);
368 * @brief Retrieve an object of type @c T from StoreGate.
369 * Return 0 if not found.
373T* StoreGateSvc::retrieve () const
376 retrieve (p).ignore();
381 * @brief Retrieve an object of type @c T from StoreGate.
382 * Return 0 if not found.
383 * @param key The key to use for the lookup.
385template <typename T, class TKEY>
386T* StoreGateSvc::retrieve (const TKEY& key) const
389 retrieve (p, key).ignore();
394 * @brief Retrieve an object of type @c T from StoreGate.
395 * Return 0 if not found.
398T* StoreGateSvc::tryRetrieve () const
400 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
401 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
404 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
405 if (dp && dp->isValid() && !dp->isConst()) {
406 T* ptr = SG::DataProxy_cast<T> (dp);
408 this->associateAux (ptr, SG::DEFAULTKEY);
416const T* StoreGateSvc::tryConstRetrieve() const
418 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
419 rememberBadRetrieve (ClassID_traits<T>::ID(), "");
422 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID());
423 if (dp && dp->isValid()) {
424 const T* ptr = SG::DataProxy_cast<T> (dp);
426 this->associateAux (ptr, SG::DEFAULTKEY);
434 * @brief Retrieve an object of type @c T from StoreGate.
435 * Return 0 if not found. Don't print any WARNINGs
436 * @param key The key to use for the lookup.
438template <typename T, class TKEY>
439T* StoreGateSvc::tryRetrieve (const TKEY& key) const
440requires KeyConcept<TKEY>
442 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
443 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
445 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
446 static_cast<std::string> (key),
448 if (dp && dp->isValid() && !dp->isConst()) {
449 T* ptr = SG::DataProxy_cast<T> (dp);
451 this->associateAux (ptr, key);
458template <typename T, class TKEY>
459const T* StoreGateSvc::tryConstRetrieve (const TKEY& key) const
460requires KeyConcept<TKEY>
462 if (m_storeID == StoreID::EVENT_STORE && currentSlot() != nullptr) {
463 rememberBadRetrieve (ClassID_traits<T>::ID(), key);
466 SG::DataProxy* dp = proxy (ClassID_traits<T>::ID(),
467 static_cast<std::string> (key),
469 if (dp && dp->isValid()) {
470 const T* ptr = SG::DataProxy_cast<T> (dp);
472 this->associateAux (ptr, key);
480int StoreGateSvc::typeCount() const
482 return typeCount(ClassID_traits<T>::ID());
486template <typename T, typename TKEY>
488StoreGateSvc::contains(const TKEY& key) const
490 return this->contains(ClassID_traits<T>::ID(), key);
493template <typename TKEY>
495StoreGateSvc::contains(const CLID& clid, const TKEY& key) const
497 _SGXCALL( contains, (clid,key), false );
500template <typename T, typename TKEY>
502StoreGateSvc::transientContains(const TKEY& key) const
504 return transientContains(ClassID_traits<T>::ID(), key);
509template <typename TKEY>
511StoreGateSvc::transientContains(const CLID& id, const TKEY& key) const
513 _SGXCALL(transientContains, (id, key), false);
516//-------------------------end of contains methods--------------------
519StoreGateSvc::keys(std::vector<std::string>& vkeys,
520 bool includeAlias, bool onlyValid) const {
521 return this->keys(ClassID_traits<T>::ID(), vkeys, includeAlias, onlyValid);
525//-------------------------------------------------------------------
526template <typename T, typename TKEY>
527StatusCode StoreGateSvc::record(std::unique_ptr<T> pUnique, const TKEY& key)
529 const bool ALLOWMODS(true);
530 return record(std::move(pUnique), key, ALLOWMODS); //allow mods by default
532//-------------------------------------------------------------------
533template <typename T, typename TKEY>
534StatusCode StoreGateSvc::record(std::unique_ptr<const T> pUnique,
537 const bool NOMODS(false);
538 // Ok --- we hold objects as non-const pointers internally, but mark
539 // them as const, so they can only be retrieved as const.
540 T* ptr ATLAS_THREAD_SAFE = const_cast<T*> (pUnique.release());
541 return record1(SG::asStorable (ptr), ptr,
542 key, NOMODS); // do not allow mods
545//-------------------------------------------------------------------
546template <typename T, typename TKEY>
547StatusCode StoreGateSvc::record(std::unique_ptr<T> pUnique, const TKEY& key,
548 bool allowMods, bool resetOnly, bool noHist)
550 T* ptr = pUnique.get();
551 return record1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
552 allowMods, resetOnly, noHist);
555template <typename T, typename TKEY>
556StatusCode StoreGateSvc::overwrite(T* p2BRegistered, const TKEY& key)
558 const bool ALLOWMODS(true);
559 return overwrite(p2BRegistered, key, ALLOWMODS); //SG takes ownership
562template <typename T, typename TKEY>
564StoreGateSvc::overwrite(T* pObject, const TKEY& key,
565 bool allowMods, bool noHist)
567 return overwrite1 (SG::asStorable<T>(pObject), pObject, key,
571template <typename T, typename TKEY>
572StatusCode StoreGateSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key)
574 const bool ALLOWMODS(true);
575 return overwrite(std::move(pUnique), key, ALLOWMODS); //allow mods by default
578template <typename T, typename TKEY>
579StatusCode StoreGateSvc::overwrite(std::unique_ptr<T> pUnique, const TKEY& key,
580 bool allowMods, bool noHist)
582 T* ptr = pUnique.get();
583 return overwrite1 (SG::asStorable<T>(std::move(pUnique)), ptr, key,
587template <typename T, typename AKEY>
588StatusCode StoreGateSvc::setAlias(const T* pObject, const AKEY& aKey)
589requires KeyConcept<AKEY>
591 _SGXCALL(setAlias, (pObject, aKey), StatusCode::FAILURE);
593//-------------------------------------------------------------------
594template <typename T, typename TKEY, typename AKEY>
596StoreGateSvc::setAlias(const T* /*dummy*/,
597 const TKEY& key, const AKEY& aKey)
598requires KeyConcept<TKEY> && KeyConcept<AKEY>
600 _SGXCALL(setAlias, (ClassID_traits<T>::ID(), key, aKey), StatusCode::FAILURE);
605StoreGateSvc::setAlias(SG::DataProxy* proxy, const std::string& aliasKey)
607 _SGXCALL(setAlias, (proxy, aliasKey), StatusCode::FAILURE);
610//////////////////////////////////////////////////////////////////
611// Make a soft link to the object with key: return non_const link
612//////////////////////////////////////////////////////////////////
613template <typename T, typename TLINK>
615StoreGateSvc::symLink(const T* pObject, TLINK* /*dummy*/)
617 _SGXCALL(symLink, (pObject, ClassID_traits<TLINK>::ID()), StatusCode::FAILURE);
620//////////////////////////////////////////////////////////////////
621// Make a soft link to the object with key: set const link
622//////////////////////////////////////////////////////////////////
623template <typename T, typename TLINK>
625StoreGateSvc::symLink(const T* pObject, const TLINK* /*dummy*/)
627 _SGXCALL(symLink, (pObject, ClassID_traits<TLINK>::ID()), StatusCode::FAILURE);
630template <KeyConcept TKEY>
632StoreGateSvc::symLink(const CLID id, const TKEY& key, const CLID linkid)
634 _SGXCALL(symLink, (id, key, linkid), StatusCode::FAILURE);
638/// Remove pObject, will remove its proxy if not reset only.
641StoreGateSvc::remove(const T* pObject) {
642 _SGXCALL(remove, (pObject), StatusCode::FAILURE);
645/// Remove pObject and its proxy no matter what.
648StoreGateSvc::removeDataAndProxy(const T* pObject) {
649 _SGXCALL(removeDataAndProxy, (pObject), StatusCode::FAILURE);
652template <typename T, class TKEY>
654StoreGateSvc::retrieveHighestVersion(SG::ObjectWithVersion<T>& dobjWithVersion,
655 const TKEY& requestedKey) const
657 std::list< SG::ObjectWithVersion<T> > allVersions;
658 StatusCode sc(this->retrieveAllVersions(allVersions,requestedKey));
659 if (sc.isSuccess()) {
660 allVersions.sort(); // on highest version number
661 dobjWithVersion.versionedKey.copyVK(allVersions.back().versionedKey.rawVersionKey());
666template <typename T, class TKEY>
668StoreGateSvc::retrieveAllVersions(std::list< SG::ObjectWithVersion<T> >& allVersions,
669 const TKEY& requestedKey) const
671 StatusCode sc(StatusCode::FAILURE);
672 SG::ConstIterator<T> i,e;
673 if ((this->retrieve<T>(i,e)).isSuccess()){
674 SG::VersionedKey reqVK(requestedKey);
676 SG::VersionedKey vk(i.key());
677 if (reqVK.sameKey(vk)) {
678 sc = StatusCode::SUCCESS;
679 SG::ObjectWithVersion<T> okOWV(vk, i.proxy());
680 allVersions.push_back(okOWV);
691StoreGateSvc::retrieveUniquePrivateCopy (const std::string& key)
693 CLID clid = ClassID_traits<T>::ID();
694 DataObject* obj = this->currentStore()->typeless_retrievePrivateCopy(clid, key);
695 std::unique_ptr<T> ret (SG::Storable_cast<T>(obj));
696 if (DataBucketBase* dbb = dynamic_cast<DataBucketBase*> (obj))
704//////////////////////////////////////////////////////////////////
705// Retrieve the @c CLID of a given "key"
707//////////////////////////////////////////////////////////////////
708template<typename TKEY>
710StoreGateSvc::clid( const TKEY& key ) const
712 _SGXCALL(clid, (key), CLID_NULL);
715//////////////////////////////////////////////////////////////////
716// Retrieve the @c CLID s of a given "key"
718//////////////////////////////////////////////////////////////////
719template<typename TKEY>
721StoreGateSvc::clids( const TKEY& key ) const
723 std::vector<CLID> nullV;
724 _SGXCALL(clids, (key), nullV);
727///////////////////////////////////////////////////////////////////////////
731StoreGateSvc::setProxyProviderSvc(IProxyProviderSvc* pPPSvc) {
732 _SGVOIDCALL(setProxyProviderSvc, (pPPSvc));
738StoreGateSvc::proxyProviderSvc() {
739 _SGXCALL(proxyProviderSvc, (), nullptr);
744 * @brief Return the metadata source ID for the current event slot.
745 * @param key SG key of the DataHeader to query.
746 * Returns an empty string if no source has been set.
748 * The default version always returns an empty string.
752StoreGateSvc::sourceID (const std::string& key /*= "EventSelector"*/) const {
753 _SGXCALL(sourceID, (key), "");
759StoreGateSvc::remap (CLID clid,
762 off_t index_offset) {
763 _SGVOIDCALL(remap_impl, (this->stringToKey (source, clid),
764 this->stringToKey (target, clid),
770 * @brief Remember that retrieve() was called for a MT store.
771 * @param clid CLID of the operation.
772 * @param key Key of the operation.
775void StoreGateSvc::rememberBadRetrieve (CLID clid, const std::string& key) const
777 rememberBad (m_badRetrieves, clid, key);
782 * @brief Remember that retrieve() was called for a MT store.
783 * @param clid CLID of the operation.
784 * @param key Key of the operation.
787void StoreGateSvc::rememberBadRecord (CLID clid, const std::string& key) const
789 rememberBad (m_badRecords, clid, key);
793template <class DOBJ, class AUXSTORE>
794bool StoreGateSvc::associateAux_impl (DOBJ* ptr,
795 const std::string& key,
796 const AUXSTORE*) const
798 CLID auxclid = ClassID_traits<AUXSTORE>::ID();
799 _SGXCALL( associateAux_impl, (ptr, key, auxclid), false);
804bool StoreGateSvc::associateAux_impl (DOBJ* /*ptr*/,
805 const std::string& /*key*/,
806 const SG::NoAuxStore*) const
813 * @brief associate a data object to its auxiliary store
814 * Return false if the aux store is not found.
815 * @param key The key to use for the lookup.
818bool StoreGateSvc::associateAux (DOBJ* ptr,
819 const std::string& key,
820 bool ignoreMissing) const
822 typename SG::AuxStore_traits<DOBJ>::type* pDummy(0); //used to pass down auxstore type
823 bool hasAux=associateAux_impl(ptr, key, pDummy) || ignoreMissing;
824 if (!hasAux) SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type "
825 << SG::AuxStore_traits<DOBJ>::const_typeName()
826 << "\n to object of type " << ClassID_traits<DOBJ>::typeName() << "(CLID "
827 << ClassID_traits<DOBJ>::ID() << ") with key " << key << endmsg);
833bool StoreGateSvc::associateAux (const DOBJ* ptr,
834 const std::string& key,
835 bool ignoreMissing) const
837 typename SG::AuxStore_traits<DOBJ>::const_type* pDummy(0); //used to pass down auxstore type
838 // Should generally be ok, since any actual modification is done
839 // inside the store lock. Still kind of a wart that we still do this, though.
840 DOBJ* ptr_nc ATLAS_THREAD_SAFE = const_cast<DOBJ*> (ptr);
841 bool hasAux=associateAux_impl(ptr_nc, key, pDummy) || ignoreMissing;
842 if (!hasAux) SG_MSG_WARNING("associateAux const: Could not associate AuxStore of type "
843 << SG::AuxStore_traits<DOBJ>::const_typeName()
844 << "\n to object of type " << ClassID_traits<DOBJ>::typeName() << "(CLID "
845 << ClassID_traits<DOBJ>::ID() << ") with key " << key << endmsg);
850#endif //STOREGATE_STOREGATESVC_ICC