ROOT 2.21/07

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Thu Mar 11 1999 - 14:00:28 MET


Hi,
I forgot to mention that two tutorial files are wrong.
Please find attached modified version.
Best regards,
Jacek.


{
//
// This macro generates a Controlbar menu: To see the output, click begin_html <a href="gif/demos.gif" >here</a> end_html
// To execute an item, click with the left mouse button.
// To see the HELP of a button, click on the right mouse button.

   gROOT->Reset();
   bar = new TControlBar("vertical", "Demos");

   bar->AddButton("Help on Demos",".x demoshelp.C", "Click Here For Help on Running the Demos");
   bar->AddButton("browser",     "{b = new TBrowser(\"Browser\");}", "Start the ROOT Browser");
   bar->AddButton("framework",   ".x framework.C", "An Example of Object Oriented User Interface");
   bar->AddButton("first",       ".x first.C",     "An Example of Slide with Root");
   bar->AddButton("hsimple",     ".x hsimple.C",   "An Example Creating Histograms/Ntuples on File");
   bar->AddButton("hsum",        ".x hsum.C",      "Filling Histograms and Some Graphics Options");
   bar->AddButton("formula1",    ".x formula1.C",  "Simple Formula and Functions");
   bar->AddButton("surfaces",    ".x surfaces.C",  "Surface Drawing Options");
   bar->AddButton("fillrandom",  ".x fillrandom.C","Histograms with Random Numbers from a Function");
   bar->AddButton("fit1",        ".x fit1.C",      "A Simple Fitting Example");
   bar->AddButton("multifit",    ".x multifit.C",  "Fitting in Subranges of Histograms");
   bar->AddButton("h1draw",      ".x h1draw.C",    "Drawing Options for 1D Histograms");
   bar->AddButton("graph",       ".x graph.C",     "Example of a Simple Graph");
   bar->AddButton("gerrors",     ".x gerrors.C",   "Example of a Graph with Error Bars");
   bar->AddButton("tornado",     ".x tornado.C",   "Examples of 3-D PolyMarkers");
   bar->AddButton("shapes",      ".x shapes.C",    "The Geometry Shapes");
   bar->AddButton("geometry",    ".x geometry.C",  "Creation of the NA49 Geometry File");
   bar->AddButton("na49view",    ".x na49view.C",  "Two Views of the NA49 Detector Geometry");
   bar->AddButton("file",        ".x file.C",      "The ROOT File Format");
   bar->AddButton("fildir",      ".x fildir.C",    "The ROOT File, Directories and Keys");
   bar->AddButton("tree",        ".x tree.C",      "The Tree Data Structure");
   bar->AddButton("ntuple1",     ".x ntuple1.C",   "Ntuples and Selections");
   bar->AddButton("rootmarks",   ".x rootmarks.C", "Prints an Estimated ROOTMARKS for Your Machine");
   bar->Show();
   gROOT->SaveContext();
}



{
   gROOT->Reset();
   TCanvas *nut = new TCanvas("nut", "FirstSession",100,10,700,900);
   nut->Range(0,0,20,24);
   nut->SetFillColor(10);
   nut->SetBorderSize(2);

   TPaveLabel *pl = new TPaveLabel(3,22,17,23.7,"My first ROOT interactive session","br");
   pl->SetFillColor(18);
   pl->SetTextSize(0.7);
   pl->Draw();

   TText t(0,0,"a");
   t.SetTextFont(62);
   t.SetTextSize(0.025);
   t.SetTextAlign(12);
   t.DrawText(2,20.3,"ROOT is based on CINT, a powerful C/C++ interpreter.");
   t.DrawText(2,19.3,"Blocks of lines can be entered within {...}.");
   t.DrawText(2,18.3,"Previous typed lines can be recalled.");

   t.SetTextFont(72);
   t.SetTextSize(0.026);
   t.DrawText(3,17,"Root >  float x=5; float y=7;");
   t.DrawText(3,16,"Root >  x*sqrt(y)");
   t.DrawText(3,14,"Root >  for (int i=2;i<7;i++) printf(\"sqrt(%d) = %f\",i,sqrt(i));");
   t.DrawText(3,10,"Root >  TF1 f1(\"f1\",\"sin(x)/x\",0,10)");
   t.DrawText(3, 9,"Root >  f1.Draw()");
   t.SetTextFont(81);
   t.SetTextSize(0.018);
   t.DrawText(4,15,"(double)1.322875655532e+01");
   t.DrawText(4,13.3,"sqrt(2) = 1.414214");
   t.DrawText(4,12.7,"sqrt(3) = 1.732051");
   t.DrawText(4,12.1,"sqrt(4) = 2.000000");
   t.DrawText(4,11.5,"sqrt(5) = 2.236068");
   t.DrawText(4,10.9,"sqrt(6) = 2.449490");

   TPad *pad = new TPad("pad","pad",.2,.05,.8,.35);
   pad->Draw();
   pad->cd();
   pad->SetGrid();
   TF1 f1("f1","sin(x)/x",0,10);
   f1.Draw();

   nut.cd();
  //--signature
   TText sig(.2,.2,"/user/brun/root/aihep/first.C");
   sig.SetTextFont(72);
   sig.SetTextSize(0.020);
   sig.Draw();

   nut->Modified();
   nut->Print("first.ps");
   nut->cd();
   nut->Update();
}



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:30 MET