3 #include "artdaq/Application/LoadParameterSet.hh"
7 fhicl::ParameterSet config_ps = LoadParameterSet(config_string);
8 app_name = config_ps.get<std::string>(
"application_name",
"external");
9 std::string mf_app_name = artdaq::setMsgFacAppName(app_name, config_ps.get<
int>(
"id", 0));
10 artdaq::configureMessageFacility(mf_app_name.c_str());
11 metricMan->initialize(config_ps.get<fhicl::ParameterSet>(
"metrics", fhicl::ParameterSet()), app_name);
21 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
26 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
31 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
36 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
40 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
44 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
49 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
53 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
57 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
62 TLOG(TLVL_ERROR, name) << message;
67 TLOG(TLVL_WARNING, name) << message;
72 TLOG(TLVL_INFO, name) << message;
77 TLOG(TLVL_DEBUG, name) << message;
82 TLOG(level, name) << message;
void write_error(std::string const &name, std::string const &message)
Write an error message to TRACE, using the TLVL_ERROR level.
void write_trace(int level, std::string const &name, std::string const &message)
Write an error message to TRACE, using the provided level.
~swig_artdaq()
swig_artdaq destructor
static void CleanUpGlobals()
Clean up statically-allocated Manager class instances.
void send_sum_metric(std::string const &name, int level, std::string const &value, std::string const &unit)
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be sum...
void send_metric(std::string const &name, int level, std::string const &value, std::string const &unit)
Send a metric using the artdaq MetricManager to the configured backends. Only the last point in a rep...
void write_warning(std::string const &name, std::string const &message)
Write an error message to TRACE, using the TLVL_WARNING level.
void write_debug(std::string const &name, std::string const &message)
Write an error message to TRACE, using the TLVL_DEBUG level.
void send_rate_metric(std::string const &name, int level, std::string const &value, std::string const &unit)
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be sum...
swig_artdaq(std::string const &config_string)
swig_artdaq constructor
void write_info(std::string const &name, std::string const &message)
Write an error message to TRACE, using the TLVL_INFO level.