29 explicit Table(std::string_view label, std::string_view title =
"");
36 Table(std::string_view label,
int nRows,
int nCols, std::string_view title =
"");
Base class for the report element (header)
TODO: SZh, 30.01.2023: Override THistPainter::PaintText() to add zeroes in tables.
Interface for the report element.
A base abstract class to provide an interface for element body (a visitor in the Visitor pattern)
virtual std::string TableBody(const Table &table) const =0
Creates a body for table.
Table element in the report.
Table(std::string_view label, std::string_view title="")
Constructor.
const std::string & operator()(int iRow, int iCol) const
Cell access operator.
const std::string & GetColumnTitle(int iCol) const
Gets column title.
int GetNofRows() const
Gets number of rows.
void SetCell(int iRow, int iCol, std::string_view cell)
Sets cell.
void Set(const CbmQaTable *pQaTable, const std::string &cellFormat=std::string(kDefaultFormat))
Sets a table from CbmQaTable.
virtual ~Table()
Destructor.
std::vector< std::string > fvsTable
int GetNofCols() const
Gets number of columns.
const std::string & GetCaption() const
Gets caption.
std::vector< std::string > fvsTableHeader
std::string GetBody(const Engine &engine) const override
Gets body of the element.
const std::string & GetCell(int iRow, int iCol) const
Gets cell.
int GetIndex(int iRow, int iCol) const
Gets index of cell in the table vector.
void SetColumnTitle(int iCol, std::string_view title)
Sets column title.
std::string & operator()(int iRow, int iCol)
Cell access operator.
static constexpr std::string_view kDefaultFormat
Default format of double entries.
void SetCaption(std::string_view caption)
Sets caption.