Geant4_10
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
source
examples
advanced
gammaray_telescope
gammaraytel.py
Go to the documentation of this file.
1
2
# Creating a memory-mapped tree
3
4
tree=tf.create()
5
6
# Creating a histogram factory mapped to the tree
7
8
hf=af.createHistogramFactory( tree )
9
10
# Open an existing HBook file
11
12
treeHBook=tf.create(
"gammaraytel.hbook"
,
"hbook"
, 1, 0 )
13
14
# Mounting the hbook tree under the master memory tree.
15
16
tree.mkdir(
"hbook"
)
17
tree.mount(
"/hbook"
, treeHBook,
"/"
)
18
19
# Retrieve histograms and load them into memory:
20
21
# Fetching the histograms from hbook
22
23
hE=tree.findH1D(
"/hbook/10"
)
24
hPl=tree.findH1D(
"/hbook/20"
)
25
hXZ=tree.findH2D(
"/hbook/30"
)
26
hYZ=tree.findH2D(
"/hbook/40"
)
27
28
# set plotter to 2*2 zones
29
#pl.createRegions(2,2)
30
#>>> NOTE! ONLY SINGLE REGION IN THIS VERSION!
31
32
# plot the histograms
33
34
pr = pl.currentRegion()
35
pr.plot(hE,
""
)
36
pl.refresh()
37
38
wait()
39
40
pr.clear()
41
pr.plot(hPl,
""
)
42
pl.refresh()
43
44
wait()
45
46
del hf
47
del tree
48
del treeHBook
49
exit()
50
51
52
53
54
55
56
57
Generated on Sat Dec 14 2013 14:32:58 for Geant4_10 by
1.8.5