source: trunk/examples/advanced/gammaray_telescope/gammaraytel.py @ 1314

Last change on this file since 1314 was 807, checked in by garnier, 16 years ago

update

File size: 929 bytes
Line 
1
2# Creating a memory-mapped tree
3
4tree=tf.create()                                                 
5
6# Creating a histogram factory mapped to the tree
7
8hf=af.createHistogramFactory( tree )                             
9
10# Open an existing HBook file
11
12treeHBook=tf.create("gammaraytel.hbook", "hbook", 1, 0 )             
13
14# Mounting the hbook tree under the master memory tree.
15
16tree.mkdir( "hbook" )
17tree.mount( "/hbook", treeHBook, "/" )
18
19# Retrieve histograms and load them into memory:
20
21# Fetching the histograms from hbook
22
23hE=tree.findH1D( "/hbook/10" )
24hPl=tree.findH1D( "/hbook/20" )
25hXZ=tree.findH2D("/hbook/30")
26hYZ=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
34pr = pl.currentRegion()
35pr.plot(hE,"")
36pl.refresh()
37
38wait()
39
40pr.clear()
41pr.plot(hPl,"")
42pl.refresh()
43
44wait()
45
46del hf
47del tree
48del treeHBook
49exit()
50
51
52
53
54
55
56
57
Note: See TracBrowser for help on using the repository browser.