105void RDisplay::EnsureCurrentColumnWidth(
size_t w)
109 if (
w > std::numeric_limits<unsigned short>::max()) {
110 w = std::numeric_limits<unsigned short>::max();
128void RDisplay::AddCollectionToRow(
const std::vector<std::string> &
collection)
166void RDisplay::MovePosition()
191size_t RDisplay::GetNColumnsToShorten()
const
196 for (
size_t i = 0; i <
size; ++i) {
242std::string RDisplay::AsStringHtml()
const
244 std::stringstream
ss;
246 ss <<
"<table style=\"border: 1px solid black; border-collapse: collapse;\">\n";
254 std::any_of(row[0].GetRepresentation().begin(), row[0].GetRepresentation().end(),
::isdigit);
257 static const char *
bgColors[2] = {
"#fff",
"#eee"};
262 ss <<
" <tr style=\"border-top: 1px dotted; background: " +
bgColor +
"\">\n";
264 ss <<
" <tr style=\"background: " +
bgColor +
"\">\n";
267 for (
const auto &
element : row) {
268 ss <<
" <" +
elemType +
" style=\"padding: 1px 4px; border-right: 1px solid\">"
282 std::stringstream
ss;
303 Info(
"Print",
"No collections shown since fNMaxCollectionElements is 0\n");
313 if (std::any_of(row[0].GetRepresentation().begin(), row[0].GetRepresentation().end(),
::isdigit)) {
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
bool IsIgnore() const
Return if the cell has to be skipped.
bool IsDot() const
Return if the cell has to be replaced by "...".
const std::string & GetRepresentation() const
bool IsPrint() const
Return if the cell has to be printed.
void SetDots()
Flag this cell to be replaced by "...".
PrintingAction fPrintingAction
void SetPrint()
Flag this cell as to be printed.
void SetIgnore()
Flag this cell as to be skipped.
std::string fRepresentation
RDisplayElement()
Constructor assuming an empty representation to be printed.
size_t fCurrentColumn
Column that is being filled.
ROOT::Internal::RDF::RDisplayElement DElement_t
size_t fNMaxCollectionElements
std::vector< std::vector< DElement_t > > fTable
String representation of the data to be printed.
std::string AsStringHtml() const
void AddToRow(const std::string &stringEle)
Adds a single element to the next slot in the table.
size_t fCurrentRow
Row that is being filled.
std::string AsStringMarkdown(bool considerDots) const
void MovePosition()
Moves to the next cell.
std::vector< unsigned short > fWidths
Tracks the maximum width of each column, based on the largest element.
static constexpr unsigned fgMaxWidth
Maximum width of the table that Print() displays.
void EnsureCurrentColumnWidth(size_t w)
size_t fNextRow
Next row to be filled.
std::string DashesBetweenLines(size_t lastColToPrint, bool allColumnsFit) const
Generate dashes between entries in Print() and AsString() Methods.
std::string AsStringInternal(bool considerDots, const RPrintOptions &options={EPrintFormat::kMarkdown}) const
std::vector< std::string > VecStr_t
size_t GetNColumnsToShorten() const
Get the number of columns that do NOT fit in the characters limit.
static constexpr char fgSeparator
Spacing used to align the table entries.
size_t fNColumns
Number of columns to be printed.
const_iterator begin() const
const_iterator end() const
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...