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