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