Logo ROOT   6.16/01
Reference Guide
demos.C
Go to the documentation of this file.
1/// \file
2/// \ingroup Tutorials
3/// This macro shows a control bar to run some of the ROOT tutorials.
4/// To execute an item, click with the left mouse button.
5///
6/// \macro_code
7///
8/// \author Rene Brun
9
10{
11 gROOT->Reset();
12
13 //Add the tutorials directory to the macro path
14 //This is necessary in case this macro is executed from another user directory
15 TString dirName = gSystem->UnixPathName(__FILE__);
16 dirName.ReplaceAll("demos.C","");
17 dirName.ReplaceAll("/./","");
18 const char *current = gROOT->GetMacroPath();
19 gROOT->SetMacroPath(Form("%s:%s",current,dirName.Data()));
20
21 TControlBar *bar = new TControlBar("vertical", "Demos",10,10);
22 bar->AddButton("Help Demos",".x demoshelp.C", "Click Here For Help on Running the Demos");
23 bar->AddButton("browser", "new TBrowser;", "Start the ROOT Browser");
24 bar->AddButton("framework", ".x graphics/framework.C","An Example of Object Oriented User Interface");
25 bar->AddButton("first", ".x graphics/first.C", "An Example of Slide with Root");
26 bar->AddButton("hsimple", ".x hsimple.C", "An Example Creating Histograms/Ntuples on File");
27 bar->AddButton("hsum", ".x hist/hsum.C", "Filling Histograms and Some Graphics Options");
28 bar->AddButton("formula1", ".x graphics/formula1.C","Simple Formula and Functions");
29 bar->AddButton("surfaces", ".x graphs/surfaces.C", "Surface Drawing Options");
30 bar->AddButton("fillrandom",".x hist/fillrandom.C", "Histograms with Random Numbers from a Function");
31 bar->AddButton("fit1", ".x fit/fit1.C", "A Simple Fitting Example");
32 bar->AddButton("multifit", ".x fit/multifit.C", "Fitting in Subranges of Histograms");
33 bar->AddButton("h1draw", ".x hist/h1draw.C", "Drawing Options for 1D Histograms");
34 bar->AddButton("graph", ".x graphs/graph.C", "Example of a Simple Graph");
35 bar->AddButton("gerrors", ".x graphs/gerrors.C", "Example of a Graph with Error Bars");
36 bar->AddButton("tornado", ".x graphics/tornado.C", "Examples of 3-D PolyMarkers");
37 bar->AddButton("shapes", ".x geom/shapes.C", "The Geometry Shapes");
38 bar->AddButton("geometry", ".x geom/geometry.C", "Creation of the NA49 Geometry File");
39 bar->AddButton("na49view", ".x geom/na49view.C", "Two Views of the NA49 Detector Geometry");
40 bar->AddButton("file", ".x io/file.C", "The ROOT File Format");
41 bar->AddButton("fildir", ".x io/fildir.C", "The ROOT File, Directories and Keys");
42 bar->AddButton("tree", ".x tree/tree.C", "The Tree Data Structure");
43 bar->AddButton("ntuple1", ".x tree/ntuple1.C", "Ntuples and Selections");
44 bar->AddButton("rootmarks", ".x rootmarks.C", "Prints an Estimated ROOTMARKS for Your Machine");
45 bar->SetButtonWidth(90);
46 bar->Show();
47 gROOT->SaveContext();
48}
#define gROOT
Definition: TROOT.h:410
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
Definition: TSystem.h:540
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:22
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:687
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
Definition: TSystem.cxx:1053
static constexpr double bar