ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgExampleTools
Root
UnitTestTool1A.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
AsgExampleTools/UnitTestTool1A.h
>
14
15
//
16
// method implementations
17
//
18
19
namespace
asg
20
{
21
UnitTestTool1A ::
22
UnitTestTool1A (
const
std::string& val_name)
23
:
AsgTool
(val_name)
24
{
25
declareProperty
(
"propertyInt"
,
m_propertyInt
,
"the integer property"
);
26
declareProperty
(
"propertyString"
,
m_propertyString
,
"the string property"
);
27
declareProperty
(
"initializeFail"
,
m_initializeFail
,
"whether initialize should fail"
);
28
}
29
30
31
32
StatusCode UnitTestTool1A ::
33
initialize ()
34
{
35
if
(
m_initializeFail
)
36
{
37
ATH_MSG_ERROR
(
"tool configured to fail initialize"
);
38
return
StatusCode::FAILURE;
39
}
40
if
(
m_isInitialized
)
41
{
42
ATH_MSG_ERROR
(
"initialize called twice"
);
43
return
StatusCode::FAILURE;
44
}
45
m_isInitialized
=
true
;
46
return
StatusCode::SUCCESS;
47
}
48
49
50
51
std::string UnitTestTool1A ::
52
getPropertyString ()
const
53
{
54
return
m_propertyString
;
55
}
56
57
58
59
int
UnitTestTool1A ::
60
getPropertyInt ()
const
61
{
62
return
m_propertyInt
;
63
}
64
65
66
67
void
UnitTestTool1A ::
68
setPropertyInt (
int
val_property)
69
{
70
m_propertyInt
= val_property;
71
}
72
73
74
75
bool
UnitTestTool1A ::
76
isInitialized ()
const
77
{
78
return
m_isInitialized
;
79
}
80
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
UnitTestTool1A.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
asg
Definition
DataHandleTestTool.h:28
asg::UnitTestTool1A::m_initializeFail
bool m_initializeFail
whether initialize should fail
Definition
UnitTestTool1A.h:60
asg::UnitTestTool1A::m_isInitialized
bool m_isInitialized
whether initialize has been called
Definition
UnitTestTool1A.h:48
asg::UnitTestTool1A::m_propertyString
std::string m_propertyString
the string property
Definition
UnitTestTool1A.h:52
asg::UnitTestTool1A::m_propertyInt
int m_propertyInt
the integer property
Definition
UnitTestTool1A.h:56
Generated on
for ATLAS Offline Software by
1.17.0