Belle II Software light-2406-ragdoll
HTML.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <TMatrixFBasefwd.h>
11#include <TMatrixDBasefwd.h>
12
13#include <Math/Vector3D.h>
14#include <string>
15
16namespace Belle2 {
25 namespace HTML {
32 std::string getString(const TMatrixFBase& matrix, int precision = 2, bool color = true);
33
40 std::string getString(const TMatrixDBase& matrix, int precision = 2, bool color = true);
41
46 std::string getString(const ROOT::Math::XYZVector& vec, int precision = 2);
47
55 std::string getStringConvertToUnit(const ROOT::Math::XYZVector& vec, int precision = 2,
56 const std::string& unitType = "cm");
57
61 std::string chooseUnitOfLength(const ROOT::Math::XYZVector& vec);
62
68 std::string getHexDump(const int* buf, int length);
69
71 std::string htmlToPlainText(const std::string& html);
72
74 std::string escape(const std::string& str);
76 std::string unescape(const std::string& str);
77 }
79}
std::string escape(const std::string &str)
Convert &, <, > etc.
Definition: HTML.cc:159
std::string getStringConvertToUnit(const ROOT::Math::XYZVector &vec, int precision=2, const std::string &unitType="cm")
get a string with vector coordinates: (x, y, z).
Definition: HTML.cc:85
std::string chooseUnitOfLength(const ROOT::Math::XYZVector &vec)
get a string with a unit type to convert a vector, so that it is easily readable.
Definition: HTML.cc:102
std::string getHexDump(const int *buf, int length)
Create hexdump of given buffer.
Definition: HTML.cc:121
std::string unescape(const std::string &str)
inverse of escape()
Definition: HTML.cc:169
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:24
std::string htmlToPlainText(const std::string &html)
Reformat given HTML string into terminal-friendly plain text.
Definition: HTML.cc:138
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24