diff --git a/CMakeLists.txt b/CMakeLists.txt index 07b813c71..9cd883d72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ endif() # Define project project(Monitoring - VERSION 3.0.5 + VERSION 3.0.6 DESCRIPTION "O2 Monitoring library" LANGUAGES CXX ) diff --git a/examples/2-TaggedMetrics.cxx b/examples/2-TaggedMetrics.cxx index 6d8426bce..cb6f9f729 100644 --- a/examples/2-TaggedMetrics.cxx +++ b/examples/2-TaggedMetrics.cxx @@ -22,6 +22,6 @@ int main() // 10 is the value // myMetric is the name of the metric // then add predefined tag - monitoring->send(Metric{10, "myMetric"}.addTag(tags::Key::Detector, tags::Value::TPC)); - monitoring->send(Metric{10, "myMetric"}.addTag(tags::Key::CRU, 123)); + monitoring->send(Metric{10, "myMetric"}.addTag(tags::Key::Detector, tags::Value::ACO)); + monitoring->send(Metric{10, "myMetric"}.addTag(tags::Key::CRU, 0)); } diff --git a/include/Monitoring/Tags.h b/include/Monitoring/Tags.h index aae0c4404..451206a3c 100644 --- a/include/Monitoring/Tags.h +++ b/include/Monitoring/Tags.h @@ -64,7 +64,7 @@ static constexpr std::array TAG_KEY = { // Tag values enum class Value : unsigned short int { - ACO, + Null, AD, // 1 CPV, // 2 EMC, // 3 @@ -101,12 +101,13 @@ enum class Value : unsigned short int { PerCycle, // 34 PerRun, // 35 Monitoring, // 36 - CRORC + CRORC, // 37 + ACO // 38 }; // Tag value array -static constexpr std::array TAG_VALUE = {{ - "ACO"sv, +static constexpr std::array TAG_VALUE = {{ + "Null"sv, "AD"sv, // 1 "CPV"sv, // 2 "EMC"sv, // 3 @@ -142,13 +143,14 @@ static constexpr std::array TAG_VALUE = {{ "ps"sv, // 33 "pcycle"sv, // 34 "prun"sv, // 35 - "monitoring"sv, - "CRORC"sv + "monitoring"sv, // 36 + "CRORC"sv, // 37 + "ACO"sv // 38 }}; static constexpr std::string_view GetValue(const int value) { - return value >= 0 ? TAG_VALUE[value] : std::to_string(0 - value); + return value > 0 ? TAG_VALUE[value] : std::to_string(0 - value); } } // namespace tags