ATLAS Offline Software
Loading...
Searching...
No Matches
CondContFactory.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration.
3 */
4
5
9#include <sstream>
10#include <stdexcept>
11
12using namespace CondContainer;
13
16 return factory;
17}
18
20 std::lock_guard<std::mutex> guard(m_mapMutex);
21 m_makers.try_emplace (key, maker);
22}
23
24SG::DataObjectSharedPtr<DataObject> CondContFactory::Create( Athena::IRCUSvc& rcusvc, const CLID& clid, const std::string& key ) const {
25 std::lock_guard<std::mutex> guard(m_mapMutex);
26 auto i = m_makers.find(clid);
27 if ( i == m_makers.end()) {
29 }
30 ICondContMaker* maker = i->second;
31 return maker->Create(rcusvc, clid,key);
32}
Hold mappings of ranges to condition objects.
uint32_t CLID
The Class ID type.
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
Interface for RCU service.
Definition IRCUSvc.h:40
SG::DataObjectSharedPtr< DataObject > Create(Athena::IRCUSvc &rcusvc, const CLID &clid, const std::string &key) const
void regMaker(const CLID &clid, ICondContMaker *maker)
static CondContFactory & Instance()
std::map< CLID, ICondContMaker * > m_makers
virtual SG::DataObjectSharedPtr< DataObject > Create(Athena::IRCUSvc &rcusvc, const CLID &clid, const std::string &key) const =0
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr