The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MyAlgorithm.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 #ifndef GAUDIEXAMPLE_MYALGORITHM_H
12 #define GAUDIEXAMPLE_MYALGORITHM_H 1
13 
14 // Include files
15 #include "GaudiKernel/Algorithm.h"
16 #include "GaudiKernel/MsgStream.h"
17 #include <Gaudi/Property.h>
18 
19 // Forward references
20 class IMyTool;
21 
27 class MyAlgorithm : public Algorithm {
28 public:
31 
33  StatusCode initialize() override;
34  StatusCode execute() override;
35  StatusCode finalize() override;
36 
37  bool isClonable() const override { return true; }
38 
39 private:
40  Gaudi::Property<std::string> m_privateToolType{ this, "ToolWithName", "MyTool",
41  "Type of the tool to use (internal name is ToolWithName)" };
42  Gaudi::Property<bool> m_privateToolsOnly{ this, "PrivateToolsOnly", false, "Do not look for public tools." };
43 
44  IMyTool* m_privateTool = nullptr;
45  IMyTool* m_publicTool = nullptr;
46  IMyTool* m_privateGTool = nullptr;
47  IMyTool* m_publicGTool = nullptr;
48 
50 
52 };
53 
54 #endif // GAUDIEXAMPLE_MYALGORITHM_H
IMyOtherTool
Definition: IMyTool.h:39
MyAlgorithm::m_privateToolWithName
IMyTool * m_privateToolWithName
Definition: MyAlgorithm.h:49
Algorithm
Alias for backward compatibility.
Definition: Algorithm.h:58
Algorithm.h
MyAlgorithm
Definition: MyAlgorithm.h:27
IMyTool
Definition: IMyTool.h:22
MyAlgorithm::isClonable
bool isClonable() const override
Definition: MyAlgorithm.h:37
MyAlgorithm::m_publicTool
IMyTool * m_publicTool
Definition: MyAlgorithm.h:45
MyAlgorithm::m_privateToolsOnly
Gaudi::Property< bool > m_privateToolsOnly
Definition: MyAlgorithm.h:42
MyAlgorithm::m_privateGTool
IMyTool * m_privateGTool
Definition: MyAlgorithm.h:46
StatusCode
Definition: StatusCode.h:65
MyAlgorithm::m_publicGTool
IMyTool * m_publicGTool
Definition: MyAlgorithm.h:47
MyAlgorithm::m_privateOtherInterface
IMyOtherTool * m_privateOtherInterface
Definition: MyAlgorithm.h:51
MyAlgorithm::m_privateTool
IMyTool * m_privateTool
Definition: MyAlgorithm.h:44
MyAlgorithm::initialize
StatusCode initialize() override
Three mandatory member functions of any algorithm.
Definition: MyAlgorithm.cpp:24
MyAlgorithm::finalize
StatusCode finalize() override
Definition: MyAlgorithm.cpp:90
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101
MyAlgorithm::m_privateToolType
Gaudi::Property< std::string > m_privateToolType
Definition: MyAlgorithm.h:40
MyAlgorithm::execute
StatusCode execute() override
Definition: MyAlgorithm.cpp:73
Gaudi::Property< std::string >
Property.h
MsgStream.h