|
CbmRoot
|
Table element in the report. More...
#include <CbmQaReportTable.h>
Public Member Functions | |
| Table (std::string_view label, std::string_view title="") | |
| Constructor. | |
| Table (std::string_view label, int nRows, int nCols, std::string_view title="") | |
| Constructor. | |
| virtual | ~Table () |
| Destructor. | |
| const std::string & | operator() (int iRow, int iCol) const |
| Cell access operator. | |
| std::string & | operator() (int iRow, int iCol) |
| Cell access operator. | |
| std::string | GetBody (const Engine &engine) const override |
| Gets body of the element. | |
| const std::string & | GetCaption () const |
| Gets caption. | |
| const std::string & | GetCell (int iRow, int iCol) const |
| Gets cell. | |
| const std::string & | GetColumnTitle (int iCol) const |
| Gets column title. | |
| int | GetNofRows () const |
| Gets number of rows. | |
| int | GetNofCols () const |
| Gets number of columns. | |
| void | SetCaption (std::string_view caption) |
| Sets caption. | |
| void | Set (const CbmQaTable *pQaTable, const std::string &cellFormat=std::string(kDefaultFormat)) |
| Sets a table from CbmQaTable. | |
| void | SetCell (int iRow, int iCol, std::string_view cell) |
| Sets cell. | |
| void | SetColumnTitle (int iCol, std::string_view title) |
| Sets column title. | |
| const std::string & | GetLabel () const |
| Gets label. | |
| const std::string & | GetTitle () const |
| Gets name. | |
| void | SetLabel (std::string_view label) |
| Sets label. | |
| void | SetTitle (std::string_view title) |
| Sets name. | |
| const Element * | GetMother () const |
| Gets mother element. | |
Protected Member Functions | |
| int | GetIndex (int iRow, int iCol) const |
| Gets index of cell in the table vector. | |
Private Member Functions | |
| void | AssignMother (const Element *pMother) |
Private Attributes | |
| std::vector< std::string > | fvsTable |
| std::vector< std::string > | fvsTableHeader |
| std::string | fsCaption = "" |
| int | fNofRows = 0 |
| int | fNofCols = 0 |
| const Element * | fpMother = nullptr |
| Mother element. | |
| std::string | fsLabel = "" |
| Label for referencing. | |
| std::string | fsTitle = "" |
| Title of the element. | |
Static Private Attributes | |
| static constexpr std::string_view | kDefaultFormat = "{:.3}" |
| Default format of double entries. | |
Table element in the report.
Definition at line 21 of file CbmQaReportTable.h.
|
explicit |
Constructor.
| label | Label of the element |
| title | Title |
Definition at line 22 of file CbmQaReportTable.cxx.
References Table().
Referenced by Table().
| Table::Table | ( | std::string_view | label, |
| int | nRows, | ||
| int | nCols, | ||
| std::string_view | title = "" ) |
Constructor.
| label | Label of the element |
| nRows | Number of rows |
| nCols | Number of columns |
| title | Title |
Definition at line 26 of file CbmQaReportTable.cxx.
References cbm::qa::report::Element::Element(), fNofCols, fNofRows, fvsTable, and fvsTableHeader.
|
inlinevirtual |
Destructor.
Definition at line 39 of file CbmQaReportTable.h.
|
inlineprivateinherited |
Definition at line 60 of file CbmQaReportElement.h.
|
inlineoverridevirtual |
Gets body of the element.
Implements cbm::qa::report::Element.
Definition at line 53 of file CbmQaReportTable.h.
References cbm::qa::report::Engine::TableBody().
|
inline |
Gets caption.
Definition at line 56 of file CbmQaReportTable.h.
References fsCaption.
Referenced by cbm::qa::report::BeamerEngine::TableBody(), cbm::qa::report::HtmlEngine::TableBody(), and cbm::qa::report::LatexEngine::TableBody().
|
inline |
Gets cell.
| iRow | Index of row |
| iCol | Index of column |
Definition at line 61 of file CbmQaReportTable.h.
References fvsTable, and GetIndex().
|
inline |
Gets column title.
| iCol | Index of column |
Definition at line 65 of file CbmQaReportTable.h.
References fvsTableHeader.
Referenced by cbm::qa::report::BeamerEngine::TableBody(), cbm::qa::report::HtmlEngine::TableBody(), and cbm::qa::report::LatexEngine::TableBody().
|
inlineprotected |
Gets index of cell in the table vector.
Definition at line 102 of file CbmQaReportTable.h.
References fNofCols.
Referenced by GetCell(), operator()(), operator()(), and SetCell().
|
inlineinherited |
Gets label.
Definition at line 45 of file CbmQaReportElement.h.
References fsLabel.
Referenced by cbm::qa::report::BeamerEngine::FigureBody(), cbm::qa::report::HtmlEngine::FigureBody(), cbm::qa::report::LatexEngine::FigureBody(), cbm::qa::report::Table::Set(), cbm::qa::report::BeamerEngine::TableBody(), and cbm::qa::report::LatexEngine::TableBody().
|
inlineinherited |
Gets mother element.
Definition at line 57 of file CbmQaReportElement.h.
References Element(), and fpMother.
Referenced by cbm::qa::report::BeamerEngine::FigureBody(), and cbm::qa::report::BeamerEngine::TableBody().
|
inline |
Gets number of columns.
Definition at line 71 of file CbmQaReportTable.h.
References fNofCols.
Referenced by cbm::qa::report::BeamerEngine::TableBody(), cbm::qa::report::HtmlEngine::TableBody(), and cbm::qa::report::LatexEngine::TableBody().
|
inline |
Gets number of rows.
Definition at line 68 of file CbmQaReportTable.h.
References fNofRows.
Referenced by cbm::qa::report::BeamerEngine::TableBody(), cbm::qa::report::HtmlEngine::TableBody(), and cbm::qa::report::LatexEngine::TableBody().
|
inlineinherited |
Gets name.
Definition at line 48 of file CbmQaReportElement.h.
References fsTitle.
Referenced by cbm::qa::report::BeamerEngine::FigureBody(), cbm::qa::report::BeamerEngine::SectionBody(), cbm::qa::report::HtmlEngine::SectionBody(), cbm::qa::report::LatexEngine::SectionBody(), and cbm::qa::report::BeamerEngine::TableBody().
|
inline |
Cell access operator.
| iRow | Index of row |
| iCol | Index of column |
Definition at line 49 of file CbmQaReportTable.h.
References fvsTable, and GetIndex().
|
inline |
Cell access operator.
| iRow | Index of row |
| iCol | Index of column |
Definition at line 44 of file CbmQaReportTable.h.
References fvsTable, and GetIndex().
| void Table::Set | ( | const CbmQaTable * | pQaTable, |
| const std::string & | cellFormat = std::string(kDefaultFormat) ) |
Sets a table from CbmQaTable.
| pQaTable | Pointer to the QA-table object |
| cellFormat | Defines format of the rows in fmt::format formating scheme |
The parameter format provides ether a common format for all cells of the CbmQaTabl, or individual formats for each column (excluding the first row, if it is defined with the QA-table row names). For latter one have to pass a sequence of the formats, separated by the bar symbol: "<format_0>|<format_1>|<...>|<format_n>". Each of the <format_i> entries represents a fmt::format formatting line. For example, "{:.2}" formats a double into two digits after floating point, "{:.2e}" converts the number in the scientific format.
Definition at line 39 of file CbmQaReportTable.cxx.
References fNofCols, fNofRows, fsCaption, fvsTable, fvsTableHeader, CbmQaTable::GetCell(), cbm::qa::report::Element::GetLabel(), CbmQaTable::GetNcols(), CbmQaTable::GetNrows(), kDefaultFormat, SetCell(), and SetColumnTitle().
|
inline |
Sets caption.
| caption | Table caption |
Definition at line 75 of file CbmQaReportTable.h.
References fsCaption.
|
inline |
Sets cell.
| iRow | Index of row |
| iCol | Index of column |
| cell | Cell |
Definition at line 94 of file CbmQaReportTable.h.
References fvsTable, and GetIndex().
Referenced by Set().
|
inline |
Sets column title.
| iCol | Index of column |
Definition at line 98 of file CbmQaReportTable.h.
References fvsTableHeader.
Referenced by Set().
|
inlineinherited |
|
inlineinherited |
|
private |
Definition at line 109 of file CbmQaReportTable.h.
Referenced by GetIndex(), GetNofCols(), Set(), and Table().
|
private |
Definition at line 108 of file CbmQaReportTable.h.
Referenced by GetNofRows(), Set(), and Table().
|
privateinherited |
Mother element.
Definition at line 63 of file CbmQaReportElement.h.
Referenced by AssignMother(), and GetMother().
|
private |
Definition at line 107 of file CbmQaReportTable.h.
Referenced by GetCaption(), Set(), and SetCaption().
|
privateinherited |
Label for referencing.
Definition at line 64 of file CbmQaReportElement.h.
Referenced by Element(), GetLabel(), and SetLabel().
|
privateinherited |
Title of the element.
Definition at line 65 of file CbmQaReportElement.h.
Referenced by Element(), GetTitle(), and SetTitle().
|
private |
Definition at line 105 of file CbmQaReportTable.h.
Referenced by GetCell(), operator()(), operator()(), Set(), SetCell(), and Table().
|
private |
Definition at line 106 of file CbmQaReportTable.h.
Referenced by GetColumnTitle(), Set(), SetColumnTitle(), and Table().
|
staticconstexprprivate |
Default format of double entries.
Definition at line 23 of file CbmQaReportTable.h.
Referenced by Set().