ATLAS Offline Software
UnitTestTool1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef ASG_TOOLS__UNIT_TEST_TOOL1_H
10 #define ASG_TOOLS__UNIT_TEST_TOOL1_H
11 
12 #include <AsgTools/AsgTool.h>
14 
17 
18 namespace asg
19 {
24 
25  struct UnitTestTool1 : virtual public IUnitTestTool1,
26  public AsgTool
27  {
29 
30 
31  public:
32  UnitTestTool1 (const std::string& val_name);
33 
35  public:
36  ~UnitTestTool1 ();
37 
38  public:
39  StatusCode initialize () override;
40 
41  public:
42  virtual std::string getPropertyString () const override;
43 
44  public:
45  virtual int getPropertyInt () const override;
46 
47  public:
48  virtual void setPropertyInt (int val_property) override;
49 
50  public:
51  virtual bool isInitialized () const override;
52 
54  public:
55  bool m_isInitialized = false;
56 
58  public:
59  std::string m_propertyString;
60 
62  public:
63  int m_propertyInt = 0;
64 
66  public:
67  bool m_initializeFail = false;
68 
71  public:
72  static int& instance_counts (const std::string& name);
73  };
74 }
75 
76 #endif
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
asg::UnitTestTool1::UnitTestTool1
UnitTestTool1(const std::string &val_name)
standard constructor
Definition: UnitTestTool1.cxx:28
asg::UnitTestTool1::getPropertyString
virtual std::string getPropertyString() const override
get the integer property
Definition: UnitTestTool1.cxx:76
asg::UnitTestTool1::m_propertyString
std::string m_propertyString
the string property
Definition: UnitTestTool1.h:59
asg::UnitTestTool1
a tool used to unit test AnaToolHandle
Definition: UnitTestTool1.h:27
asg
Definition: DataHandleTestTool.h:28
asg::IUnitTestTool1
the interface for UnitTestTool1
Definition: IUnitTestTool1.h:19
asg::UnitTestTool1::isInitialized
virtual bool isInitialized() const override
get whether we have been initialized
Definition: UnitTestTool1.cxx:100
asg::UnitTestTool1::setPropertyInt
virtual void setPropertyInt(int val_property) override
get the integer property
Definition: UnitTestTool1.cxx:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IUnitTestTool1.h
asg::UnitTestTool1::m_isInitialized
bool m_isInitialized
whether initialize has been called
Definition: UnitTestTool1.h:55
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
asg::UnitTestTool1::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: UnitTestTool1.cxx:53
asg::UnitTestTool1::m_initializeFail
bool m_initializeFail
whether initialize should fail
Definition: UnitTestTool1.h:67
asg::UnitTestTool1::instance_counts
static int & instance_counts(const std::string &name)
the number of times the tool of the given name has been instantiated
Definition: UnitTestTool1.cxx:108
asg::UnitTestTool1::m_propertyInt
int m_propertyInt
the integer property
Definition: UnitTestTool1.h:63
asg::UnitTestTool1::getPropertyInt
virtual int getPropertyInt() const override
get the integer property
Definition: UnitTestTool1.cxx:84
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: UnitTestTool1.h:16
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
asg::UnitTestTool1::~UnitTestTool1
~UnitTestTool1()
standard destructor
Definition: UnitTestTool1.cxx:43
AsgTool.h
checker_macros.h
Define macros for attributes used to control the static checker.