Belle II Software  release-05-01-25
SVGPrimitivePlotter.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/trackFindingCDC/display/SVGPrimitivePlotter.h>
11 
12 #include <framework/logging/Logger.h>
13 
14 #include <fstream>
15 
16 using namespace Belle2;
17 using namespace TrackFindingCDC;
18 
21 
24  , m_svgContentStream()
25  , m_nIndentationSpaces(s_defaultNIndentationSpaces)
26  , m_svgAttributes()
27 {
28 }
29 
32  , m_svgContentStream()
33  , m_nIndentationSpaces(s_defaultNIndentationSpaces)
34  , m_svgAttributes(svgAttributes)
35 {
36 }
37 
39  : PrimitivePlotter(plotter)
40  , m_svgContentStream(plotter.m_svgContentStream.str(), std::ostringstream::ate)
41  , m_nIndentationSpaces(plotter.m_nIndentationSpaces)
42  , m_svgAttributes(plotter.m_svgAttributes)
43 {
44 }
45 
46 std::unique_ptr<PrimitivePlotter> SVGPrimitivePlotter::clone() const
47 {
48  return std::make_unique<SVGPrimitivePlotter>(*this);
49 }
50 
52  float startY,
53  float endX,
54  float endY,
55  const AttributeMap& attributeMap)
56 {
57  PrimitivePlotter::drawLine(startX, startY, endX, endY, attributeMap);
58 
59  AttributeMap geometryAttributeMap {
60  {"x1", std::to_string(startX)},
61  {"x2", std::to_string(endX)},
62  {"y1", std::to_string(startY)},
63  {"y2", std::to_string(endY)}
64  };
65 
66  writeStandAloneTag(m_svgContentStream, "line", geometryAttributeMap, attributeMap);
67 
68 }
69 
70 
72  float startY,
73  float endX,
74  float endY,
75  const AttributeMap& attributeMap)
76 {
77  PrimitivePlotter::drawArrow(startX, startY, endX, endY, attributeMap);
78 
79  AttributeMap geometryAttributeMap {
80  {"x1", std::to_string(startX)},
81  {"x2", std::to_string(endX)},
82  {"y1", std::to_string(startY)},
83  {"y2", std::to_string(endY)},
84  {"marker-end" , "url(#endArrow)"}
85  };
86 
87  writeStandAloneTag(m_svgContentStream, "line", geometryAttributeMap, attributeMap);
88 }
89 
90 
92  float centerY,
93  float radius,
94  const AttributeMap& attributeMap)
95 {
96  PrimitivePlotter::drawCircle(centerX, centerY, radius, attributeMap);
97 
98  AttributeMap geometryAttributeMap {
99  {"cx", std::to_string(centerX)},
100  {"cy", std::to_string(centerY)},
101  {"r", std::to_string(std::fabs(radius))}
102  };
103 
104  writeStandAloneTag(m_svgContentStream, "circle", geometryAttributeMap, attributeMap);
105 
106 }
107 
108 
110  float startY,
111  float endX,
112  float endY,
113  float radius,
114  bool longArc,
115  bool sweepFlag,
116  const AttributeMap& attributeMap)
117 {
119  startY,
120  endX,
121  endY,
122  radius,
123  longArc,
124  sweepFlag,
125  attributeMap);
126 
127  // Compile the path for a ellipses arc
128  // spelling out all the parts in case somebody want adopt
129  // although only the simpler circle arc case is needed.
130 
131  const float radiusX = std::fabs(radius);
132  const float radiusY = std::fabs(radius);
133  const float rotationAngle = 0;
134 
135  std::ostringstream pathStream;
136 
137  pathStream << "M" << ' ';
138  pathStream << std::to_string(startX) << ' ';
139  pathStream << std::to_string(startY) << ' ';
140  pathStream << "A" << ' ';
141  pathStream << std::to_string(radiusX) << ' ';
142  pathStream << std::to_string(radiusY) << ' ';
143  pathStream << std::to_string(rotationAngle) << ' ';
144  pathStream << std::to_string(longArc) << ' ';
145  pathStream << std::to_string(sweepFlag) << ' ';
146  pathStream << std::to_string(endX) << ' ';
147  pathStream << std::to_string(endY);
148 
149  AttributeMap geometryAttributeMap{{"d", pathStream.str()}};
150 
151  writeStandAloneTag(m_svgContentStream, "path", geometryAttributeMap, attributeMap);
152 }
153 
154 void SVGPrimitivePlotter::drawCurve(const std::vector<std::array<float, 2>>& points,
155  const std::vector<std::array<float, 2>>& tangents,
156  const AttributeMap& attributeMap)
157 {
158  // Magic number for circle approximation with splines
159  static const double k = 4.0 / 3.0 * (std::sqrt(2.0) - 1.0);
160 
161  B2ASSERT("Expect number of points and tangents to be the same", points.size() == tangents.size());
162  if (points.size() < 2) return;
163 
164  PrimitivePlotter::drawCurve(points, tangents, attributeMap);
165 
166  std::ostringstream pathStream;
167 
168  // Move to point
169  float startX = std::get<0>(points[0]);
170  float startY = std::get<1>(points[0]);
171 
172  pathStream << "M";
173  pathStream << ' ' << std::to_string(startX);
174  pathStream << ' ' << std::to_string(startY);
175 
176  for (size_t iCurrent = 0, iNext = 1; iNext < points.size(); iCurrent = iNext, ++iNext) {
177 
178  float currentTX = std::get<0>(tangents[iCurrent]);
179  float currentTY = std::get<1>(tangents[iCurrent]);
180 
181  float nextTX = std::get<0>(tangents[iNext]);
182  float nextTY = std::get<1>(tangents[iNext]);
183 
184  float currentT = std::hypot(currentTX, currentTY);
185  float nextT = std::hypot(nextTX, nextTY);
186 
187  currentTX /= currentT;
188  currentTY /= currentT;
189  nextTX /= nextT;
190  nextTY /= nextT;
191 
192  float currentX = std::get<0>(points[iCurrent]);
193  float currentY = std::get<1>(points[iCurrent]);
194 
195  float nextX = std::get<0>(points[iNext]);
196  float nextY = std::get<1>(points[iNext]);
197 
198  // Circle arc angle
199  float alpha = std::atan2(currentTX * nextTY - currentTY * nextTX,
200  currentTX * nextTX + currentTY * nextTY);
201 
202  float distance = std::hypot(currentX - nextX, currentY - nextY);
203  float controlLength = k * distance / 2 / std::cos(alpha / 2);
204 
205  float currentControlX = currentX + currentTX * controlLength;
206  float currentControlY = currentY + currentTY * controlLength;
207 
208  float nextControlX = nextX - nextTX * controlLength;
209  float nextControlY = nextY - nextTY * controlLength;
210 
211  pathStream << ' ' << "C";
212 
213  pathStream << ' ' << std::to_string(currentControlX);
214  pathStream << ' ' << std::to_string(currentControlY);
215 
216  pathStream << ' ' << std::to_string(nextControlX);
217  pathStream << ' ' << std::to_string(nextControlY);
218 
219  pathStream << ' ' << std::to_string(nextX);
220  pathStream << ' ' << std::to_string(nextY);
221  }
222 
223  AttributeMap geometryAttributeMap{{"d", pathStream.str()}};
224 
225  writeStandAloneTag(m_svgContentStream, "path", geometryAttributeMap, attributeMap);
226 }
227 
229 {
230  writeOpeningTag(m_svgContentStream, "g", attributeMap);
231 }
232 
234 {
236 }
237 
238 const std::string SVGPrimitivePlotter::save(const std::string& fileName)
239 {
240  // Check indention
242  B2WARNING("Mismatching calls to startGroup and endGroup detected. "
243  << "Proceeding to write the illforamed result.");
244  }
245 
246  int savedNIndentationSpaces = m_nIndentationSpaces;
248 
249  std::ofstream outputFileStream;
250  outputFileStream.open(fileName);
251 
252  writeSVGHeader(outputFileStream);
253 
254  AttributeMap standardAttributeMap {
255  {"baseProfile", "full"},
256  {"ev", "http://www.w3.org/2001/xml-events"},
257  {"version", "1.1"},
258  {"xlink", "http://www.w3.org/1999/xlink"},
259  {"xmlns", "http://www.w3.org/2000/svg"}
260  };
261 
262 
263  // Combine the viewbox specification from the bounding box
264  // Format "{left} {bottom} {width} {height}"
265  std::ostringstream viewBoxStringStream;
266 
267  viewBoxStringStream << getBoundingBox().getLeft();
268  viewBoxStringStream << " ";
269  viewBoxStringStream << getBoundingBox().getBottom();
270  viewBoxStringStream << " ";
271  viewBoxStringStream << getBoundingBox().getWidth();
272  viewBoxStringStream << " ";
273  viewBoxStringStream << getBoundingBox().getHeight();
274 
275  AttributeMap variableAttributeMap{
276  {"height", std::to_string(getCanvasHeight())},
277  {"width", std::to_string(getCanvasWidth())},
278  {"viewBox", viewBoxStringStream.str()},
279  };
280 
281  variableAttributeMap.insert(m_svgAttributes.begin(), m_svgAttributes.end());
282 
283  writeOpeningTag(outputFileStream, "svg", standardAttributeMap, variableAttributeMap);
284 
285  writeSVGDefs(outputFileStream);
286 
287  // Copy the stream the output and rewind it to its original position.
288  outputFileStream << m_svgContentStream.str();
289 
290  writeClosingTag(outputFileStream, "svg");
291 
292  outputFileStream.close();
293  m_nIndentationSpaces = savedNIndentationSpaces;
294 
295  return fileName;
296 }
297 
299 {
301  m_svgContentStream.str("");
303 }
304 
306 {
308 }
309 
311 {
313 }
314 
315 void SVGPrimitivePlotter::writeSVGHeader(std::ostream& outputStream)
316 {
317  outputStream << "<?xml version=\"1.0\" ?>" << std::endl;
318  outputStream << "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>" << std::endl;
319 }
320 
321 void SVGPrimitivePlotter::writeSVGDefs(std::ostream& outputStream)
322 {
323  writeOpeningTag(outputStream, "defs");
324 
325  AttributeMap markerAttributes {
326  { "id", "endArrow"},
327  { "viewBox", "0 0 10 10"},
328  { "refX", "1"},
329  { "refY", "5"},
330  { "markerUnits", "strokeWidth"},
331  { "markerWidth", "4"},
332  { "markerHeight", "3"},
333  {"orient", "auto"}
334  };
335 
336  writeOpeningTag(outputStream, "marker", markerAttributes);
337 
338 
339  AttributeMap polylineAttributes {
340  {"points", "0,0 10,5 0,10 1,5"},
341  {"fill", "black"}
342  };
343 
344  writeStandAloneTag(outputStream, "polyline", polylineAttributes);
345 
346  writeClosingTag(outputStream, "marker");
347  writeClosingTag(outputStream, "defs");
348 }
349 
350 void SVGPrimitivePlotter::writeOpeningTag(std::ostream& outputStream,
351  const std::string& tagName,
352  const AttributeMap& geometryAttributeMap,
353  const AttributeMap& styleAttributeMap)
354 {
355  // Indentation
356  outputStream << std::string(m_nIndentationSpaces, ' ');
357 
358  // Opening braket
359  outputStream << '<';
360 
361  // Write contained part
362  writeTagIntern(outputStream, tagName, geometryAttributeMap, styleAttributeMap);
363 
364  // Closing bracket
365  outputStream << '>';
366 
367  // New line
368  outputStream << std::endl;
369 
370  indent();
371 
372  if (geometryAttributeMap.count("_showAt") + styleAttributeMap.count("_showAt")) {
373  const std::string showAt = geometryAttributeMap.count("_showAt")
374  ? geometryAttributeMap.at("_showAt")
375  : styleAttributeMap.at("_showAt");
376 
377  AttributeMap setAttributeMap{
378  {"attributeName", "visibility"},
379  {"to", "hidden"},
380  {"begin", "0s"},
381  {"end", showAt}
382  };
383 
384  writeStandAloneTag(outputStream, "set", setAttributeMap);
385  }
386 }
387 
388 void SVGPrimitivePlotter::writeStandAloneTag(std::ostream& outputStream,
389  const std::string& tagName,
390  const AttributeMap& geometryAttributeMap,
391  const AttributeMap& styleAttributeMap)
392 {
393  // Special handling for _showAt attribute, which introduces a contained <set> tag
394  if (geometryAttributeMap.count("_showAt") + styleAttributeMap.count("_showAt")) {
395  writeOpeningTag(outputStream, tagName, geometryAttributeMap, styleAttributeMap);
396  writeClosingTag(outputStream, tagName);
397  } else {
398 
399  // Indentation
400  outputStream << std::string(m_nIndentationSpaces, ' ');
401 
402  // Opening braket
403  outputStream << '<';
404 
405  // Write contained part
406  writeTagIntern(outputStream, tagName, geometryAttributeMap, styleAttributeMap);
407 
408  // Closing bracket
409  outputStream << '/' << '>';
410 
411  // New line
412  outputStream << std::endl;
413  }
414 }
415 
416 void SVGPrimitivePlotter::writeTagIntern(std::ostream& outputStream,
417  const std::string& tagName,
418  const AttributeMap& geometryAttributeMap,
419  const AttributeMap& styleAttributeMap)
420 {
421  // Tag name
422  outputStream << tagName;
423 
424  // First attribute map
425  if (not geometryAttributeMap.empty()) {
426  outputStream << ' ';
427  writeAttributes(outputStream, geometryAttributeMap);
428  }
429 
430  // Second attribute map
431  if (not styleAttributeMap.empty()) {
432  outputStream << ' ';
433  writeAttributes(outputStream, styleAttributeMap);
434  }
435 }
436 
437 void SVGPrimitivePlotter::writeAttributes(std::ostream& outputStream,
438  const AttributeMap& attributeMap)
439 {
440  bool first = true;
441  for (const std::pair<std::string, std::string>& attribute : attributeMap) {
442 
443  const std::string& key = attribute.first;
444  const std::string& value = attribute.second;
445 
446  // Skip special attribute
447  if ('_' == key[0]) {
448  continue;
449  }
450 
451  // Introduce a space between every attribute
452  if (first) {
453  first = false;
454  } else {
455  outputStream << ' ';
456  }
457 
458  outputStream << key;
459  outputStream << '=' << '"';
460  outputStream << value;
461  outputStream << '"';
462  }
463 }
464 
465 void SVGPrimitivePlotter::writeClosingTag(std::ostream& outputStream, const std::string& tagName)
466 {
467  dedent();
468 
469  // Indentation
470  outputStream << std::string(m_nIndentationSpaces, ' ');
471 
472  // Opening braket
473  outputStream << '<' << '/';
474 
475  // Tag name
476  outputStream << tagName;
477 
478  // Closing bracket
479  outputStream << '>';
480 
481  // New line
482  outputStream << std::endl;
483 }
Belle2::TrackFindingCDC::PrimitivePlotter::drawCircle
virtual void drawCircle(float centerX, float centerY, float radius, const AttributeMap &attributeMap=AttributeMap())
Adds a circle to the plot.
Definition: PrimitivePlotter.cc:54
Belle2::TrackFindingCDC::SVGPrimitivePlotter::clone
std::unique_ptr< PrimitivePlotter > clone() const override
Returns a newly created plotter instance containing all information of this.
Definition: SVGPrimitivePlotter.cc:46
Belle2::TrackFindingCDC::SVGPrimitivePlotter::SVGPrimitivePlotter
SVGPrimitivePlotter()
Default constructor for ROOT compatibility.
Definition: SVGPrimitivePlotter.cc:22
Belle2::TrackFindingCDC::SVGPrimitivePlotter::writeSVGDefs
void writeSVGDefs(std::ostream &outputStream)
Writes a preamble of <defs> that define an arrow cap which can be referenced by lines.
Definition: SVGPrimitivePlotter.cc:321
Belle2::TrackFindingCDC::PrimitivePlotter::getCanvasHeight
float getCanvasHeight()
Getter for the canvas height in pixels.
Definition: PrimitivePlotter.h:218
Belle2::TrackFindingCDC::SVGPrimitivePlotter::drawArrow
void drawArrow(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap()) override
Adds an arrow to the plot.
Definition: SVGPrimitivePlotter.cc:71
Belle2::TrackFindingCDC::SVGPrimitivePlotter::dedent
void dedent()
Decreases the current indention by one.
Definition: SVGPrimitivePlotter.cc:310
Belle2::TrackFindingCDC::PrimitivePlotter::drawCircleArc
virtual void drawCircleArc(float startX, float startY, float endX, float endY, float radius, bool longArc, bool sweepFlag, const AttributeMap &attributeMap=AttributeMap())
Adds a circle arc to the plot.
Definition: PrimitivePlotter.cc:68
Belle2::TrackFindingCDC::SVGPrimitivePlotter::m_nIndentationSpaces
int m_nIndentationSpaces
Memory for the number of spaces that shall be prepended to each line.
Definition: SVGPrimitivePlotter.h:252
Belle2::TrackFindingCDC::BoundingBox::getBottom
float getBottom() const
Getter for the location of the bottom of the bounding box rectangle (lower y bound)....
Definition: BoundingBox.h:85
Belle2::TrackFindingCDC::PrimitivePlotter::drawCurve
virtual void drawCurve(const std::vector< std::array< float, 2 >> &points, const std::vector< std::array< float, 2 >> &tangents, const AttributeMap &attributeMap=AttributeMap())
Adds a smooth curve to the plot.
Definition: PrimitivePlotter.cc:82
Belle2::TrackFindingCDC::PrimitivePlotter::AttributeMap
Belle2::TrackFindingCDC::AttributeMap AttributeMap
A map type for attributes names to values for additional drawing information.
Definition: PrimitivePlotter.h:39
Belle2::TrackFindingCDC::PrimitivePlotter::getBoundingBox
const BoundingBox & getBoundingBox() const
Getter for the bounding box of all drawed objects.
Definition: PrimitivePlotter.h:199
Belle2::TrackFindingCDC::SVGPrimitivePlotter::drawLine
void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap()) override
Adds a line to the plot.
Definition: SVGPrimitivePlotter.cc:51
Belle2::TrackFindingCDC::SVGPrimitivePlotter::writeClosingTag
void writeClosingTag(std::ostream &outputStream, const std::string &tagName)
Writes a closing xml tag to the given output stream.
Definition: SVGPrimitivePlotter.cc:465
Belle2::TrackFindingCDC::SVGPrimitivePlotter::m_svgAttributes
AttributeMap m_svgAttributes
Memory for additional attributes to the toplevel svg element.
Definition: SVGPrimitivePlotter.h:255
Belle2::TrackFindingCDC::PrimitivePlotter::drawArrow
virtual void drawArrow(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Adds an arrow to the plot.
Definition: PrimitivePlotter.cc:44
Belle2::TrackFindingCDC::SVGPrimitivePlotter::drawCircle
void drawCircle(float centerX, float centerY, float radius, const AttributeMap &attributeMap=AttributeMap()) override
Adds a circle to the plot.
Definition: SVGPrimitivePlotter.cc:91
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::BoundingBox::getWidth
float getWidth() const
Getter for the width of the bounding box rectangle.
Definition: BoundingBox.h:73
Belle2::TrackFindingCDC::SVGPrimitivePlotter::indent
void indent()
Increases the current indention by one.
Definition: SVGPrimitivePlotter.cc:305
Belle2::TrackFindingCDC::PrimitivePlotter::drawLine
virtual void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Adds a line to the plot.
Definition: PrimitivePlotter.cc:34
Belle2::TrackFindingCDC::SVGPrimitivePlotter::save
const std::string save(const std::string &fileName) override
Saves the current plot state to a file.
Definition: SVGPrimitivePlotter.cc:238
Belle2::TrackFindingCDC::BoundingBox::getHeight
float getHeight() const
Getter for the height of the bounding box rectangle.
Definition: BoundingBox.h:77
Belle2::TrackFindingCDC::SVGPrimitivePlotter::writeOpeningTag
void writeOpeningTag(std::ostream &outputStream, const std::string &tagName, const AttributeMap &geometryAttributeMap=AttributeMap(), const AttributeMap &styleAttributeMap=AttributeMap())
Writes an opening xml tag to the given output stream taking attributes from two sources.
Definition: SVGPrimitivePlotter.cc:350
Belle2::TrackFindingCDC::SVGPrimitivePlotter::drawCurve
void drawCurve(const std::vector< std::array< float, 2 >> &points, const std::vector< std::array< float, 2 >> &tangents, const AttributeMap &attributeMap=AttributeMap()) override
Adds a smooth curve to the plot.
Definition: SVGPrimitivePlotter.cc:154
Belle2::TrackFindingCDC::SVGPrimitivePlotter::writeStandAloneTag
void writeStandAloneTag(std::ostream &outputStream, const std::string &tagName, const AttributeMap &geometryAttributeMap=AttributeMap(), const AttributeMap &styleAttributeMap=AttributeMap())
Writes a stand alone xml tag to the given output stream taking attributes from two sources.
Definition: SVGPrimitivePlotter.cc:388
Belle2::TrackFindingCDC::SVGPrimitivePlotter::endGroup
void endGroup() override
Indicates the end of a group of drawn elements.
Definition: SVGPrimitivePlotter.cc:233
Belle2::TrackFindingCDC::PrimitivePlotter
A base class for plots of primitive objects.
Definition: PrimitivePlotter.h:35
Belle2::TrackFindingCDC::SVGPrimitivePlotter::s_addtionalNIndentationSpaces
static const int s_addtionalNIndentationSpaces
Constant for the additional number of space to be prepended with each open tag group.
Definition: SVGPrimitivePlotter.h:38
Belle2::TrackFindingCDC::SVGPrimitivePlotter::writeTagIntern
void writeTagIntern(std::ostream &outputStream, const std::string &tagName, const AttributeMap &geometryAttributeMap=AttributeMap(), const AttributeMap &styleAttributeMap=AttributeMap())
Writes part that belongs between the <, > brakets.
Definition: SVGPrimitivePlotter.cc:416
Belle2::TrackFindingCDC::BoundingBox::getLeft
float getLeft() const
Getter for the location of the left of the bounding box rectangle (lower x bound)....
Definition: BoundingBox.h:81
Belle2::TrackFindingCDC::SVGPrimitivePlotter
A concrete plotter that can draw primitive objects to standalone SVG files.
Definition: SVGPrimitivePlotter.h:31
Belle2::TrackFindingCDC::SVGPrimitivePlotter::startGroup
void startGroup(const AttributeMap &attributeMap=AttributeMap()) override
Indicates the start of a group of drawn elements.
Definition: SVGPrimitivePlotter.cc:228
Belle2::TrackFindingCDC::SVGPrimitivePlotter::s_defaultNIndentationSpaces
static const int s_defaultNIndentationSpaces
Constant for the number of indention space to be used within the svg block.
Definition: SVGPrimitivePlotter.h:35
Belle2::TrackFindingCDC::SVGPrimitivePlotter::clear
void clear() override
Clears all drawed elements from the plotter.
Definition: SVGPrimitivePlotter.cc:298
Belle2::TrackFindingCDC::PrimitivePlotter::getCanvasWidth
float getCanvasWidth()
Getter for the canvas width in pixels.
Definition: PrimitivePlotter.h:212
Belle2::TrackFindingCDC::SVGPrimitivePlotter::drawCircleArc
void drawCircleArc(float startX, float startY, float endX, float endY, float radius, bool longArc, bool sweepFlag, const AttributeMap &attributeMap=AttributeMap()) override
Adds a circle arc to the plot.
Definition: SVGPrimitivePlotter.cc:109
Belle2::TrackFindingCDC::SVGPrimitivePlotter::writeSVGHeader
void writeSVGHeader(std::ostream &outputStream)
Writes the xml header that indicates that this document will be a SVG document to the given output st...
Definition: SVGPrimitivePlotter.cc:315
Belle2::TrackFindingCDC::SVGPrimitivePlotter::m_svgContentStream
std::ostringstream m_svgContentStream
Memory for the plotted elements. This contains only the fragment that is inbetween the svg tags and c...
Definition: SVGPrimitivePlotter.h:249
Belle2::TrackFindingCDC::PrimitivePlotter::clear
virtual void clear()
Clears all drawed elements from the plotter.
Definition: PrimitivePlotter.cc:113