Logo ROOT   6.08/07
Reference Guide
Files
PyRoot tutorials

Examples showing how to write python script for Root.

Files

file  benchmarks.py
 Run benchmarks macros.
 
file  demo.py
 To run, do an "execfile( '<path-to>/demo.py' )" or "python <path-to>/demo.py".
 
file  demoshelp.py
  View in nbviewer Open in SWAN Display demo help.
 
file  DynamicSlice.py
  View in nbviewer Open in SWAN Example of function called when a mouse event occurs in a pad.
 
file  fildir.py
  View in nbviewer Open in SWAN This macro displays the ROOT Directory data structure
 
file  file.py
  View in nbviewer Open in SWAN This macro displays the physical ROOT file structure
 
file  fillrandom.py
  View in nbviewer Open in SWAN FillRandom example
 
file  first.py
  View in nbviewer Open in SWAN My first PyROOT interactive session
 
file  fit1.py
  View in nbviewer Open in SWAN Fit example.
 
file  formula1.py
  View in nbviewer Open in SWAN TF1 example.
 
file  framework.py
  View in nbviewer Open in SWAN The ROOT Framework
 
file  geometry.py
  View in nbviewer Open in SWAN Geometry
 
file  gerrors.py
  View in nbviewer Open in SWAN A Simple Graph with error bars
 
file  graph.py
  View in nbviewer Open in SWAN A Simple Graph Example
 
file  gui_ex.py
 A Simple GUI Example.
 
file  h1draw.py
  View in nbviewer Open in SWAN A Simple histogram drawing example
 
file  hsimple.py
  View in nbviewer Open in SWAN This program creates :
 
file  hsum.py
  View in nbviewer Open in SWAN Simple example illustrating how to use the C++ interpreter
 
file  mrt.py
  View in nbviewer Open in SWAN Build ROOT Ntuple from other source.
 
file  multifit.py
  View in nbviewer Open in SWAN Example showing how to fit in a sub-range of an histogram An histogram is created and filled with the bin contents and errors defined in the table below.
 
file  na49geomfile.py
 Before executing this macro, the file makegeometry.C must have been executed.
 
file  na49view.py
 This macro generates two views of the NA49 detector.
 
file  na49visible.py
 Set visibility attributes for the NA49 geometry Set Shape attributes.
 
file  ntuple1.py
  View in nbviewer Open in SWAN Ntuple drawing example.
 
file  numberEntry.py
 
file  parse_CSV_file_with_TTree_ReadStream.py
 This function provides an example of how one might massage a csv data file to read into a ROOT TTree via TTree::ReadStream.
 
file  qtexample.py
 Qt example.
 
file  ratioplot.py
  View in nbviewer Open in SWAN Display two histograms and their ratio.
 
file  rootmarks.py
 Prints a summary of all ROOT benchmarks (must be run before) The ROOTMARK number printed is by reference to a Pentium IV 2.4 Ghz (with 512 MBytes memory and 120 GBytes IDE disk) taken by definition as 600 ROOTMARKS in batch mode in executing python benchmarks.py.
 
file  shapes.py
  View in nbviewer Open in SWAN Draw the geometry using the x3d viewver.
 
file  staff.py
  View in nbviewer Open in SWAN example of macro to read data from an ascii file and create a root file with a Tree.
 
file  surfaces.py
  View in nbviewer Open in SWAN Surfaces example
 
file  test.py
  View in nbviewer Open in SWAN
 
file  tornado.py
 Tornado example.
 
file  tree.py
  View in nbviewer Open in SWAN This macro displays the Tree data structures
 
file  zdemo.py
  View in nbviewer Open in SWAN This macro is an example of graphs in log scales with annotations.