ATLAS Offline Software
UnitTestTool.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 
14 
15 #include <gtest/gtest.h>
16 #include <map>
17 
18 //
19 // method implementations
20 //
21 
22 namespace EL
23 {
25  UnitTestTool (const std::string& val_name)
26  : AsgTool (val_name)
27  {
28  declareProperty ("propertyInt", m_propertyInt, "the integer property");
29  declareProperty ("subtool", m_subtool, "our subtool");
30  }
31 
32 
33 
36  {
37  }
38 
39 
40 
42  initialize ()
43  {
44  return StatusCode::SUCCESS;
45  }
46 
47 
48 
50  getPropertyInt () const
51  {
52  return m_propertyInt;
53  }
54 
55 
56 
58  getSubtool () const
59  {
60  if (!m_subtool.empty())
61  return &*m_subtool;
62  else
63  return nullptr;
64  }
65 }
EL::UnitTestTool::initialize
::StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: UnitTestTool.cxx:42
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
EL::IUnitTestTool
the interface for UnitTestTool
Definition: IUnitTestTool.h:20
UnitTestTool.h
EL::UnitTestTool::getPropertyInt
virtual int getPropertyInt() const override
get the integer property
Definition: UnitTestTool.cxx:50
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::UnitTestTool::m_propertyInt
int m_propertyInt
the integer property
Definition: UnitTestTool.h:51
EL::UnitTestTool::getSubtool
virtual const IUnitTestTool * getSubtool() const override
get the subtool property
Definition: UnitTestTool.cxx:58
EL::UnitTestTool::m_subtool
ToolHandle< IUnitTestTool > m_subtool
the toolhandle for subtools
Definition: UnitTestTool.h:47
EL::UnitTestTool::UnitTestTool
UnitTestTool(const std::string &val_name)
standard constructor
Definition: UnitTestTool.cxx:25
EL::UnitTestTool::~UnitTestTool
~UnitTestTool()
standard destructor
Definition: UnitTestTool.cxx:35