Logo ROOT   6.14/05
Reference Guide
rootenv.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup Tutorials
3 /// Produce a picture of the ROOT environment.
4 ///
5 /// \macro_image
6 /// \macro_code
7 ///
8 /// \author Rene Brun
9 
10 {
11  gROOT->Reset();
12  c1 = new TCanvas("c1","ROOT Environment Canvas",720,840);
13  c1->Range(0,-0.25,19,29);
14  TPaveLabel title(3,27.1,15,28.7,"ROOT Environment and Tools");
15  title.SetFillColor(42);
16  title.SetTextColor(5);
17  title.SetTextFont(62);
18  title.Draw();
19 
20  //
21  TArrow ardash(2,15,2,3.5,0.015,"|>");
22  ardash.SetLineStyle(2);
23  ardash.SetFillColor(1);
24  ardash.Draw();
25  TLine l1(2.5,4.5,15.5,4.5);
26  l1.Draw();
27  l1.DrawLine(4.5,15,4.5,11);
28  l1.DrawLine(13,10,13,15.5);
29  l1.DrawLine(14,10,13,10);
30  l1.DrawLine(14,15.5,13,15.5);
31  TArrow ar(9,23,9,21.6,0.015,"|>");
32  ar.SetFillColor(1);
33  //
34  TPavesText UserChtml(0.5,0.5,4.5,3,5,"tr");
35  UserChtml.AddText("Files with hyperlinks");
36  TText *t1=UserChtml.AddText("*User.C.html");
37  TText *t2=UserChtml.AddText("*User.mac.html");
38  t1->SetTextColor(4);
39  t2->SetTextColor(4);
40  UserChtml.Draw();
41  ar.DrawArrow(2.5,4.5,2.5,3.5,0.015,"|>");
42  //
43  TPavesText UserTree(7,0.5,11,3,5,"tr");
44  UserTree.AddText("Dictionary");
45  UserTree.AddText("Inheritance graphs");
46  TText *t3=UserTree.AddText("*User_Tree.ps");
47  t3->SetTextColor(4);
48  UserTree.Draw();
49  ar.DrawArrow(9,5.5,9,3.5,0.015,"|>");
50  //
51  TPavesText Userhtml(13.5,0.5,17.5,3,5,"tr");
52  Userhtml.AddText("Class Description");
53  Userhtml.AddText("with references");
54  TText *t4=Userhtml.AddText("*User.html");
55  t4->SetTextColor(4);
56  Userhtml.Draw();
57  ar.DrawArrow(15.5,4.5,15.5,3.5,0.015,"|>");
58  //
59  TPavesText Macros(0.5,8,3.5,11,5,"tr");
60  Macros.AddText("Macros");
61  Macros.AddText("Log files");
62  TText *t5=Macros.AddText("*User.mac");
63  TText *t5a=Macros.AddText("*User.log");
64  t5->SetTextColor(4);
65  t5a->SetTextColor(4);
66  Macros.Draw();
67  //
68  TPavesText UserC(1,15,5,18,5,"tr");
69  UserC.AddText("C++ application");
70  UserC.AddText("source code");
71  TText *t6=UserC.AddText("*User.C");
72  t6->SetTextColor(4);
73  UserC.Draw();
74  ar.DrawArrow(4.5,11,5.8,11,0.015,"|>");
75  //
76  TPavesText Userh(6,23,12,26,5,"tr");
77  Userh.AddText("C++ header files");
78  TText *t7=Userh.AddText("*User.h");
79  t7->SetTextColor(4);
80  Userh.SetFillColor(11);
81  Userh.Draw();
82  ar.DrawArrow(9,23,9,21.6,0.015,"|>");
83  //
84  TPavesText UserUI(6.5,14,11.5,17,5,"tr");
85  UserUI.AddText("C++ code for");
86  UserUI.AddText("User Interface and I/O");
87  TText *t8=UserUI.AddText("*UserUI.C");
88  t8->SetTextColor(4);
89  UserUI.Draw();
90  ar.DrawArrow(9,18.5,9,17.3,0.015,"|>");
91  ar.DrawArrow(9,14,9,12.6,0.015,"|>");
92  //
93  TPavesText Usersl(14,14,17.5,17,5,"tr");
94  Usersl.AddText("User");
95  Usersl.AddText("Libraries");
96  TText *t9=Usersl.AddText("*User.sl");
97  t9->SetTextColor(4);
98  Usersl.Draw();
99  ar.DrawArrow(13,11,12.1,11,0.015,"|>");
100  //
101  TPavesText Rootlib(14,8.5,17.5,11.5,5,"tr");
102  Rootlib.AddText("Root Library");
103  Rootlib.AddText("and Includes");
104  TText *t10=Rootlib.AddText("Root.sl");
105  TText *t11=Rootlib.AddText("Root/include");
106  t10->SetTextColor(4);
107  t11->SetTextColor(4);
108  Rootlib.Draw();
109  //
110  TEllipse dict(9,20,3,1.5);
111  dict.SetFillColor(43);
112  dict.SetFillStyle(1001);
113  dict.SetLineColor(1);
114  dict.SetLineWidth(3);
115  dict.Draw();
116  TText gen(9,20.7,"rootcint");
117  gen.SetTextAlign(22);
118  gen.SetTextSize(0.025);
119  gen.Draw();
120  gen.DrawText(9,19.5,"ROOT compiler");
121  ar.DrawArrow(9,18.5,9,17.3,0.015,"|>");
122  //
123  TEllipse compiler(9,11,3,1.5);
124  compiler.SetFillColor(43);
125  compiler.SetFillStyle(1001);
126  compiler.SetLineColor(1);
127  compiler.SetLineWidth(3);
128  compiler.Draw();
129  TText gen2(9,11.4,"C++ compiler");
130  gen2.SetTextAlign(22);
131  gen2.SetTextSize(0.025);
132  gen2.Draw();
133  gen2.DrawText(9,10.3,"and Linker");
134  ar.DrawArrow(9,9.5,9,8.2,0.015,"|>");
135  //
136  TPaveText exe(6,5.5,12,8);
137  exe.SetFillColor(41);
138  exe.AddText("ROOT-based Application");
139  exe.AddText("Interactive or Batch");
140  TText *t12=exe.AddText("User.exe");
141  t12->SetTextColor(2);
142  exe.Draw();
143 
144  c1->Modified();
145  c1->Print("rootenv.ps");
146 }
return c1
Definition: legend1.C:41
#define gROOT
Definition: TROOT.h:410
Base class for several text objects.
Definition: TText.h:23
A Pave (see TPave) with a text centered in the Pave.
Definition: TPaveLabel.h:20
A simple line.
Definition: TLine.h:23
The Canvas class.
Definition: TCanvas.h:31
A Pave (see TPave) with text, lines or/and boxes inside.
Definition: TPaveText.h:21
auto * t1
Definition: textangle.C:20
Draw Ellipses.
Definition: TEllipse.h:24
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition: TAttText.h:43
Draw all kinds of Arrows.
Definition: TArrow.h:29
A PaveText (see TPaveText) with several stacked paves.
Definition: TPavesText.h:18