Loading [MathJax]/extensions/tex2jax.js
ROOT
6.12/07
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
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
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
u
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
n
o
p
r
s
v
w
+
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
tutorials
pyroot
demoshelp.py
Go to the documentation of this file.
1
## \file
2
## \ingroup tutorial_pyroot
3
## \notebook
4
## Display demo help.
5
##
6
## \macro_code
7
##
8
## \author Wim Lavrijsen
9
10
import
os
11
from
ROOT
import
TCanvas, TPaveText
12
from
ROOT
import
gROOT
13
14
15
16
chelp =
TCanvas
(
'chelp'
,
'Help to run demos'
, 200, 10, 700, 500 )
17
18
welcome =
TPaveText
( .1, .8, .9, .97 )
19
welcome.AddText(
'Welcome to the ROOT demos'
)
20
welcome.SetTextFont( 32 )
21
welcome.SetTextColor( 4 )
22
welcome.SetFillColor( 24 )
23
welcome.Draw()
24
25
hdemo =
TPaveText
( .05, .05, .95, .7 )
26
hdemo.SetTextAlign( 12 )
27
hdemo.SetTextFont( 52 )
28
29
text =
"""- Run demo hsimple.py first. Then in any order
30
- Click left mouse button to execute one demo
31
- Click right mouse button to see the title of the demo
32
- Click on 'Close Bar' to exit from the demo menu
33
- Select 'File/Print' to print a Postscript view of the canvas
34
- You can execute a demo with the mouse or type commands
35
- During the demo (try on this canvas) you can:
36
.... Use left button to move/grow/etc objects
37
.... Use middle button to pop overlapping objects
38
.... Use right button to get an object sensitive pop-up
39
"""
40
for
line
in
text.split( os.linesep ):
41
hdemo.AddText( line )
42
43
hdemo.SetAllWith(
'....'
,
'color'
, 2 )
44
hdemo.SetAllWith(
'....'
,
'font'
, 72 )
45
hdemo.SetAllWith(
'....'
,
'size'
, 0.04 )
46
47
hdemo.Draw()
48
chelp.Update()
TCanvas
The Canvas class.
Definition:
TCanvas.h:31
TPaveText
A Pave (see TPave) with text, lines or/and boxes inside.
Definition:
TPaveText.h:21