11from ROOT
import Belle2
16from ROOT
import gSystem
18gSystem.Load(
'libtracking_trackFindingCDC')
22AttributeMap = Belle2.TrackFindingCDC.PrimitivePlotter.AttributeMap
28groupAttributes = AttributeMap()
29groupAttributes[
'stroke'] =
'black'
30groupAttributes[
'stroke-width'] =
'5'
33plotter.startGroup(groupAttributes)
36plotter.drawLine(0, 0, 100, 100)
39lineAttributes = AttributeMap()
40lineAttributes[
'stroke'] =
'green'
43plotter.drawLine(0, 100, 100, 0, lineAttributes)
59arcAttributes = AttributeMap()
60arcAttributes[
"fill"] =
"none"
61arcAttributes[
"stroke"] =
"violet"
62arcAttributes[
"stroke-width"] =
"5"
64plotter.drawCircleArc(startX, startY, endX, endY, radius, longArc, sweepFlag, arcAttributes)
67arrowAttributes = AttributeMap()
68arrowAttributes[
"stroke"] =
"yellow"
69arrowAttributes[
"stroke-width"] =
"5"
71plotter.drawArrow(50, 90, 50, 10, arrowAttributes)
83circleAttributes = AttributeMap()
84circleAttributes[
"stroke"] =
"green"
85circleAttributes[
"stroke-width"] =
"5"
86circleAttributes[
"fill"] =
"white"
87circleAttributes[
"_showAt"] =
"0s"
92for secs, x
in enumerate((25, 40, 55, 70)):
93 circleAttributes[
"_showAt"] = str(secs) +
"s"
94 plotter.drawCircle(x, y, r, circleAttributes)
97testFileName =
"test.svg"
99plotter.save(testFileName)
104with open(testFileName)
as input_file:
105 for line
in input_file:
108os.remove(testFileName)
A concrete plotter that can draw primitive objects to standalone SVG files.