ATLAS Offline Software
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
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 
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 
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
asg
Definition: DataHandleTestTool.h:28
AthAsgExUnittestTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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:228
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