11from ROOT
import TCanvas, TPaveLabel, TPave, TLine, TArrow, TText, TPaveText
14c1 =
TCanvas(
'c1',
'ROOT File description', 200, 10, 700, 550 )
16c1.Range( 0, -0.25, 21, 14 )
17title =
TPaveLabel( 5, 12, 15, 13.7, c1.GetTitle() )
18title.SetFillColor( 16 )
22file =
TPave( 1, 8.5, 20, 11 )
23file.SetFillColor( 11 )
25fileh =
TPave( 1, 8.5, 2.5, 11 )
26fileh.SetFillColor( 44 )
28lrh =
TPave( 2.5, 8.5, 3.3, 11, 1 )
31lrh.DrawPave( 6.9, 8.5, 7.7, 11, 1 )
32lrh.DrawPave( 10.5, 8.5, 11.3, 11, 1 )
33lrh.DrawPave( 14.5, 8.5, 15.3, 11, 1 )
34ldot =
TLine( 1, 8.5, 0.5, 6.5 )
37ldot.DrawLine( 2.5, 8.5, 9.4, 6.5 )
38ldot.DrawLine( 10.5, 8.5, 10, 6.5 )
39ldot.DrawLine( 11.3, 8.5, 19.5, 6.5 )
40line =
TLine( 2.6, 11, 2.6, 11.5 )
42line.DrawLine( 2.6, 11.5, 7, 11.5 )
43arrow =
TArrow( 7, 11.5, 7, 11.1, 0.01,
'|>' )
44arrow.SetFillStyle( 1001 )
46line.DrawLine( 7, 8.5, 7, 8.0 )
47line.DrawLine( 7, 8.0, 10.6, 8 )
48arrow.DrawArrow( 10.6,8, 10.6, 8.4, 0.01,
'|>' )
49line.DrawLine( 10.6, 11, 10.6, 11.5 )
50line.DrawLine( 10.6, 11.5, 14.6, 11.5 )
51arrow.DrawArrow( 14.6, 11.5, 14.6, 11.1, 0.01,
'|>' )
52line.DrawLine( 14.6, 8.5, 14.6, 8.0 )
53line.DrawLine( 14.6, 8.0, 16, 8 )
54ldot.DrawLine( 16, 8, 19, 8 )
55vert =
TText( 1.5, 9.75,
'File' )
56vert.SetTextAlign( 21 )
57vert.SetTextAngle( 90 )
58vert.SetTextSize( 0.025 )
60vert.DrawText( 2.0, 9.75,
'Header' )
61vert.DrawText( 2.9, 9.75,
'Logical Record' )
62vert.DrawText( 3.2, 9.75,
'Header' )
63vert.DrawText( 7.3, 9.75,
'Logical Record' )
64vert.DrawText( 7.6, 9.75,
'Header' )
65vert.DrawText( 10.9, 9.75,
'Logical Record' )
66vert.DrawText( 11.2, 9.75,
'Header' )
67vert.DrawText( 14.9, 9.75,
'Logical Record' )
68vert.DrawText( 15.2, 9.75,
'Header' )
69hori =
TText( 4.75, 10,
'Object' )
70hori.SetTextAlign( 22 )
71hori.SetTextSize( 0.035 )
73hori.DrawText( 4.75, 9.5,
'Data' )
74hori.DrawText( 9.2, 10,
'Deleted' )
75hori.DrawText( 9.2, 9.5,
'Object' )
76line.DrawLine( 6.9, 8.5, 10.5, 11 )
77line.DrawLine( 6.9, 11, 10.5, 8.5 )
78tbig =
TText( 17, 9.75,
'............' )
79tbig.SetTextAlign( 22 )
80tbig.SetTextSize( 0.03 )
82tbig.DrawText( 2.6, 7,
'fBEGIN' )
83tbig.DrawText( 20., 7,
'fEND' )
84arrow.DrawArrow( 2.6, 7, 2.6, 8.4, 0.01,
'|>' )
85arrow.DrawArrow( 20, 7, 20, 8.4, 0.01,
'|>' )
89header.SetFillColor( 44 )
91fh = header.AddText(
'File Header' )
94header.SetTextSize( 0.027 )
95header.SetTextAlign( 12 )
97header.AddLine( 0, 0, 0, 0 )
98header.AddText(
'"root": Root File Identifier' )
99header.AddText(
'fVersion: File version identifier' )
100header.AddText(
'fBEGIN: Pointer to first data record' )
101header.AddText(
'fEND: Pointer to first free word at EOF' )
102header.AddText(
'fSeekFree: Pointer to FREE data record' )
103header.AddText(
'fNbytesFree: Number of bytes in FREE' )
104header.AddText(
'fNfree: Number of free data records' )
105header.AddText(
'fNbytesName: Number of bytes in name/title' )
106header.AddText(
'fUnits: Number of bytes for pointers' )
107header.AddText(
'fCompress: Compression level' )
111lrecord.SetFillColor( 33 )
113tlrh = lrecord.AddText(
'Logical Record Header (TKEY)' )
114tlrh.SetTextAlign( 22 )
115tlrh.SetTextSize( 0.04 )
116lrecord.SetTextSize( 0.027 )
117lrecord.SetTextAlign( 12 )
118lrecord.AddText(
' ' )
119lrecord.AddLine( 0, 0, 0, 0 )
120lrecord.AddText(
'fNbytes: Length of compressed object' )
121lrecord.AddText(
'fVersion: Key version identifier' )
122lrecord.AddText(
'fObjLen: Length of uncompressed object' )
123lrecord.AddText(
'fDatime: Date/Time when written to store' )
124lrecord.AddText(
'fKeylen: Number of bytes for the key' )
125lrecord.AddText(
'fCycle : Cycle number' )
126lrecord.AddText(
'fSeekKey: Pointer to object on file' )
127lrecord.AddText(
'fSeekPdir: Pointer to directory on file' )
128lrecord.AddText(
'fClassName: class name of the object' )
129lrecord.AddText(
'fName: name of the object' )
130lrecord.AddText(
'fTitle: title of the object' )
Draw all kinds of Arrows.
A Pave (see TPave) with a text centered in the Pave.
A Pave (see TPave) with text, lines or/and boxes inside.
A TBox with a bordersize and a shadow option.
Base class for several text objects.