9#ifndef OPMONLIB_INCLUDE_OPMONLIB_UTILS_HPP_
10#define OPMONLIB_INCLUDE_OPMONLIB_UTILS_HPP_
17#include <google/protobuf/message.h>
22#include <google/protobuf/util/time_util.h>
29 "Failure to create an object of type " << type,
37 <<
" cannot be reconstructed from entry of type " << entry,
44 "Field " << field <<
" not present in message " << message,
45 ((std::string)field)((std::string)message)
56 using map_type = std::remove_const<std::remove_reference<cr_map_type>::type>
::type;
64 void set_value(google::protobuf::Message & m,
const std::string & name, T value);
67 void set_value(
const google::protobuf::Reflection & ,
68 google::protobuf::Message & ,
69 const google::protobuf::FieldDescriptor* , T );
81 std::string top_block =
"");
84 std::string top_block =
"");
89 const std::string & element);
92 const std::string & element ) ;
#define ERS_DECLARE_ISSUE_BASE(namespace_name, class_name, base_class_name, message, base_attributes, attributes)
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
const ::google::protobuf::Map< std::string, ::dunedaq::opmon::OpMonValue > & data() const
const dunedaq::opmon::OpMonId & operator+=(dunedaq::opmon::OpMonId &, const std::string &element)
dunedaq::opmon::OpMonId operator+(const dunedaq::opmon::OpMonId &, const std::string &element)
void set_value(google::protobuf::Message &m, const std::string &name, T value)
std::remove_const< std::remove_reference< cr_map_type >::type >::type map_type
M from_entry(const dunedaq::opmon::OpMonEntry &)
dunedaq::opmon::OpMonEntry to_entry(const google::protobuf::Message &m, const CustomOrigin &co)
opmon::OpMonId make_origin(const std::string &session, const std::string &app)
map_type to_map(const google::protobuf::Message &m, std::string top_block="")
std::string to_string(const dunedaq::opmon::OpMonId &)
std::map< std::string, std::string > CustomOrigin
std::invoke_result< decltype(&dunedaq::opmon::OpMonEntry::data), dunedaq::opmon::OpMonEntry >::type cr_map_type
Unknown serialization type