11 from ROOT
import TCanvas, TPaveLabel, TPaveText, TPavesText, TText
12 from ROOT
import TArrow, TLine
13 from ROOT
import gROOT, gBenchmark
17 c1 =
TCanvas(
'c1',
'Tree Data Structure',200,10,750,940)
18 c1.Range(0,-0.1,1,1.15)
20 gBenchmark.Start(
'tree')
27 title =
TPaveLabel(.3,1.05,.8,1.13,
'Tree Data Structure')
28 title.SetFillColor(16)
33 tnt = tree.AddText(
'Tree')
35 tnt.SetTextSize(0.030)
36 tree.AddText(
'fScanField')
37 tree.AddText(
'fMaxEventLoop')
38 tree.AddText(
'fMaxVirtualSize')
39 tree.AddText(
'fEntries')
40 tree.AddText(
'fDimension')
41 tree.AddText(
'fSelectedRows')
44 tfarm = farm.AddText(
'CHAIN')
45 tfarm.SetTextSize(0.024)
46 farm.AddText(
'Collection')
47 farm.AddText(
'of Trees')
49 link =
TLine(.15,.92,.80,.92)
53 link.DrawLine(.21,.87,.21,.275)
54 link.DrawLine(.23,.87,.23,.375)
55 link.DrawLine(.25,.87,.25,.775)
56 link.DrawLine(.41,.25,.41,-.025)
57 link.DrawLine(.43,.25,.43,.075)
58 link.DrawLine(.45,.25,.45,.175)
59 branch0 =
TPaveLabel(.20,.87,.35,.97,
'Branch 0')
60 branch0.SetTextSize(0.35)
61 branch0.SetFillColor(branchcolor)
63 branch1 =
TPaveLabel(.40,.87,.55,.97,
'Branch 1')
64 branch1.SetTextSize(0.35)
65 branch1.SetFillColor(branchcolor)
67 branch2 =
TPaveLabel(.60,.87,.75,.97,
'Branch 2')
68 branch2.SetTextSize(0.35)
69 branch2.SetFillColor(branchcolor)
71 branch3 =
TPaveLabel(.80,.87,.95,.97,
'Branch 3')
72 branch3.SetTextSize(0.35)
73 branch3.SetFillColor(branchcolor)
76 leaf0.SetFillColor(leafcolor)
79 leaf1.SetFillColor(leafcolor)
82 leaf2.SetFillColor(leafcolor)
85 firstevent.AddText(
'First event of each basket')
86 firstevent.AddText(
'Array of fMaxBaskets Integers')
87 firstevent.SetFillColor(basketcolor)
90 basket0.SetFillColor(basketcolor)
93 basket1.SetFillColor(basketcolor)
96 basket2.SetFillColor(basketcolor)
100 offset.AddText(
'Offset of events in fBuffer')
101 offset.AddText(
'Array of fEventOffsetLen Integers')
102 offset.AddText(
'(if variable length structure)')
103 offset.SetFillColor(offsetcolor)
106 buffer.AddText(
'Basket buffer')
107 buffer.AddText(
'Array of fBasketSize chars')
108 buffer.SetFillColor(offsetcolor)
111 zipbuffer.AddText(
'Basket compressed buffer')
112 zipbuffer.AddText(
'(if compression)')
113 zipbuffer.SetFillColor(offsetcolor)
118 ar1.SetFillStyle(1001)
120 ar1.DrawArrow(.21,.275,.39,.275,0.015,
'|>')
121 ar1.DrawArrow(.23,.375,.39,.375,0.015,
'|>')
122 ar1.DrawArrow(.25,.775,.39,.775,0.015,
'|>')
123 ar1.DrawArrow(.50,.775,.59,.775,0.015,
'|>')
124 ar1.DrawArrow(.70,.775,.79,.775,0.015,
'|>')
125 ar1.DrawArrow(.50,.275,.59,.275,0.015,
'|>')
126 ar1.DrawArrow(.70,.275,.79,.275,0.015,
'|>')
127 ar1.DrawArrow(.45,.175,.54,.175,0.015,
'|>')
128 ar1.DrawArrow(.43,.075,.54,.075,0.015,
'|>')
129 ar1.DrawArrow(.41,-.025,.54,-.025,0.015,
'|>')
130 ldot =
TLine(.95,.92,.99,.92)
133 ldot.DrawLine(.9,.775,.99,.775)
134 ldot.DrawLine(.9,.275,.99,.275)
135 ldot.DrawLine(.55,.05,.55,0)
136 ldot.DrawLine(.9,.05,.75,0)
137 pname =
TText(.46,.21,
'fEventOffset')
138 pname.SetTextFont(72)
139 pname.SetTextSize(0.018)
141 pname.DrawText(.44,.11,
'fBuffer')
142 pname.DrawText(.42,.01,
'fZipBuffer')
143 pname.DrawText(.26,.81,
'fLeaves = TObjArray of TLeaf')
144 pname.DrawText(.24,.40,
'fBasketEvent')
145 pname.DrawText(.22,.31,
'fBaskets = TObjArray of TBasket')
146 pname.DrawText(.20,1.0,
'fBranches = TObjArray of TBranch')
148 ntleaf.SetTextSize(0.014)
149 ntleaf.SetFillColor(leafcolor)
150 ntleaf.SetTextAlign(12)
151 ntleaf.AddText(
'fLen: number of fixed elements')
152 ntleaf.AddText(
'fLenType: number of bytes of data type')
153 ntleaf.AddText(
'fOffset: relative to Leaf0-fAddress')
154 ntleaf.AddText(
'fNbytesIO: number of bytes used for I/O')
155 ntleaf.AddText(
'fIsPointer: True if pointer')
156 ntleaf.AddText(
'fIsRange: True if leaf has a range')
157 ntleaf.AddText(
'fIsUnsigned: True if unsigned')
158 ntleaf.AddText(
'*fLeafCount: points to Leaf counter')
160 ntleaf.AddLine(0,0,0,0)
161 ntleaf.AddText(
'fName = Leaf name')
162 ntleaf.AddText(
'fTitle = Leaf type (see Type codes)')
165 type.SetTextAlign(12)
166 type.SetFillColor(leafcolor)
168 type.AddText(
'C : a character string')
169 type.AddText(
'B : an 8 bit signed integer')
170 type.AddText(
'b : an 8 bit unsigned integer')
171 type.AddText(
'S : a 16 bit signed short integer')
172 type.AddText(
's : a 16 bit unsigned short integer')
173 type.AddText(
'I : a 32 bit signed integer')
174 type.AddText(
'i : a 32 bit unsigned integer')
175 type.AddText(
'F : a 32 bit floating point')
176 type.AddText(
'D : a 64 bit floating point')
177 type.AddText(
'TXXXX : a class name TXXXX')
179 typecode =
TPaveLabel(.7,.68,.9,.72,
'fType codes')
180 typecode.SetFillColor(leafcolor)
182 ldot.DrawLine(.4,.75,.30,.7)
183 ldot.DrawLine(.5,.75,.62,.7)
184 ntbasket =
TPaveText(0.02,-0.07,0.35,.25)
185 ntbasket.SetFillColor(basketcolor)
186 ntbasket.SetTextSize(0.014)
187 ntbasket.SetTextAlign(12)
188 ntbasket.AddText(
'fNbytes: Size of compressed Basket')
189 ntbasket.AddText(
'fObjLen: Size of uncompressed Basket')
190 ntbasket.AddText(
'fDatime: Date/Time when written to store')
191 ntbasket.AddText(
'fKeylen: Number of bytes for the key')
192 ntbasket.AddText(
'fCycle : Cycle number')
193 ntbasket.AddText(
'fSeekKey: Pointer to Basket on file')
194 ntbasket.AddText(
'fSeekPdir: Pointer to directory on file')
195 ntbasket.AddText(
"fClassName: 'TBasket'")
196 ntbasket.AddText(
'fName: Branch name')
197 ntbasket.AddText(
'fTitle: Tree name')
198 ntbasket.AddText(
' ')
199 ntbasket.AddLine(0,0,0,0)
200 ntbasket.AddText(
'fNevBuf: Number of events in Basket')
201 ntbasket.AddText(
'fLast: pointer to last used byte in Basket')
203 ldot.DrawLine(.4,.3,0.02,0.25)
204 ldot.DrawLine(.5,.25,0.35,-.07)
205 ldot.DrawLine(.5,.3,0.35,0.25)
206 ntbranch =
TPaveText(0.02,0.40,0.18,0.68)
207 ntbranch.SetFillColor(branchcolor)
208 ntbranch.SetTextSize(0.015)
209 ntbranch.SetTextAlign(12)
210 ntbranch.AddText(
'fBasketSize')
211 ntbranch.AddText(
'fEventOffsetLen')
212 ntbranch.AddText(
'fMaxBaskets')
213 ntbranch.AddText(
'fEntries')
214 ntbranch.AddText(
'fAddress of Leaf0')
215 ntbranch.AddText(
' ')
216 ntbranch.AddLine(0,0,0,0)
217 ntbranch.AddText(
'fName: Branchname')
218 ntbranch.AddText(
'fTitle: leaflist')
220 ldot.DrawLine(.2,.97,.02,.68)
221 ldot.DrawLine(.35,.97,.18,.68)
222 ldot.DrawLine(.35,.87,.18,.40)
223 basketstore =
TPavesText(.8,-0.088,0.952,-0.0035,7,
'tr')
224 basketstore.SetFillColor(28)
225 basketstore.AddText(
'Baskets')
226 basketstore.AddText(
'Stores')
230 gBenchmark.Show(
'tree')
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.
A PaveText (see TPaveText) with several stacked paves.