|
11 | 11 | #include <functional> |
12 | 12 | #include "Framework/DeviceMetricsInfo.h" |
13 | 13 | #include "Framework/DeviceInfo.h" |
| 14 | +#include "Framework/DataDescriptorMatcher.h" |
14 | 15 | #include "PaletteHelpers.h" |
15 | 16 | #include <iostream> |
| 17 | +#include <cstring> |
16 | 18 | #include <cmath> |
17 | 19 |
|
18 | 20 | static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x + rhs.x, lhs.y + rhs.y); } |
@@ -141,10 +143,22 @@ void displayDataRelayer(DeviceMetricsInfo const& metrics, |
141 | 143 | MetricInfo const& metricInfo = metrics.metrics[variablesIndex.indexes[idx]]; |
142 | 144 | assert(metricInfo.storeIdx < metrics.stringMetrics.size()); |
143 | 145 | auto& data = metrics.stringMetrics[metricInfo.storeIdx]; |
144 | | - if (vi == 0) { |
145 | | - ImGui::Text("$%zu (timeslice): %s", vi, data[(metricInfo.pos - 1) % data.size()].data); |
146 | | - } else { |
147 | | - ImGui::Text("$%zu: %s", vi, data[(metricInfo.pos - 1) % data.size()].data); |
| 146 | + char const* value = data[(metricInfo.pos - 1) % data.size()].data; |
| 147 | + if (strncmp("null", value, 4) == 0) { |
| 148 | + continue; |
| 149 | + } |
| 150 | + switch (vi) { |
| 151 | + case o2::framework::data_matcher::STARTTIME_POS: |
| 152 | + ImGui::Text("$%zu (startTime): %s", vi, value); |
| 153 | + break; |
| 154 | + case o2::framework::data_matcher::TFCOUNTER_POS: |
| 155 | + ImGui::Text("$%zu (tfCounter): %s", vi, value); |
| 156 | + break; |
| 157 | + case o2::framework::data_matcher::FIRSTTFORBIT_POS: |
| 158 | + ImGui::Text("$%zu (firstTFOrbit): %s", vi, value); |
| 159 | + break; |
| 160 | + default: |
| 161 | + ImGui::Text("$%zu: %s", vi, value); |
148 | 162 | } |
149 | 163 | } |
150 | 164 | ImGui::EndTooltip(); |
|
0 commit comments