2 #include "TRACE/tracemf.h"
3 #include "artdaq-core/Utilities/configureMessageFacility.hh"
4 #include "artdaq/Application/LoadParameterSet.hh"
5 #include "artdaq/DAQdata/Globals.hh"
9 fhicl::ParameterSet config_ps = LoadParameterSet(config_string);
10 app_name = config_ps.get<std::string>(
"application_name",
"external");
11 std::string mf_app_name = artdaq::setMsgFacAppName(app_name, config_ps.get<
int>(
"id", 0));
12 artdaq::configureMessageFacility(mf_app_name.c_str());
13 metricMan->initialize(config_ps.get<fhicl::ParameterSet>(
"metrics", fhicl::ParameterSet()), app_name);
23 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
28 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
33 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
38 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
42 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
46 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
51 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
55 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
59 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
64 TLOG(TLVL_ERROR, name) << message;
69 TLOG(TLVL_WARNING, name) << message;
74 TLOG(TLVL_INFO, name) << message;
79 TLOG(TLVL_DEBUG, name) << message;
84 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.