Loading [MathJax]/extensions/tex2jax.js
ROOT
6.10/09
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
<
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
w
x
+
Enumerations
a
e
f
g
m
p
t
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
v
w
x
y
z
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
bindings
pyroot
inc
TPyReturn.h
Go to the documentation of this file.
1
// @(#)root/pyroot:$Id$
2
// Author: Wim Lavrijsen May 2004
3
4
#ifndef ROOT_TPyReturn
5
#define ROOT_TPyReturn
6
7
//////////////////////////////////////////////////////////////////////////////
8
// //
9
// TPyReturn //
10
// //
11
// Morphing return type from evaluating python expressions. //
12
// //
13
//////////////////////////////////////////////////////////////////////////////
14
15
16
// ROOT
17
#include "
Rtypes.h
"
18
19
// Python
20
struct
_object;
21
typedef
_object
PyObject
;
22
23
24
class
TPyReturn
{
25
public
:
26
TPyReturn
();
27
TPyReturn
(
PyObject
* pyobject );
28
TPyReturn
(
const
TPyReturn
& );
29
TPyReturn
&
operator=
(
const
TPyReturn
& );
30
virtual
~TPyReturn
();
31
32
// conversions to standard types, may fail if unconvertible
33
operator
char
*()
const
;
34
operator
const
char
*()
const
;
35
operator
Char_t
()
const
;
36
37
operator
Long_t
()
const
;
38
operator
Int_t
()
const
{
return
(
Int_t
)
operator
Long_t
(); }
39
operator
Short_t
()
const
{
return
(
Short_t
)
operator
Long_t
(); }
40
41
operator
ULong_t
()
const
;
42
operator
UInt_t
()
const
{
return
(
UInt_t
)
operator
ULong_t
(); }
43
operator
UShort_t
()
const
{
return
(
UShort_t
)
operator
ULong_t
(); }
44
45
operator
Double_t
()
const
;
46
operator
Float_t
()
const
{
return
(
Float_t
)
operator
Double_t
(); }
47
48
// used for both TObject and PyObject conversions
49
operator
void
*()
const
;
50
51
template
<
class
T>
52
operator
T
*()
const
{
return
(
T
*)(
void
*)*
this
; }
53
54
// used strictly for PyObject conversions
55
operator
PyObject
*()
const
;
56
57
ClassDef
(
TPyReturn
,1)
//Python morphing return object
58
59
private
:
60
PyObject
*
fPyObject
;
//! actual python object
61
};
62
63
#endif
Rtypes.h
Float_t
float Float_t
Definition:
RtypesCore.h:53
TPyReturn::operator=
TPyReturn & operator=(const TPyReturn &)
Assignment operator. Applies python object reference counting.
Definition:
TPyReturn.cxx:74
ROOT::Math::Chebyshev::T
double T(double x)
Definition:
ChebyshevPol.h:34
UShort_t
unsigned short UShort_t
Definition:
RtypesCore.h:36
TPyReturn::TPyReturn
TPyReturn()
Definition:
TPyReturn.cxx:42
Int_t
int Int_t
Definition:
RtypesCore.h:41
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:297
TPyReturn::~TPyReturn
virtual ~TPyReturn()
Destructor. Reference counting for the held python object is in effect.
Definition:
TPyReturn.cxx:88
TPyReturn
Definition:
TPyReturn.h:24
PyObject
_object PyObject
Definition:
TPyReturn.h:20
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
Short_t
short Short_t
Definition:
RtypesCore.h:35
Long_t
long Long_t
Definition:
RtypesCore.h:50
Double_t
double Double_t
Definition:
RtypesCore.h:55
ULong_t
unsigned long ULong_t
Definition:
RtypesCore.h:51
TPyReturn::fPyObject
PyObject * fPyObject
Definition:
TPyReturn.h:60
Char_t
char Char_t
Definition:
RtypesCore.h:29
PyObject
_object PyObject
Definition:
TPyArg.h:20