ATLAS Offline Software
Loading...
Searching...
No Matches
WorkerConfig.cxx File Reference
Include dependency graph for WorkerConfig.cxx:

Go to the source code of this file.

Functions

 ClassImp (EL::WorkerConfig) namespace EL

Function Documentation

◆ ClassImp()

ClassImp ( EL::WorkerConfig )
Author
Nils Krumnack

Definition at line 28 of file WorkerConfig.cxx.

31{
32 WorkerConfig ::
33 WorkerConfig (Detail::ModuleData *val_data) noexcept
34 : m_data (val_data),
35 m_metaStore (asg::SgTEventMeta::InputStore, nullptr)
36 {}
37
38
39
40 // FIX ME: something bad happens in the linker step if this is not
41 // here and instead rely on the implicit destructor, which I don't
42 // want to debug.
43 WorkerConfig :: ~WorkerConfig () noexcept = default;
44
45
46
47 void WorkerConfig ::
48 add (const EL::PythonConfigBase& config)
49 {
50 using namespace msgEventLoop;
51 ANA_MSG_INFO ("in add");
52 // no invariant used
53 std::unique_ptr<IAlgorithmWrapper> alg;
54 if (config.componentType() == "AnaAlgorithm")
55 alg = std::make_unique<AnaAlgorithmWrapper> (AnaAlgorithmConfig (config));
56 else if (config.componentType() == "AnaReentrantAlgorithm")
57 alg = std::make_unique<AnaReentrantAlgorithmWrapper> (AnaReentrantAlgorithmConfig (config));
58 else if (config.componentType() == "AsgTool")
59 alg = std::make_unique<AsgToolWrapper> (asg::AsgToolConfig (config));
60 else if (config.componentType() == "AsgService")
61 alg = std::make_unique<AsgServiceWrapper> (asg::AsgServiceConfig (config));
62 else
63 {
64 ANA_MSG_ERROR ("unknown component type: \"" << config.componentType() << "\"");
65 throw std::runtime_error ("unknown component type: \"" + config.componentType() + "\"");
66 }
67 m_data->m_algs.emplace_back (std::move (alg));
68 }
69}
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
an object that can create a AsgService
an object that can create a AsgTool
@ InputStore
This store is used to access the input metadata.
bool add(const std::string &hname, TKey *tobj)
Definition fastadd.cxx:55
This module defines the arguments passed from the BATCH driver to the BATCH worker.