1 #include "swig_artdaq.h"
3 #include "artdaq/Application/LoadParameterSet.hh"
5 swig_artdaq::swig_artdaq(std::string config_string)
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);
14 swig_artdaq::~swig_artdaq()
19 void swig_artdaq::send_metric(std::string name,
int level, std::string value, std::string unit)
21 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
24 void swig_artdaq::send_metric(std::string name,
int level,
int value, std::string unit)
26 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
29 void swig_artdaq::send_metric(std::string name,
int level,
double value, std::string unit)
31 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::LastPoint);
34 void swig_artdaq::send_sum_metric(std::string name,
int level, std::string value, std::string unit)
36 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
38 void swig_artdaq::send_sum_metric(std::string name,
int level,
int value, std::string unit)
40 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
42 void swig_artdaq::send_sum_metric(std::string name,
int level,
double value, std::string unit)
44 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Accumulate);
47 void swig_artdaq::send_rate_metric(std::string name,
int level, std::string value, std::string unit)
49 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
51 void swig_artdaq::send_rate_metric(std::string name,
int level,
int value, std::string unit)
53 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
55 void swig_artdaq::send_rate_metric(std::string name,
int level,
double value, std::string unit)
57 metricMan->sendMetric(name, value, unit, level, artdaq::MetricMode::Rate);
60 void swig_artdaq::write_error(std::string name, std::string message)
62 TLOG(TLVL_ERROR, name) << message;
65 void swig_artdaq::write_warning(std::string name, std::string message)
67 TLOG(TLVL_WARNING, name) << message;
70 void swig_artdaq::write_info(std::string name, std::string message)
72 TLOG(TLVL_INFO, name) << message;
75 void swig_artdaq::write_debug(std::string name, std::string message)
77 TLOG(TLVL_DEBUG, name) << message;
80 void swig_artdaq::write_trace(
int level, std::string name, std::string message)
82 TLOG(level, name) << message;
static void CleanUpGlobals()
Clean up statically-allocated Manager class instances.