#include <AlgFactory.h>
Definition at line 16 of file AlgFactory.h.
◆ Creator
typedef std::unique_ptr<ConfigurableAlg>(* TCS::AlgFactory::Creator) (const std::string &methodName) |
function type to create an algorithm
Definition at line 19 of file AlgFactory.h.
◆ AlgFactory() [1/2]
TCS::AlgFactory::AlgFactory |
( |
| ) |
|
|
privatedefault |
◆ AlgFactory() [2/2]
◆ algorithm()
Retrieve algorithm by name.
Definition at line 66 of file AlgFactory.cxx.
69 if(findRes ==
m_algs.end())
72 return findRes->second.get();
◆ ATLAS_NOT_THREAD_SAFE()
static AlgFactory& mutable_instance TCS::AlgFactory::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
static |
◆ create()
Create algorithm of given type and name.
Definition at line 21 of file AlgFactory.cxx.
24 TCS_EXCEPTION(
"AlgFactory: algorithm " <<
algName <<
" already exists. Serious configuration error.")
32 std::cout <<
"Registered algorithms are:" << std::endl;
34 std::cout <<
" " <<
x.first << std::endl;
35 TCS_EXCEPTION(
"AlgFactory: trying to instantiate algorithm of type " << algType <<
" with name " <<
algName <<
", but it has not been registered.");
39 auto [itr,inserted] =
m_algs.emplace(
algName, std::move(createdAlg));
41 return itr->second.get();
◆ getAllClassNames()
std::vector< std::string > AlgFactory< ConcreteAlgorithm >::getAllClassNames |
( |
| ) |
const |
Definition at line 56 of file AlgFactory.cxx.
57 std::vector<std::string> classNames;
60 classNames.push_back(
key);
◆ instance()
◆ operator=()
◆ printAlgorithmNames()
void AlgFactory< ConcreteAlgorithm >::printAlgorithmNames |
( |
| ) |
const |
◆ Register()
Register creator function for algorithm type.
Definition at line 46 of file AlgFactory.cxx.
47 const auto& [itr, inserted] =
m_callMap.emplace(algType, creator);
50 TCS_EXCEPTION (
"TCS::AlgFactory: registration of algorithm " << algType <<
" failed since it already exists");
◆ m_algs
◆ m_callMap
std::map<std::string, Creator> TCS::AlgFactory::m_callMap |
|
private |
The documentation for this class was generated from the following files: