ATLAS Offline Software
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
AthPyEx::MyTool::setPython
void setPython(PyObject *self)
set Python binding
Definition:
MyTool.h:45
AthPyEx::MyTool::MyTool
MyTool(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition:
MyTool.h:28
AthPyEx::MyTool::m_A
int m_A
Definition:
MyTool.h:58
AthPyEx::MyTool::getA
int getA() const
accessor
Definition:
MyTool.cxx:52
AthPyEx
Definition:
MyCutClass.h:13
AthPyEx::MyTool::~MyTool
virtual ~MyTool()
destructor
Definition:
MyTool.h:37
AthPyEx::MyTool::operator=
MyTool & operator=(const MyTool &)
AthPyEx::MyTool::interfaceID
static const InterfaceID & interfaceID()
InterfaceID.
Definition:
MyTool.cxx:17
AthPyEx::MyObj
Definition:
MyObj.h:17
AthPyEx::MyTool::m_self
PyObject * m_self
Definition:
MyTool.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
AthPyEx::MyTool::setA
void setA(int a)
Definition:
MyTool.cxx:57
AthPyEx::MyTool
Definition:
MyTool.h:23
AthPyEx::MyTool::execute
StatusCode execute(MyObj *obj)
Definition:
MyTool.cxx:20
a
TList * a
Definition:
liststreamerinfos.cxx:10
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
AthAlgTool
Definition:
AthAlgTool.h:26
python.PyAthena.obj
obj
Definition:
PyAthena.py:132
PyObject
_object PyObject
Definition:
IPyComponent.h:26
Generated on Thu Nov 7 2024 21:22:40 for ATLAS Offline Software by
1.8.18