ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoopTest
Root
UnitTestAlg6.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//
6
// includes
7
//
8
9
#include <
EventLoopTest/UnitTestAlg6.h
>
10
11
//
12
// method implementations
13
//
14
15
namespace
EL
16
{
17
UnitTestAlg6 ::
18
UnitTestAlg6 (
const
std::string& name, ISvcLocator* pSvcLocator)
19
:
AnaReentrantAlgorithm
(name, pSvcLocator)
20
{
21
declareProperty
(
"property"
,
m_property
,
"test property"
);
22
declareProperty
(
"string_property"
,
m_string_property
,
"test string property"
);
23
declareProperty
(
"toolHandle"
,
m_toolHandle
,
"ToolHandle property"
);
24
}
25
26
27
28
::StatusCode
UnitTestAlg6 ::
29
initialize ()
30
{
31
if
(
m_wasInitialized
)
32
{
33
ANA_MSG_FATAL
(
"initialized twice"
);
34
return
StatusCode::FAILURE;
35
}
36
37
if
(!
m_toolHandle
.empty())
38
ANA_CHECK
(
m_toolHandle
.retrieve());
39
40
m_wasInitialized
=
true
;
41
return ::StatusCode::SUCCESS;
42
}
43
44
45
46
::StatusCode
UnitTestAlg6 ::
47
execute (
const
EventContext&
/*ctx*/
)
const
48
{
49
if
(!
m_wasInitialized
)
50
{
51
ANA_MSG_FATAL
(
"never initialized"
);
52
return
StatusCode::FAILURE;
53
}
54
return ::StatusCode::SUCCESS;
55
}
56
57
58
59
::StatusCode
UnitTestAlg6 ::
60
finalize ()
61
{
62
if
(!
m_wasInitialized
)
63
{
64
ANA_MSG_FATAL
(
"never initialized"
);
65
return
StatusCode::FAILURE;
66
}
67
return ::StatusCode::SUCCESS;
68
}
69
}
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
ANA_MSG_FATAL
#define ANA_MSG_FATAL(xmsg)
Macro printing fatal messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:296
UnitTestAlg6.h
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
EL::AnaReentrantAlgorithm::AnaReentrantAlgorithm
AnaReentrantAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition
AnaReentrantAlgorithm.cxx:29
EL::UnitTestAlg6::m_wasInitialized
bool m_wasInitialized
whether initialize has been called
Definition
UnitTestAlg6.h:45
EL::UnitTestAlg6::m_toolHandle
ToolHandle< IUnitTestTool > m_toolHandle
the tool handle property our owner sets
Definition
UnitTestAlg6.h:41
EL::UnitTestAlg6::m_property
float m_property
the float property our owner sets
Definition
UnitTestAlg6.h:33
EL::UnitTestAlg6::m_string_property
std::string m_string_property
the string property our owner sets
Definition
UnitTestAlg6.h:37
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
Generated on
for ATLAS Offline Software by
1.17.0