ATLAS Offline Software
AnaReentrantAlgorithmConfig.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 //
10 // includes
11 //
12 
14 
18 #include <AsgTools/AsgTool.h>
19 
20 //
21 // method implementations
22 //
23 
24 namespace EL
25 {
28  {
29  }
30 
31 
32 
34  AnaReentrantAlgorithmConfig (const std::string& val_typeAndName)
35  : AsgComponentConfig (val_typeAndName)
36  {
37  }
38 
39 
40 
42  AnaReentrantAlgorithmConfig (const AsgComponentConfig& val_config)
43  : AsgComponentConfig (val_config)
44  {
45  }
46 
47 
48 
50  makeAlgorithm (std::unique_ptr<AnaReentrantAlgorithm>& algorithm,
51  const AlgorithmWorkerData& workerData) const
52  {
53  using namespace msgAlgorithmConfig;
54 
55  ANA_CHECK (makeComponentExpert (algorithm, "new %1% (\"%2%\", nullptr)", true, ""));
56  algorithm->setFilterWorker (workerData.m_filterWorker);
57  algorithm->setWk (workerData.m_wk);
58  if (workerData.m_evtStore)
59  algorithm->setEvtStore (workerData.m_evtStore);
60  ANA_CHECK (algorithm->sysInitialize());
61  return StatusCode::SUCCESS;
62  }
63 }
EL::AlgorithmWorkerData::m_evtStore
asg::SgTEvent * m_evtStore
Definition: AlgorithmWorkerData.h:35
algorithm
std::string algorithm
Definition: hcg.cxx:82
EL::AlgorithmWorkerData::m_wk
IWorker * m_wk
Definition: AlgorithmWorkerData.h:39
EL::AlgorithmWorkerData::m_filterWorker
IFilterWorker * m_filterWorker
Definition: AlgorithmWorkerData.h:38
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
EL::AnaReentrantAlgorithmConfig::makeAlgorithm
::StatusCode makeAlgorithm(std::unique_ptr< AnaReentrantAlgorithm > &algorithm, const AlgorithmWorkerData &workerData) const
make an algorithm from this configuration
Definition: AnaReentrantAlgorithmConfig.cxx:50
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
MessageCheck.h
AlgorithmWorkerData.h
EL::AlgorithmWorkerData
all the external components an algorithm needs before initialization (in EventLoop)
Definition: AlgorithmWorkerData.h:34
AnaReentrantAlgorithmConfig.h
EL::AnaReentrantAlgorithmConfig::AnaReentrantAlgorithmConfig
AnaReentrantAlgorithmConfig()
standard constructor
Definition: AnaReentrantAlgorithmConfig.cxx:27
AnaReentrantAlgorithm.h
AsgTool.h