ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
framework.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphics
3 /// An example with basic graphics illustrating the Object Oriented User Interface of ROOT.
4 ///
5 /// \macro_image
6 /// \macro_code
7 ///
8 /// \author Rene Brun
9 
10 void framework() {
11  TCanvas *c1 = new TCanvas("c1","The ROOT Framework",200,10,700,500);
12  c1->Range(0,0,19,12);
13  //
14  TPavesText *rootf = new TPavesText(0.4,0.6,18,2.3,20,"tr");
15  rootf->AddText("ROOT Framework");
16  rootf->SetFillColor(42);
17  rootf->Draw();
18  //
19  TPavesText *eventg = new TPavesText(0.99,2.66,3.29,5.67,4,"tr");
20  eventg->SetFillColor(38);
21  eventg->AddText("Event");
22  eventg->AddText("Generators");
23  eventg->Draw();
24  //
25  TPavesText *simul = new TPavesText(3.62,2.71,6.15,7.96,7,"tr");
26  simul->SetFillColor(41);
27  simul->AddText("Detector");
28  simul->AddText("Simulation");
29  simul->Draw();
30  //
31  TPavesText *recon = new TPavesText(6.56,2.69,10.07,10.15,11,"tr");
32  recon->SetFillColor(48);
33  recon->AddText("Event");
34  recon->AddText("Reconstruction");
35  recon->Draw();
36  //
37  TPavesText *daq = new TPavesText(10.43,2.74,14.0,10.81,11,"tr");
38  daq->AddText("Data");
39  daq->AddText("Acquisition");
40  daq->Draw();
41  //
42  TPavesText *anal = new TPavesText(14.55,2.72,17.9,10.31,11,"tr");
43  anal->SetFillColor(42);
44  anal->AddText("Data");
45  anal->AddText("Analysis");
46  anal->Draw();
47  c1->Update();
48 }
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
Definition: TPaveText.cxx:160
virtual void Draw(Option_t *option="")
Draw this pavestext with its current attributes.
Definition: TPavesText.cxx:79
virtual void SetFillColor(Color_t fcolor)
Definition: TAttFill.h:50
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
Definition: TPad.cxx:4623
The Canvas class.
Definition: TCanvas.h:48
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2179
A PaveText (see TPaveText) with several stacked paves.
Definition: TPavesText.h:28