9#ifndef OPMONLIB_INCLUDE_OPMONLIB_UTILS_HPP_
10#define OPMONLIB_INCLUDE_OPMONLIB_UTILS_HPP_
19#include <google/protobuf/message.h>
21#include <google/protobuf/util/time_util.h>
27 "Failure to create an object of type " <<
type,
33 "Message " <<
type <<
" cannot be reconstructed from entry of type " << entry,
39 "Field " << field <<
" not present in message " << message,
40 ((std::string)field)((std::string)message))
48using map_type = std::remove_const<std::remove_reference<cr_map_type>::type>
::type;
56set_value(google::protobuf::Message& m,
const std::string& name, T value);
60set_value(
const google::protobuf::Reflection&, google::protobuf::Message&,
const google::protobuf::FieldDescriptor*, T);
76to_map(
const google::protobuf::Message& m, std::string top_block =
"");
const ::google::protobuf::Map< std::string, ::dunedaq::opmon::OpMonValue > & data() const
std::invoke_result< decltype(&dunedaq::opmon::OpMonEntry::data), dunedaq::opmon::OpMonEntry >::type cr_map_type
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
ERS_DECLARE_ISSUE(cibmodules, CIBCommunicationError, " CIB Hardware Communication Error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules
ERS_DECLARE_ISSUE_BASE(timinglibs, ProgressUpdate, appfwk::GeneralDAQModuleIssue, message,((std::string) name),((std::string) message)) ERS_DECLARE_ISSUE_BASE(timinglibs