ATLAS Offline Software
AsgToolWrapper.h
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 #ifndef EVENT_LOOP_ASG_TOOL_WRAPPER_H
10 #define EVENT_LOOP_ASG_TOOL_WRAPPER_H
11 
12 #include <EventLoop/Global.h>
13 
14 #include <AsgTools/AsgTool.h>
15 #include <AsgTools/AsgToolConfig.h>
17 
18 namespace EL
19 {
21 
22  class AsgToolWrapper final : public IAlgorithmWrapper
23  {
24  public:
25 
28 
30  void testInvariant () const;
31 
34 
37 
38 
39 
42 
43  virtual std::string_view getName () const override;
44 
45  virtual bool hasName (const std::string& name) const override;
46 
47  virtual std::unique_ptr<IAlgorithmWrapper> makeClone() const override;
48 
49  virtual StatusCode initialize (const AlgorithmWorkerData& workerData) override;
50 
51  virtual StatusCode execute () override;
52 
53  virtual StatusCode finalize () override;
54 
56 
58 
60 
61 
62 
65 
66  private:
67 
70 
76  ToolHandle<asg::AsgTool> m_tool;
77 
83  std::shared_ptr<void> m_cleanup;
84  };
85 }
86 
87 #endif
EL::AsgToolWrapper::endInputFile
virtual ::StatusCode endInputFile() override
call endInputFile on the algorithm
Definition: AsgToolWrapper.cxx:120
EL::AsgToolWrapper::execute
virtual StatusCode execute() override
call execute on the algorithm
Definition: AsgToolWrapper.cxx:84
EL::AsgToolWrapper::initialize
virtual StatusCode initialize(const AlgorithmWorkerData &workerData) override
call initialize on the algorithm
Definition: AsgToolWrapper.cxx:69
EL::AsgToolWrapper::finalize
virtual StatusCode finalize() override
call finalize on the algorithm
Definition: AsgToolWrapper.cxx:93
EL::AsgToolWrapper::getName
virtual std::string_view getName() const override
Definition: AsgToolWrapper.cxx:42
EL::AsgToolWrapper::m_config
asg::AsgToolConfig m_config
the algorithm configuration
Definition: AsgToolWrapper.h:69
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
EL::AsgToolWrapper::hasName
virtual bool hasName(const std::string &name) const override
whether this algorithm has the given name
Definition: AsgToolWrapper.cxx:51
EL::AsgToolWrapper::m_tool
ToolHandle< asg::AsgTool > m_tool
the actual tool (once instantiated)
Definition: AsgToolWrapper.h:76
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AsgToolConfig.h
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::AsgToolWrapper::beginInputFile
virtual ::StatusCode beginInputFile() override
call beginInputFile on the algorithm
Definition: AsgToolWrapper.cxx:111
EL::AsgToolWrapper::makeClone
virtual std::unique_ptr< IAlgorithmWrapper > makeClone() const override
make a clone of this algorithm
Definition: AsgToolWrapper.cxx:60
EL::AsgToolWrapper::fileExecute
virtual ::StatusCode fileExecute() override
call fileExecute on the algorithm
Definition: AsgToolWrapper.cxx:102
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
EL::AlgorithmWorkerData
all the external components an algorithm needs before initialization (in EventLoop)
Definition: AlgorithmWorkerData.h:34
EL::AsgToolWrapper
an IAlgorithmWrapper for AsgTool
Definition: AsgToolWrapper.h:23
EL::IAlgorithmWrapper
a wrapper around a generic algorithm for use within EventLoop
Definition: IAlgorithmWrapper.h:48
EL::AsgToolWrapper::m_cleanup
std::shared_ptr< void > m_cleanup
the cleanup pointer for this tool
Definition: AsgToolWrapper.h:83
AsgTool.h
EL::AsgToolWrapper::testInvariant
void testInvariant() const
test the invariant of this object
Definition: AsgToolWrapper.cxx:25
Global.h
IAlgorithmWrapper.h
EL::AsgToolWrapper::AsgToolWrapper
AsgToolWrapper()
standard default constructor for serialization
Definition: AsgToolWrapper.h:33