17using std::stringstream;
27 ss <<
"<h2>" << caption <<
"</h2>";
28 ss <<
"<table id=\"efficiency\" >" << endl;
30 for (
unsigned int i = 0; i < colNames.size(); i++) {
31 ss <<
"<th>" << colNames[i] <<
"</th>";
33 ss <<
"</tr>" << endl;
42 ss <<
"<td colspan=\"" << nofCols <<
"\"><center><b>" << name <<
"</b></center></td></tr>" << endl;
49 for (
unsigned int i = 0; i < row.size(); i++) {
50 st +=
"<td>" + row[i] +
"</td>";
59 ss <<
"<h3>" << title <<
"</h3>";
60 ss <<
"<img src=\"" << file <<
".png\" alt=\"" << title <<
"\" />";
67 string str =
"<html><body><head><style type=\"text/css\">";
70 str +=
"font-family:Verdana, Arial, Helvetica, sans-serif;";
72 str +=
"border-collapse:collapse;";
74 str +=
"#efficiency td, #efficiency th";
76 str +=
"font-size:1em;";
77 str +=
"border:1px solid #98bf21;";
78 str +=
"padding:3px 7px 2px 7px;";
80 str +=
"#efficiency th";
82 str +=
"font-size:1.1em;";
83 str +=
"text-align:left;";
84 str +=
"padding-top:5px;";
85 str +=
"padding-bottom:4px;";
86 str +=
"background-color:#A7C942;";
87 str +=
"color:#ffffff;";
89 str +=
"#efficiency tr.alt td";
91 str +=
"color:#000000;";
92 str +=
"background-color:#EAF2D3;";
94 str +=
"</style></head>";
103 ss <<
"<h" <<
size + 1 <<
">" << title <<
"</h" <<
size + 1 <<
">";
ClassImp(CbmConverterManager)
Implementation of CbmReportElement for HTML output.
static constexpr size_t size()
Implementation of CbmReportElement for text output.
virtual std::string TableEnd() const
Inherited from CbmReportElement.
virtual std::string DocumentEnd() const
Inherited from CbmReportElement.
virtual std::string TableRow(const std::vector< std::string > &row) const
Inherited from CbmReportElement.
virtual std::string TableEmptyRow(int nofCols, const std::string &name) const
Inherited from CbmReportElement.
virtual std::string Image(const std::string &title, const std::string &file) const
Inherited from CbmReportElement.
virtual std::string TableBegin(const std::string &caption, const std::vector< std::string > &colNames) const
Inherited from CbmReportElement.
CbmHtmlReportElement()
Constructor.
virtual std::string Title(int size, const std::string &title) const
Inherited from CbmReportElement.
virtual ~CbmHtmlReportElement()
Destructor.
virtual std::string DocumentBegin() const
Inherited from CbmReportElement.