ATLAS Offline Software
UnitTestService1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef ASG_TOOLS__UNIT_TEST_SERVICE1_H
10 #define ASG_TOOLS__UNIT_TEST_SERVICE1_H
11 
12 #include <AsgServices/AsgService.h>
14 
17 
18 namespace asg
19 {
24 
25  struct UnitTestService1 : extends<AsgService, IUnitTestService1>
26  {
28  public:
29  UnitTestService1 (const std::string& name, ISvcLocator* pSvcLocator);
30 
32  public:
34 
35  public:
36  StatusCode initialize () override;
37 
38  public:
39  virtual std::string getPropertyString () const override;
40 
41  public:
42  virtual int getPropertyInt () const override;
43 
44  public:
45  virtual void setPropertyInt (int val_property) override;
46 
47  public:
48  virtual bool isInitialized () const override;
49 
51  public:
52  bool m_isInitialized = false;
53 
55  public:
56  std::string m_propertyString;
57 
59  public:
60  int m_propertyInt = -7;
61 
63  public:
64  bool m_initializeFail = false;
65 
68  public:
69  static int& instance_counts (const std::string& name);
70  };
71 }
72 
73 #endif
AsgService.h
asg::UnitTestService1::getPropertyString
virtual std::string getPropertyString() const override
Definition: UnitTestService1.cxx:77
asg
Definition: DataHandleTestTool.h:28
asg::UnitTestService1::getPropertyInt
virtual int getPropertyInt() const override
Definition: UnitTestService1.cxx:85
asg::UnitTestService1::UnitTestService1
UnitTestService1(const std::string &name, ISvcLocator *pSvcLocator)
standard constructor
Definition: UnitTestService1.cxx:29
asg::UnitTestService1::instance_counts
static int & instance_counts(const std::string &name)
the number of times the service of the given name has been instantiated
Definition: UnitTestService1.cxx:109
asg::UnitTestService1::m_initializeFail
bool m_initializeFail
whether initialize should fail
Definition: UnitTestService1.h:64
asg::UnitTestService1
a service used to unit test AnaToolHandle
Definition: UnitTestService1.h:26
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: UnitTestService1.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
asg::UnitTestService1::~UnitTestService1
~UnitTestService1()
standard destructor
Definition: UnitTestService1.cxx:44
asg::UnitTestService1::m_isInitialized
bool m_isInitialized
whether initialize has been called
Definition: UnitTestService1.h:52
asg::UnitTestService1::m_propertyInt
int m_propertyInt
the integer property
Definition: UnitTestService1.h:60
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
asg::UnitTestService1::isInitialized
virtual bool isInitialized() const override
Definition: UnitTestService1.cxx:101
asg::UnitTestService1::m_propertyString
std::string m_propertyString
the string property
Definition: UnitTestService1.h:56
asg::UnitTestService1::initialize
StatusCode initialize() override
Definition: UnitTestService1.cxx:54
asg::UnitTestService1::setPropertyInt
virtual void setPropertyInt(int val_property) override
Definition: UnitTestService1.cxx:93
checker_macros.h
Define macros for attributes used to control the static checker.
IUnitTestService1.h