Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
archi.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_graphics
3/// \notebook
4/// This macro displays the ROOT architecture.
5///
6/// \macro_image
7/// \macro_code
8///
9/// \author Rene Brun
10
11void archi() {
12 TCanvas *c1 = new TCanvas("c1","Dictionary Architecture",20,10,750,930);
13 c1->SetBorderSize(0);
14 c1->Range(0,0,20.5,26);
15
16
17 TPaveLabel *title = new TPaveLabel(4,24,16,25.5,c1->GetTitle());
18 title->SetFillColor(46);
19 title->Draw();
20
21 TPavesText *dll = new TPavesText(0.5,19,4.5,23,5,"tr");
22 dll->SetFillColor(39);
23 dll->SetTextSize(0.023);
24 dll->AddText(" ");
25 dll->AddText("Dynamically");
26 dll->AddText("Linked");
27 dll->AddText("Libraries");
28 dll->Draw();
29 TPaveLabel *dlltitle = new TPaveLabel(1.5,22.6,3.5,23.3,"DLLs");
30 dlltitle->SetFillColor(28);
31 dlltitle->Draw();
32
33 TPavesText *cpp = new TPavesText(5.5,19,9.5,23,5,"tr");
34 cpp->SetTextSize(0.023);
35 cpp->AddText(" ");
36 cpp->AddText("Commented");
37 cpp->AddText("Header");
38 cpp->AddText("Files");
39 cpp->Draw();
40 TPaveLabel *cpptitle = new TPaveLabel(6.5,22.6,8.5,23.3,"C++");
41 cpptitle->SetFillColor(28);
42 cpptitle->Draw();
43
44 TPavesText *odl = new TPavesText(10.5,19,14.5,23,5,"tr");
45 odl->SetTextSize(0.023);
46 odl->AddText(" ");
47 odl->AddText("Objects");
48 odl->AddText("Description");
49 odl->AddText("Files");
50 odl->Draw();
51 TPaveLabel *odltitle = new TPaveLabel(11.5,22.6,13.5,23.3,"ODL");
52 odltitle->SetFillColor(28);
53 odltitle->Draw();
54
55 TPavesText *idl = new TPavesText(15.5,19,19.5,23,5,"tr");
56 idl->SetTextSize(0.023);
57 idl->AddText(" ");
58 idl->AddText("Interface");
59 idl->AddText("Definition");
60 idl->AddText("Language");
61 idl->Draw();
62 TPaveLabel *idltitle = new TPaveLabel(16.5,22.6,18.5,23.3,"IDL");
63 idltitle->SetFillColor(28);
64 idltitle->Draw();
65
66 TWbox *p1 = new TWbox(7.8,10,13.2,17,11,12,1);
67 p1->Draw();
68 TText *pro1 = new TText(10.5,15.8,"Process 1");
69 pro1->SetTextAlign(21);
70 pro1->SetTextSize(0.03);
71 pro1->Draw();
72 TPaveText *p1dict = new TPaveText(8.8,13.8,12.2,15.6);
73 p1dict->SetTextSize(0.023);
74 p1dict->AddText("Dictionary");
75 p1dict->AddText("in memory");
76 p1dict->Draw();
77 TPavesText *p1object = new TPavesText(8.6,10.6,12.1,13.0,5,"tr");
78 p1object->SetTextSize(0.023);
79 p1object->AddText("Objects");
80 p1object->AddText("in memory");
81 p1object->Draw();
82 TWbox *p2 = new TWbox(15.5,10,20,17,11,12,1);
83 p2->Draw();
84 TText *pro2 = new TText(17.75,15.8,"Process 2");
85 pro2->SetTextAlign(21);
86 pro2->SetTextSize(0.03);
87 pro2->Draw();
88 TPaveText *p2dict = new TPaveText(16,13.8,19.5,15.6);
89 p2dict->SetTextSize(0.023);
90 p2dict->AddText("Dictionary");
91 p2dict->AddText("in memory");
92 p2dict->Draw();
93 TPavesText *p2object = new TPavesText(16.25,10.6,19.25,13.0,5,"tr");
94 p2object->SetTextSize(0.023);
95 p2object->AddText("Objects");
96 p2object->AddText("in memory");
97 p2object->Draw();
98 TWbox *stub1 = new TWbox(12.9,11.5,13.6,15.5,49,3,1);
99 stub1->Draw();
100 TText *tstub1 = new TText(13.25,13.5,"Stub1");
101 tstub1->SetTextSize(0.025);
102 tstub1->SetTextAlign(22);
103 tstub1->SetTextAngle(90);
104 tstub1->Draw();
105 TWbox *stub2 = new TWbox(15.1,11.5,15.8,15.5,49,3,1);
106 stub2->Draw();
107 TText *tstub2 = new TText(15.45,13.5,"Stub2");
108 tstub2->SetTextSize(0.025);
109 tstub2->SetTextAlign(22);
110 tstub2->SetTextAngle(-90);
111 tstub2->Draw();
112 TArrow *ar1 = new TArrow();
113 ar1->SetLineWidth(6);
114 ar1->SetLineColor(1);
115 ar1->SetFillStyle(1001);
116 ar1->SetFillColor(1);
117 ar1->DrawArrow(13.5,14,15,14,0.012,"|>");
118 ar1->DrawArrow(15.1,13,13.51,13,0.012,"|>");
119
120 TPaveText *cint = new TPaveText(1.0,15.0,8.0,17.5);
121 cint->SetFillColor(39);
122 cint->SetBorderSize(1);
123 cint->SetTextSize(0.023);
124 cint->AddText("C++ Interpreter");
125 cint->AddText("and program builder");
126 cint->Draw();
127 TPaveText *command = new TPaveText(2.5,13.4,8.0,14.5);
128 command->SetTextSize(0.023);
129 command->SetFillColor(39);
130 command->SetBorderSize(1);
131 command->AddText("Command Thread");
132 command->Draw();
133 TPavesText *view = new TPavesText(1.0,9.5,7.7,12.6,3,"tr");
134 view->SetFillColor(39);
135 view->SetBorderSize(2);
136 view->SetTextSize(0.023);
137 view->AddText("Viewer Thread(s)");
138 view->AddText("Picking");
139 view->AddText("Context Menus");
140 view->AddText("Inspector/Browser");
141 view->Draw();
142
143 TPavesText *web = new TPavesText(0.5,5,6,8.5,5,"tr");
144 web->SetTextSize(0.023);
145 web->AddText(" ");
146 web->AddText("generated");
147 web->AddText("automatically");
148 web->AddText("from dictionary");
149 web->AddText("and source files");
150 web->Draw();
151 TPaveLabel *webtitle = new TPaveLabel(1.5,8.1,5.0,8.8,"HTML Files");
152 webtitle->SetFillColor(28);
153 webtitle->Draw();
154
155 TPavesText *printed = new TPavesText(0.5,1.0,6,4,5,"tr");
156 printed->SetTextSize(0.023);
157 printed->AddText(" ");
158 printed->AddText("generated");
159 printed->AddText("automatically");
160 printed->AddText("from HTML files");
161 printed->Draw();
162 TPaveLabel *printedtitle = new TPaveLabel(1.5,3.6,5.0,4.3,"Printed Docs");
163 printedtitle->SetFillColor(28);
164 printedtitle->Draw();
165
166 TBox *box1 = new TBox(0.2,9.2,14.25,17.8);
167 box1->SetFillStyle(0);
168 box1->SetLineStyle(2);
169 box1->Draw();
170
171 TBox *box2 = new TBox(10.2,18.7,20.2,23.6);
172 box2->SetFillStyle(0);
173 box2->SetLineStyle(3);
174 box2->Draw();
175
176 ar1->DrawArrow(2.5,17.5,2.5,18.9,0.012,"|>");
177 ar1->DrawArrow(5.5,9.2,5.5,8.7,0.012,"|>");
178 ar1->DrawArrow(5.5,5,5.5,4.2,0.012,"|>");
179 ar1->DrawArrow(8.5,9.2,8.5,8.2,0.012,"|>");
180 ar1->DrawArrow(9.5,8.1,9.5,9.0,0.012,"|>");
181 ar1->DrawArrow(6.5,19,6.5,17.6,0.012,"|>");
182 ar1->DrawArrow(8.5,19,8.5,17.1,0.012,"|>");
183 ar1->DrawArrow(11.5,19,11.5,17.1,0.012,"|>");
184
185
186 TPaveLabel *ootitle = new TPaveLabel(10.5,7.8,17,8.8,"Objects Data Base");
187 ootitle->SetFillColor(28);
188 ootitle->Draw();
189
190 TPad *pio = new TPad("pio","pio",0.37,0.02,0.95,0.31,49);
191 pio->Range(0,0,12,8);
192 pio->Draw();
193 pio->cd();
194 TPavesText *raw = new TPavesText(0.5,1,2.5,6,7,"tr");
195 raw->Draw();
196 TPavesText *dst1 = new TPavesText(4,1,5,3,7,"tr");
197 dst1->Draw();
198 TPavesText *dst2 = new TPavesText(6,1,7,3,7,"tr");
199 dst2->Draw();
200 TPavesText *dst3 = new TPavesText(4,4,5,6,7,"tr");
201 dst3->Draw();
202 TPavesText *dst4 = new TPavesText(6,4,7,6,7,"tr");
203 dst4->Draw();
204 Float_t xlow = 8.5;
205 Float_t ylow = 1;
206 Float_t dx = 0.5;
207 Float_t dy = 0.5;
208 for (Int_t j=1;j<9;j++) {
209 Float_t y0 = ylow + (j-1)*0.7;
210 Float_t y1 = y0 + dy;
211 for (Int_t i=1;i<5;i++) {
212 Float_t x0 = xlow +(i-1)*0.6;
213 Float_t x1 = x0 + dx;
214 TPavesText *anal = new TPavesText(x0,y0,x1,y1,7,"tr");
215 anal->Draw();
216 }
217 }
218 TText *daq = new TText();
219 daq->SetTextSize(0.07);
220 daq->SetTextAlign(22);
221 daq->DrawText(1.5,7.3,"DAQ");
222 daq->DrawText(6,7.3,"DST");
223 daq->DrawText(10.,7.3,"Physics Analysis");
224 daq->DrawText(1.5,0.7,"Events");
225 daq->DrawText(1.5,0.3,"Containers");
226 daq->DrawText(6,0.7,"Tracks/Hits");
227 daq->DrawText(6,0.3,"Containers");
228 daq->DrawText(10.,0.7,"Attributes");
229 daq->DrawText(10.,0.3,"Containers");
230
231 c1->cd();
232}
static const double x1[5]
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
Draw all kinds of Arrows.
Definition TArrow.h:29
virtual void DrawArrow(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Float_t arrowsize=0, Option_t *option="")
Draw this arrow with new coordinates.
Definition TArrow.cxx:135
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:37
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition TAttFill.h:39
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Definition TAttLine.h:42
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition TAttLine.h:43
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition TAttLine.h:40
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition TAttText.h:41
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
Definition TAttText.h:42
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition TAttText.h:46
Create a Box.
Definition TBox.h:22
virtual void Draw(Option_t *option="")
Draw this box with its current attributes.
Definition TBox.cxx:195
The Canvas class.
Definition TCanvas.h:23
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition TObject.cxx:197
The most important graphics class in the ROOT system.
Definition TPad.h:26
void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Set world coordinate system for the pad.
Definition TPad.cxx:5200
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
Definition TPad.cxx:603
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
Definition TPad.cxx:1299
A Pave (see TPave) with a text centered in the Pave.
Definition TPaveLabel.h:20
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
A Pave (see TPave) with text, lines or/and boxes inside.
Definition TPaveText.h:21
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
virtual void SetBorderSize(Int_t bordersize=4)
Definition TPave.h:73
A PaveText (see TPaveText) with several stacked paves.
Definition TPavesText.h:18
virtual void Draw(Option_t *option="")
Draw this pavestext with its current attributes.
Base class for several text objects.
Definition TText.h:22
virtual TText * DrawText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
Definition TText.cxx:175
A TBox with a bordersize and a bordermode.
Definition TWbox.h:20
virtual void Draw(Option_t *option="")
Draw this wbox with its current attributes.
Definition TWbox.cxx:85
return c1
Definition legend1.C:41