ATLAS Offline Software
AthExUnittestTool.cxx
Go to the documentation of this file.
1 
2 //
3 // Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4 //
5 
7 
9  const std::string& name,
10  const IInterface* parent ) :
11  AthAlgTool( type, name, parent ),
12  m_nProperty( 0 ),
13  m_enumProperty( IAthExUnittestTool::Val1 ) {
14  //example property declarations with default values
15  declareProperty( "Property", m_nProperty = 3.0,
16  "Please describe the property here" );
17  declareProperty( "ENumProperty", m_enumProperty = Val1,
18  "Please define enums inside your classes, not just in namespaces" );
19 }
20 
22  ATH_MSG_INFO( "Initializing " << name() << "..." );
23  ATH_MSG_INFO( "Property = " << m_nProperty );
24  ATH_MSG_INFO( "ENumProperty = " << m_enumProperty );
25 
26  //Make use of the property values to configure the tool
27  //Tools should be designed so that no method other than setProperty is called before initialize
28  return StatusCode::SUCCESS;
29 }
30 
32  return m_nProperty;
33 }
34 
AthExUnittestTool::AthExUnittestTool
AthExUnittestTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: AthExUnittestTool.cxx:8
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
IAthExUnittestTool::Val1
@ Val1
Definition: IAthExUnittestTool.h:15
AthExUnittestTool::initialize
virtual StatusCode initialize() override
Definition: AthExUnittestTool.cxx:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthExUnittestTool::m_enumProperty
unsigned int m_enumProperty
Definition: AthExUnittestTool.h:27
AthExUnittestTool::useTheProperty
virtual double useTheProperty() override
Definition: AthExUnittestTool.cxx:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthExUnittestTool::m_nProperty
double m_nProperty
Definition: AthExUnittestTool.h:26
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthExUnittestTool.h
IAthExUnittestTool
Definition: IAthExUnittestTool.h:10
AthAlgTool
Definition: AthAlgTool.h:26