FillRandom example
fillrandom: Real Time = 0.37 seconds Cpu Time = 0.31 seconds
from ROOT import TCanvas, TPad, TFormula, TF1, TPaveLabel, TH1F, TFile
from ROOT import gROOT, gBenchmark
c1 =
TCanvas(
'c1',
'The FillRandom example', 200, 10, 700, 900 )
pad1 =
TPad(
'pad1',
'The pad with the function', 0.05, 0.50, 0.95, 0.95, 21 )
pad2 =
TPad(
'pad2',
'The pad with the histogram', 0.05, 0.05, 0.95, 0.45, 21 )
form1 =
TFormula(
'form1',
'abs(sin(x)/x)' )
sqroot =
TF1(
'sqroot',
'x*gaus(0) + [3]*form1', 0, 10 )
lfunction =
TPaveLabel( 5, 39, 9.8, 46,
'The sqroot function' )
h1f =
TH1F(
'h1f',
'Test random numbers', 200, 0, 10 )
myfile =
TFile(
'py-fillrandom.root',
'RECREATE' )
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)
The most important graphics class in the ROOT system.
A Pave (see TPave) with a text centered in the Pave.
- Author
- Wim Lavrijsen
Definition in file fillrandom.py.