artdaq  v3_09_01
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 5 of file swig_artdaq.cpp.

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

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

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

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

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

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

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

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

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

Parameters
nameTRACE name to write to
messageMessage 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.

Parameters
nameTRACE name to write to
messageMessage 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.

Parameters
nameTRACE name to write to
messageMessage 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.

Parameters
levelTRACE level to write at
nameTRACE name to write to
messageMessage 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.

Parameters
nameTRACE name to write to
messageMessage to write

Definition at line 65 of file swig_artdaq.cpp.


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