ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
PyAnalysis
PyAnalysisExamples
PyAnalysisExamples
MyTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef PYANALYSISEXAMPLES_MYTOOL_H
6
#define PYANALYSISEXAMPLES_MYTOOL_H
7
8
// Work around a compilation warning.
9
#ifdef _POSIX_C_SOURCE
10
# undef _POSIX_C_SOURCE
11
#endif
12
#ifdef _XOPEN_SOURCE
13
# undef _XOPEN_SOURCE
14
#endif
15
#include "Python.h"
16
#include "
AthenaBaseComps/AthAlgTool.h
"
17
18
namespace
AthPyEx
{
19
20
class
MyObj
;
21
22
class
MyTool
:
public
AthAlgTool
23
{
24
public
:
25
28
MyTool
(
const
std::string&
type
,
const
std::string& name,
29
const
IInterface* parent )
30
:
AthAlgTool
(
type
,name,parent),
31
m_A
(0),
32
m_self
(0)
33
{}
34
37
virtual
~MyTool
() {}
38
41
static
const
InterfaceID&
interfaceID
( ) ;
42
45
void
setPython
(
PyObject
*self)
46
{
47
m_self
=self;
48
}
49
50
StatusCode
execute
(
MyObj
*obj);
51
54
int
getA
()
const
;
55
void
setA
(
int
a
);
56
57
private
:
58
int
m_A
;
59
60
PyObject
*
m_self
;
61
62
MyTool
&
operator=
(
const
MyTool
&);
63
};
64
65
}
//> end namespace AthPyEx
66
67
#endif
68
69
AthAlgTool.h
PyObject
_object PyObject
Definition
IPyComponent.h:27
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthPyEx::MyObj
Definition
MyObj.h:17
AthPyEx::MyTool::getA
int getA() const
accessor
Definition
MyTool.cxx:48
AthPyEx::MyTool::execute
StatusCode execute(MyObj *obj)
Definition
MyTool.cxx:20
AthPyEx::MyTool::MyTool
MyTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition
MyTool.h:28
AthPyEx::MyTool::m_self
PyObject * m_self
Definition
MyTool.h:60
AthPyEx::MyTool::m_A
int m_A
Definition
MyTool.h:58
AthPyEx::MyTool::operator=
MyTool & operator=(const MyTool &)
AthPyEx::MyTool::setPython
void setPython(PyObject *self)
set Python binding
Definition
MyTool.h:45
AthPyEx::MyTool::interfaceID
static const InterfaceID & interfaceID()
InterfaceID.
Definition
MyTool.cxx:17
AthPyEx::MyTool::~MyTool
virtual ~MyTool()
destructor
Definition
MyTool.h:37
AthPyEx::MyTool::setA
void setA(int a)
Definition
MyTool.cxx:53
AthPyEx
Definition
MyCutClass.h:13
type
Generated on
for ATLAS Offline Software by
1.14.0