artdaq
v3_09_00
|
Simple class exposing methods for TRACEing and sending metrics that can be wrapped with SWIG. More...
#include <tools/swig_artdaq.h>
Public Member Functions | |
swig_artdaq (std::string const &config_string) | |
swig_artdaq constructor More... | |
~swig_artdaq () | |
swig_artdaq destructor | |
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 reporting_interval will be sent to the backend. More... | |
void | send_metric (std::string const &name, int level, int value, std::string const &unit) |
Send a metric using the artdaq MetricManager to the configured backends. Only the last point in a reporting_interval will be sent to the backend. More... | |
void | send_metric (std::string const &name, int level, double value, std::string const &unit) |
Send a metric using the artdaq MetricManager to the configured backends. Only the last point in a reporting_interval will be sent to the backend. More... | |
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 summed for the configured reporting_intervals. More... | |
void | send_sum_metric (std::string const &name, int level, int value, std::string const &unit) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals. More... | |
void | send_sum_metric (std::string const &name, int level, double value, std::string const &unit) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals. More... | |
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 summed for the configured reporting_intervals, and the result will be reported as a rate (sum / reporting interval). More... | |
void | send_rate_metric (std::string const &name, int level, int value, std::string const &unit) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals, and the result will be reported as a rate (sum / reporting interval). More... | |
void | send_rate_metric (std::string const &name, int level, double value, std::string const &unit) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals, and the result will be reported as a rate (sum / reporting interval). More... | |
void | write_error (std::string const &name, std::string const &message) |
Write an error message to TRACE, using the TLVL_ERROR level. More... | |
void | write_warning (std::string const &name, std::string const &message) |
Write an error message to TRACE, using the TLVL_WARNING level. More... | |
void | write_info (std::string const &name, std::string const &message) |
Write an error message to TRACE, using the TLVL_INFO level. More... | |
void | write_debug (std::string const &name, std::string const &message) |
Write an error message to TRACE, using the TLVL_DEBUG level. More... | |
void | write_trace (int level, std::string const &name, std::string const &message) |
Write an error message to TRACE, using the provided level. More... | |
Simple class exposing methods for TRACEing and sending metrics that can be wrapped with SWIG.
Definition at line 13 of file swig_artdaq.h.
|
explicit |
swig_artdaq constructor
config_string | FHiCL-formatted configuration, including application_name ("external"), id (0), and metrics ({}) |
Definition at line 5 of file swig_artdaq.cpp.
void swig_artdaq::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 reporting_interval will be sent to the backend.
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 19 of file swig_artdaq.cpp.
void swig_artdaq::send_metric | ( | std::string const & | name, |
int | level, | ||
int | value, | ||
std::string const & | unit | ||
) |
Send a metric using the artdaq MetricManager to the configured backends. Only the last point in a reporting_interval will be sent to the backend.
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 24 of file swig_artdaq.cpp.
void swig_artdaq::send_metric | ( | std::string const & | name, |
int | level, | ||
double | value, | ||
std::string const & | unit | ||
) |
Send a metric using the artdaq MetricManager to the configured backends. Only the last point in a reporting_interval will be sent to the backend.
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 29 of file swig_artdaq.cpp.
void swig_artdaq::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 summed for the configured reporting_intervals, and the result will be reported as a rate (sum / reporting interval).
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 47 of file swig_artdaq.cpp.
void swig_artdaq::send_rate_metric | ( | std::string const & | name, |
int | level, | ||
int | value, | ||
std::string const & | unit | ||
) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals, and the result will be reported as a rate (sum / reporting interval).
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 51 of file swig_artdaq.cpp.
void swig_artdaq::send_rate_metric | ( | std::string const & | name, |
int | level, | ||
double | value, | ||
std::string const & | unit | ||
) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals, and the result will be reported as a rate (sum / reporting interval).
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 55 of file swig_artdaq.cpp.
void swig_artdaq::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 summed for the configured reporting_intervals.
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 34 of file swig_artdaq.cpp.
void swig_artdaq::send_sum_metric | ( | std::string const & | name, |
int | level, | ||
int | value, | ||
std::string const & | unit | ||
) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals.
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 38 of file swig_artdaq.cpp.
void swig_artdaq::send_sum_metric | ( | std::string const & | name, |
int | level, | ||
double | value, | ||
std::string const & | unit | ||
) |
Send a metric using the artdaq MetricManager to the configured backends. Metric instances will be summed for the configured reporting_intervals.
name | Name of the metric |
level | Level to report at |
value | Value of the metric |
unit | Units of the metric, should be consistent across all calls of the metric with this name |
Definition at line 42 of file swig_artdaq.cpp.
void swig_artdaq::write_debug | ( | std::string const & | name, |
std::string const & | message | ||
) |
Write an error message to TRACE, using the TLVL_DEBUG level.
name | TRACE name to write to |
message | Message to write |
Definition at line 75 of file swig_artdaq.cpp.
void swig_artdaq::write_error | ( | std::string const & | name, |
std::string const & | message | ||
) |
Write an error message to TRACE, using the TLVL_ERROR level.
name | TRACE name to write to |
message | Message to write |
Definition at line 60 of file swig_artdaq.cpp.
void swig_artdaq::write_info | ( | std::string const & | name, |
std::string const & | message | ||
) |
Write an error message to TRACE, using the TLVL_INFO level.
name | TRACE name to write to |
message | Message to write |
Definition at line 70 of file swig_artdaq.cpp.
void swig_artdaq::write_trace | ( | int | level, |
std::string const & | name, | ||
std::string const & | message | ||
) |
Write an error message to TRACE, using the provided level.
level | TRACE level to write at |
name | TRACE name to write to |
message | Message to write |
Definition at line 80 of file swig_artdaq.cpp.
void swig_artdaq::write_warning | ( | std::string const & | name, |
std::string const & | message | ||
) |
Write an error message to TRACE, using the TLVL_WARNING level.
name | TRACE name to write to |
message | Message to write |
Definition at line 65 of file swig_artdaq.cpp.