ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
Root
AsgToolWrapper.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
13
#include <
EventLoop/AsgToolWrapper.h
>
14
15
#include <
EventLoop/MessageCheck.h
>
16
#include <
RootCoreUtils/Assert.h
>
17
18
//
19
// method implementations
20
//
21
22
namespace
EL
23
{
24
void
AsgToolWrapper ::
25
testInvariant ()
const
26
{
27
RCU_INVARIANT
(!
m_config
.name().empty());
28
}
29
30
31
32
AsgToolWrapper ::
33
AsgToolWrapper (
asg::AsgToolConfig
val_config)
34
:
m_config
(
std
::move (val_config))
35
{
36
RCU_NEW_INVARIANT
(
this
);
37
}
38
39
40
41
std::string_view AsgToolWrapper ::
42
getName ()
const
43
{
44
RCU_READ_INVARIANT
(
this
);
45
return
m_config
.name();
46
}
47
48
49
50
bool
AsgToolWrapper ::
51
hasName (
const
std::string& name)
const
52
{
53
RCU_READ_INVARIANT
(
this
);
54
return
m_config
.name() == name;
55
}
56
57
58
59
std::unique_ptr<IAlgorithmWrapper> AsgToolWrapper ::
60
makeClone()
const
61
{
62
RCU_READ_INVARIANT
(
this
);
63
return
std::make_unique<AsgToolWrapper> (
m_config
);
64
}
65
66
67
68
StatusCode
AsgToolWrapper ::
69
initialize (
const
AlgorithmWorkerData
&
/*workerData*/
)
70
{
71
using namespace
msgEventLoop;
72
RCU_CHANGE_INVARIANT
(
this
);
73
if
(
m_config
.makeTool (
m_tool
,
m_cleanup
).isFailure())
74
{
75
ANA_MSG_ERROR
(
"failed to create AsgTool: "
<<
m_config
.name());
76
return
StatusCode::FAILURE;
77
}
78
return
StatusCode::SUCCESS;
79
}
80
81
82
83
StatusCode
AsgToolWrapper ::
84
execute (
const
EventContext&
/*ctx*/
)
85
{
86
RCU_READ_INVARIANT
(
this
);
87
return
StatusCode::SUCCESS;
88
}
89
90
91
92
StatusCode
AsgToolWrapper ::
93
finalize ()
94
{
95
RCU_READ_INVARIANT
(
this
);
96
return
StatusCode::SUCCESS;
97
}
98
99
100
101
StatusCode
AsgToolWrapper ::
102
fileExecute ()
103
{
104
RCU_READ_INVARIANT
(
this
);
105
return
StatusCode::SUCCESS;
106
}
107
108
109
110
StatusCode
AsgToolWrapper ::
111
beginInputFile ()
112
{
113
RCU_READ_INVARIANT
(
this
);
114
return
StatusCode::SUCCESS;
115
}
116
117
118
119
::StatusCode
AsgToolWrapper ::
120
endInputFile ()
121
{
122
// no-op
123
return
StatusCode::SUCCESS;
124
}
125
}
AsgToolWrapper.h
Assert.h
RCU_INVARIANT
#define RCU_INVARIANT(x)
Definition
Assert.h:189
RCU_CHANGE_INVARIANT
#define RCU_CHANGE_INVARIANT(x)
Definition
Assert.h:219
RCU_NEW_INVARIANT
#define RCU_NEW_INVARIANT(x)
Definition
Assert.h:221
RCU_READ_INVARIANT
#define RCU_READ_INVARIANT(x)
Definition
Assert.h:217
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
MessageCheck.h
EL::AsgToolWrapper::m_cleanup
std::shared_ptr< void > m_cleanup
the cleanup pointer for this tool
Definition
AsgToolWrapper.h:83
EL::AsgToolWrapper::m_tool
ToolHandle< asg::AsgTool > m_tool
the actual tool (once instantiated)
Definition
AsgToolWrapper.h:76
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
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
std
STL namespace.
EL::AlgorithmWorkerData
all the external components an algorithm needs before initialization (in EventLoop)
Definition
AlgorithmWorkerData.h:34
Generated on
for ATLAS Offline Software by
1.17.0