17from ROOT 
import TCanvas, TFile, TProfile, TNtuple, TH1F, TH2F
 
   18from ROOT 
import gROOT, gBenchmark, gRandom, gSystem
 
   22c1 = 
TCanvas( 
'c1', 
'Dynamic Filling Example', 200, 10, 700, 500 )
 
   36hfile = 
TFile( 
'py-hsimple.root', 
'RECREATE', 
'Demo ROOT file with histograms' )
 
   39hpx    = 
TH1F( 
'hpx', 
'This is the px distribution', 100, -4, 4 )
 
   40hpxpy  = 
TH2F( 
'hpxpy', 
'py vs px', 40, -4, 4, 40, -4, 4 )
 
   41hprof  = 
TProfile( 
'hprof', 
'Profile of pz versus px', 100, -4, 4, 0, 20 )
 
   42ntuple = 
TNtuple( 
'ntuple', 
'Demo ntuple', 
'px:py:pz:random:i' )
 
   54histos = [ 
'hpx', 
'hpxpy', 
'hprof', 
'ntuple' ]
 
   56   exec(
'%sFill = %s.Fill' % (name,name))
 
   61for i 
in range( 25000 ):
 
   78   if i 
and i%kUPDATE == 0:
 
   90   exec(
'del %sFill' % name)
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t SetFillColor
 
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
 
1-D histogram with a float per channel (see TH1 documentation)
 
2-D histogram with a float per channel (see TH1 documentation)
 
A simple TTree restricted to a list of float variables only.