The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
MyTool.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13// Include files
14#include "IMyTool.h"
15#include <GaudiKernel/AlgTool.h>
16
23class MyTool : public extends<AlgTool, IMyTool, IMyOtherTool> {
24public:
26 using extends::extends;
27
29 const std::string& message() const override;
30 void doIt() const override;
31 // IMyOtherTool interface
32 void doItAgain() const override;
33
35 StatusCode initialize() override;
36 StatusCode finalize() override;
37
39 ~MyTool() override;
40
41private:
43 Gaudi::Property<int> m_int{ this, "Int", 100 };
44 Gaudi::Property<double> m_double{ this, "Double", 100. };
45 Gaudi::Property<std::string> m_string{ this, "String", "hundred" };
46 Gaudi::Property<bool> m_bool{ this, "Bool", true };
47};
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
This is an interface class for a example tool.
Definition MyTool.h:23
~MyTool() override
Standard destructor.
Definition MyTool.cpp:68
StatusCode initialize() override
Overriding initialize and finalize.
Definition MyTool.cpp:47
const std::string & message() const override
IMyTool interface.
Definition MyTool.cpp:24
void doItAgain() const override
Definition MyTool.cpp:40
void doIt() const override
Definition MyTool.cpp:32
Gaudi::Property< std::string > m_string
Definition MyTool.h:45
Gaudi::Property< double > m_double
Definition MyTool.h:44
StatusCode finalize() override
Definition MyTool.cpp:60
Gaudi::Property< int > m_int
Properties.
Definition MyTool.h:43
Gaudi::Property< bool > m_bool
Definition MyTool.h:46
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
Base class used to extend a class implementing other interfaces.
Definition extends.h:19