ROOT
master
Reference Guide
Loading...
Searching...
No Matches
event.C File Reference
Tutorials
»
Visualisation tutorials
»
Graphics tutorials
Detailed Description
Illustrate some basic primitives.
void
event
()
{
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"ROOT Event description"
, 700, 500);
c1
->Range(0, 0, 14, 15.5);
TPaveText
*
event
=
new
TPaveText
(1, 13, 3, 15);
event
->SetFillColor(11);
event
->Draw();
event
->AddText(
"Event"
);
TLine
*
line
=
new
TLine
(1.1, 13, 1.1, 1.5);
line
->
SetLineWidth
(2);
line
->
Draw
();
line
->
DrawLine
(1.3, 13, 1.3, 3.5);
line
->
DrawLine
(1.5, 13, 1.5, 5.5);
line
->
DrawLine
(1.7, 13, 1.7, 7.5);
line
->
DrawLine
(1.9, 13, 1.9, 9.5);
line
->
DrawLine
(2.1, 13, 2.1, 11.5);
TArrow
*
arrow
=
new
TArrow
(1.1, 1.5, 3.9, 1.5, 0.02,
"|>"
);
arrow
->SetFillStyle(1001);
arrow
->SetFillColor(1);
arrow
->Draw();
arrow
->DrawArrow(1.3, 3.5, 3.9, 3.5, 0.02,
"|>"
);
arrow
->DrawArrow(1.5, 5.5, 3.9, 5.5, 0.02,
"|>"
);
arrow
->DrawArrow(1.7, 7.5, 3.9, 7.5, 0.02,
"|>"
);
arrow
->DrawArrow(1.9, 9.5, 3.9, 9.5, 0.02,
"|>"
);
arrow
->DrawArrow(2.1, 11.5, 3.9, 11.5, 0.02,
"|>"
);
TPaveText
*p1 =
new
TPaveText
(4, 1, 11, 2);
p1->
SetTextAlign
(12);
p1->
SetFillColor
(42);
p1->
AddText
(
"1 Mbyte"
);
p1->
Draw
();
TPaveText
*p2 =
new
TPaveText
(4, 3, 10, 4);
p2->
SetTextAlign
(12);
p2->
SetFillColor
(42);
p2->
AddText
(
"100 Kbytes"
);
p2->
Draw
();
TPaveText
*p3 =
new
TPaveText
(4, 5, 9, 6);
p3->
SetTextAlign
(12);
p3->
SetFillColor
(42);
p3->
AddText
(
"10 Kbytes"
);
p3->
Draw
();
TPaveText
*p4 =
new
TPaveText
(4, 7, 8, 8);
p4->
SetTextAlign
(12);
p4->
SetFillColor
(42);
p4->
AddText
(
"1 Kbytes"
);
p4->
Draw
();
TPaveText
*p5 =
new
TPaveText
(4, 9, 7, 10);
p5->
SetTextAlign
(12);
p5->
SetFillColor
(42);
p5->
AddText
(
"100 bytes"
);
p5->
Draw
();
TPaveText
*p6 =
new
TPaveText
(4, 11, 6, 12);
p6->
SetTextAlign
(12);
p6->
SetFillColor
(42);
p6->
AddText
(
"10 bytes"
);
p6->
Draw
();
TText
text
;
text
.SetTextAlign(12);
text
.SetTextSize(0.04);
text
.SetTextFont(72);
text
.DrawText(6.2, 11.5,
"Header:Event_flag"
);
text
.DrawText(7.2, 9.5,
"Trigger_Info"
);
text
.DrawText(8.2, 7.5,
"Muon_Detector: TOF"
);
text
.DrawText(9.2, 5.5,
"Calorimeters"
);
text
.DrawText(10.2, 3.5,
"Forward_Detectors"
);
text
.DrawText(11.2, 1.5,
"TPCs"
);
}
event
cudaEvent_t event
Definition
RooBatchCompute.cu:106
text
Option_t Option_t TPoint TPoint const char text
Definition
TGWin32VirtualXProxy.cxx:71
TArrow
Draw all kinds of Arrows.
Definition
TArrow.h:29
TAttFill::SetFillColor
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition
TAttFill.h:40
TAttLine::SetLineWidth
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition
TAttLine.h:47
TAttText::SetTextAlign
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition
TAttText.h:48
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TLine
Use the TLine constructor to create a simple line.
Definition
TLine.h:22
TLine::DrawLine
virtual TLine * DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw this line with new coordinates.
Definition
TLine.cxx:103
TObject::Draw
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition
TObject.cxx:292
TPaveText
A Pave (see TPave) with text, lines or/and boxes inside.
Definition
TPaveText.h:21
TPaveText::AddText
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:189
TPaveText::Draw
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
Definition
TPaveText.cxx:240
TText
Base class for several text objects.
Definition
TText.h:22
line
TLine * line
Definition
entrylistblock_figure1.C:235
c1
return c1
Definition
legend1.C:41
arrow
Definition
RArrowDS.hxx:17
Author
Rene Brun
Definition in file
event.C
.
tutorials
visualisation
graphics
event.C
ROOTmaster - Reference Guide Generated on Tue Oct 20 2026 15:13:22 (GVA Time) using Doxygen 1.10.0