Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
UnitTestService1.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 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>
15 
16 namespace asg
17 {
22 
23  struct UnitTestService1 : extends<AsgService, IUnitTestService1>
24  {
25  public:
27  UnitTestService1 (const std::string& name, ISvcLocator* pSvcLocator);
28 
31 
32  virtual StatusCode initialize () override;
33  virtual std::string getPropertyString () const override;
34  virtual int getPropertyInt () const override;
35  virtual void setPropertyInt (int val_property) override;
36  virtual bool isInitialized () const override;
37 
38  private:
40  bool m_isInitialized{false};
41 
43  Gaudi::Property<std::string> m_propertyString{this, "propertyString", {}, "the string property"};
44 
46  Gaudi::Property<int> m_propertyInt{this, "propertyInt", -7, "the integer property"};
47 
49  Gaudi::Property<bool> m_initializeFail{this, "initializeFail", false, "whether initialize should fail"};
50  };
51 }
52 
53 #endif
PropertyWrapper.h
AsgService.h
asg::UnitTestService1::getPropertyString
virtual std::string getPropertyString() const override
Definition: UnitTestService1.cxx:63
asg
Definition: DataHandleTestTool.h:28
asg::UnitTestService1::m_propertyString
Gaudi::Property< std::string > m_propertyString
the string property
Definition: UnitTestService1.h:43
asg::UnitTestService1::getPropertyInt
virtual int getPropertyInt() const override
Definition: UnitTestService1.cxx:71
asg::UnitTestService1::UnitTestService1
UnitTestService1(const std::string &name, ISvcLocator *pSvcLocator)
standard constructor
Definition: UnitTestService1.cxx:23
asg::UnitTestService1
a service used to unit test AnaToolHandle
Definition: UnitTestService1.h:24
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:32
asg::UnitTestService1::m_isInitialized
bool m_isInitialized
whether initialize has been called
Definition: UnitTestService1.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
asg::UnitTestService1::isInitialized
virtual bool isInitialized() const override
Definition: UnitTestService1.cxx:87
asg::UnitTestService1::initialize
virtual StatusCode initialize() override
Definition: UnitTestService1.cxx:40
asg::UnitTestService1::m_initializeFail
Gaudi::Property< bool > m_initializeFail
whether initialize should fail
Definition: UnitTestService1.h:49
asg::UnitTestService1::setPropertyInt
virtual void setPropertyInt(int val_property) override
Definition: UnitTestService1.cxx:79
asg::UnitTestService1::m_propertyInt
Gaudi::Property< int > m_propertyInt
the integer property
Definition: UnitTestService1.h:46
IUnitTestService1.h