16 #include <tbb/concurrent_unordered_map.h>
24 #ifdef XAOD_STANDALONE
28 tbb::concurrent_unordered_map<std::string, std::function<std::unique_ptr<AsgComponent>(
const std::string&
name)>> s_factories;
33 StatusCode registerComponentFactory (
const std::string&
type,
const std::function<std::unique_ptr<AsgComponent>(
const std::string&
name)>& factory)
35 using namespace msgComponentConfig;
36 if (!s_factories.emplace (
type, factory).second)
38 ATH_MSG_ERROR (
"attempt to register a factory for type " <<
type <<
" that already has a factory");
39 return StatusCode::FAILURE;
41 return StatusCode::SUCCESS;
46 const std::function<std::unique_ptr<AsgComponent>(
const std::string&
name)> *getComponentFactory (
const std::string&
type)
48 auto iter = s_factories.find (
type);
49 if (iter == s_factories.end())