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