Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:20:01

0001 
0002 # Creating a memory-mapped tree
0003 
0004 tree=tf.create()                                                 
0005 
0006 # Creating a histogram factory mapped to the tree
0007 
0008 hf=af.createHistogramFactory( tree )                             
0009 
0010 # Open an existing HBook file
0011 
0012 treeHBook=tf.create("gammaraytel.hbook", "hbook", 1, 0 )              
0013 
0014 # Mounting the hbook tree under the master memory tree.
0015 
0016 tree.mkdir( "hbook" )
0017 tree.mount( "/hbook", treeHBook, "/" )
0018 
0019 # Retrieve histograms and load them into memory:
0020 
0021 # Fetching the histograms from hbook
0022 
0023 hE=tree.findH1D( "/hbook/10" )
0024 hPl=tree.findH1D( "/hbook/20" )
0025 hXZ=tree.findH2D("/hbook/30")
0026 hYZ=tree.findH2D("/hbook/40")
0027 
0028 # set plotter to 2*2 zones
0029 #pl.createRegions(2,2)
0030 #>>> NOTE! ONLY SINGLE REGION IN THIS VERSION!
0031 
0032 # plot the histograms
0033 
0034 pr = pl.currentRegion()
0035 pr.plot(hE,"")
0036 pl.refresh()
0037 
0038 wait()
0039 
0040 pr.clear()
0041 pr.plot(hPl,"")
0042 pl.refresh()
0043 
0044 wait()
0045 
0046 del hf
0047 del tree
0048 del treeHBook
0049 exit()
0050 
0051 
0052 
0053 
0054 
0055 
0056 
0057