ATLAS Offline Software
Functions
WorkerConfig.cxx File Reference
#include <EventLoop/WorkerConfig.h>
#include <AnaAlgorithm/AnaAlgorithmWrapper.h>
#include <AnaAlgorithm/AnaReentrantAlgorithmWrapper.h>
#include <AnaAlgorithm/PythonConfigBase.h>
#include <AsgTools/SgTEventMeta.h>
#include <EventLoop/AsgServiceWrapper.h>
#include <EventLoop/AsgToolWrapper.h>
#include <EventLoop/ModuleData.h>
#include <EventLoop/MessageCheck.h>
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 }
SGout2dot.alg
alg
Definition: SGout2dot.py:243
m_data
std::vector< T > m_data
Definition: TrackTruthMatchingBaseAlg.cxx:660
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
ANA_MSG_INFO
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:290
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
asg::AsgServiceConfig
an object that can create a AsgService
Definition: AsgServiceConfig.h:25
asg::SgTEventMeta::InputStore
@ InputStore
This store is used to access the input metadata.
Definition: SgTEventMeta.h:49
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79