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