artdaq  v3_12_02
swig_artdaq Class Reference

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...
 

Detailed Description

Simple class exposing methods for TRACEing and sending metrics that can be wrapped with SWIG.

Definition at line 13 of file swig_artdaq.h.

Constructor & Destructor Documentation

swig_artdaq::swig_artdaq ( std::string const &  config_string)
explicit

swig_artdaq constructor

Parameters
config_stringFHiCL-formatted configuration, including application_name ("external"), id (0), and metrics ({})

Definition at line 7 of file swig_artdaq.cc.

Member Function Documentation

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.

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 21 of file swig_artdaq.cc.

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.

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 26 of file swig_artdaq.cc.

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.

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 31 of file swig_artdaq.cc.

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).

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 49 of file swig_artdaq.cc.

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).

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 53 of file swig_artdaq.cc.

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).

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 57 of file swig_artdaq.cc.

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.

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 36 of file swig_artdaq.cc.

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.

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 40 of file swig_artdaq.cc.

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.

Parameters
nameName of the metric
levelLevel to report at
valueValue of the metric
unitUnits of the metric, should be consistent across all calls of the metric with this name

Definition at line 44 of file swig_artdaq.cc.

void swig_artdaq::write_debug ( std::string const &  name,
std::string const &  message 
)

Write an error message to TRACE, using the TLVL_DEBUG level.

Parameters
nameTRACE name to write to
messageMessage to write

Definition at line 77 of file swig_artdaq.cc.

void swig_artdaq::write_error ( std::string const &  name,
std::string const &  message 
)

Write an error message to TRACE, using the TLVL_ERROR level.

Parameters
nameTRACE name to write to
messageMessage to write

Definition at line 62 of file swig_artdaq.cc.

void swig_artdaq::write_info ( std::string const &  name,
std::string const &  message 
)

Write an error message to TRACE, using the TLVL_INFO level.

Parameters
nameTRACE name to write to
messageMessage to write

Definition at line 72 of file swig_artdaq.cc.

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.

Parameters
levelTRACE level to write at
nameTRACE name to write to
messageMessage to write

Definition at line 82 of file swig_artdaq.cc.

void swig_artdaq::write_warning ( std::string const &  name,
std::string const &  message 
)

Write an error message to TRACE, using the TLVL_WARNING level.

Parameters
nameTRACE name to write to
messageMessage to write

Definition at line 67 of file swig_artdaq.cc.


The documentation for this class was generated from the following files: