77 using ColumnArray_t = std::array<std::string, 6>;
78 std::vector<ColumnArray_t> summaryTable{ColumnArray_t{
"layer",
"sector",
"type",
79 "on-track",
"outlier",
"hole"}};
83 for (
const bool small: {
false,
true}) {
86 const unsigned onTrk =
value(cat, Status::OnTrack, lay, small);
87 const unsigned outlier =
value(cat, Status::Outlier, lay, small);
88 const unsigned hole =
value(cat, Status::Hole, lay, small);
89 if (onTrk + outlier + hole == 0u) {
93 (small ?
"small" :
"large"),
94 toString(cat), std::to_string(onTrk),
95 std::to_string(outlier), std::to_string(hole)});
99 std::array<std::size_t, 6> widths{};
100 for (
const ColumnArray_t& row : summaryTable) {
101 for (std::size_t c = 0 ; c < row.size(); ++c) {
102 widths[c] = std::max(widths[c], row[c].
size());
105 for (
const ColumnArray_t& row : summaryTable) {
107 for (std::size_t c = 0; c < row.size(); ++c) {
108 const std::size_t W = widths[c] - row[c].size();
109 const std::size_t nWL = (W - W % 2) / 2;
110 const std::size_t nWR = (W - W % 2) / 2 + W%2;
111 ostr<<
" "<<whiteSpaces(nWL)<<row[c]<<whiteSpaces(nWR)<<
" |";
unsigned translate(const HitCategory cat, const Status status, LayerIndex layer, const bool isSmall) const
Translates the 4 classification indices to a unique consecutive number (used for storage access).
value_type value(const HitCategory cat, const Status status, const LayerIndex layer, const bool isSmall) const
Returns the value type for a defined hit category & layer.