ATLAS Offline Software
Control
AthenaExamples
AthAsgExUnittest
Root
AthAsgExUnittestTool.cxx
Go to the documentation of this file.
1
2
//
3
// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4
//
5
6
// AthAsgExUnittest includes
7
#include "
AthAsgExUnittest/AthAsgExUnittestTool.h
"
8
9
AthAsgExUnittestTool::AthAsgExUnittestTool
(
const
std::string&
name
) :
asg
::AsgTool(
name
) {
10
//example property declarations with default values
11
declareProperty
(
"Property"
,
m_nProperty
= 3.0,
12
"Please describe the property here"
);
13
declareProperty
(
"ENumProperty"
,
m_enumProperty
=
Val1
,
14
"Please define enums inside your classes, not just in namespaces"
);
15
}
16
17
StatusCode
AthAsgExUnittestTool::initialize
() {
18
ATH_MSG_INFO
(
"Initializing "
<<
name
() <<
"..."
);
19
ATH_MSG_INFO
(
"Property = "
<<
m_nProperty
);
20
//
21
//Make use of the property values to configure the tool
22
//Tools should be designed so that no method other than setProperty is called before initialize
23
//
24
return
StatusCode::SUCCESS;
25
}
26
27
double
AthAsgExUnittestTool::useTheProperty
() {
28
return
m_nProperty
;
29
}
AthAsgExUnittestTool::AthAsgExUnittestTool
AthAsgExUnittestTool(const std::string &name)
Definition:
AthAsgExUnittestTool.cxx:9
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
asg
Definition:
DataHandleTestTool.h:28
AthAsgExUnittestTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition:
AthCommonDataStore.h:145
AthAsgExUnittestTool::m_enumProperty
unsigned int m_enumProperty
Definition:
AthAsgExUnittestTool.h:27
AthAsgExUnittestTool::useTheProperty
virtual double useTheProperty() override
Definition:
AthAsgExUnittestTool.cxx:27
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:240
IAthAsgExUnittestTool::Val1
@ Val1
Definition:
IAthAsgExUnittestTool.h:19
AthAsgExUnittestTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition:
AthAsgExUnittestTool.cxx:17
AthAsgExUnittestTool::m_nProperty
double m_nProperty
Definition:
AthAsgExUnittestTool.h:26
Generated on Tue Sep 2 2025 21:07:19 for ATLAS Offline Software by
1.8.18