Small structure used to hold a metric data point before sending to the metric plugins. More...
#include <artdaq-utilities/Plugins/MetricData.hh>
Public Member Functions | |
MetricData (const MetricData &r) | |
Default copy constructor. | |
MetricData (MetricData &&r) noexcept | |
Default move constructor. | |
MetricData & | operator= (const MetricData &r) |
Default copy assignment operator. | |
MetricData & | operator= (MetricData &&r) noexcept |
Default move assignment operator. | |
MetricData (std::string const &name, std::string const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride) | |
Construct a MetricData point using a string value. | |
MetricData (std::string const &name, int const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride) | |
Construct a MetricData point using a int value. | |
MetricData (std::string const &name, double const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride) | |
Construct a MetricData point using a double value. | |
MetricData (std::string const &name, float const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride) | |
Construct a MetricData point using a float value. | |
MetricData (std::string const &name, long unsigned int const &value, std::string const &unit, int level, MetricMode mode, std::string const &metricPrefix, bool useNameOverride) | |
Construct a MetricData point using a unsigned long int value. | |
MetricData () | |
Default constructor, constructs an MetricType::InvalidMetric. | |
Public Attributes | |
std::string | Name |
Name of the metric. | |
std::string | StringValue |
Value of the metric, if it is a MetricType::StringMetric. | |
union { | |
int IntValue | |
Value of the metric, if it is a MetricType::IntMetric. | |
double DoubleValue | |
Value of the metric, if it is a MetricType::DoubleMetric. | |
float FloatValue | |
Value of the metric, if it is a MetricType::FloatMetric. | |
long unsigned int UnsignedValue | |
Value of the metric, if it is a MetricType::UnsignedMetric. | |
}; | |
This union holds the values for all other metric types. | |
MetricType | Type |
Type of the metric. | |
std::string | Unit |
Units of the metric. | |
int | Level |
Reporting level of the metric. | |
MetricMode | Mode |
Accumulation mode of the metric. | |
std::string | MetricPrefix |
Name prefix for the metric. | |
bool | UseNameOverride |
Whether to override the default naming convention for this metric. |
Small structure used to hold a metric data point before sending to the metric plugins.
Definition at line 42 of file MetricData.hh.
artdaq::MetricData::MetricData | ( | const MetricData & | r | ) |
Default copy constructor.
r | MetricData to copy |
artdaq::MetricData::MetricData | ( | MetricData && | r | ) |
Default move constructor.
r | MetricData to move |
artdaq::MetricData::MetricData | ( | std::string const & | name, | |
std::string const & | value, | |||
std::string const & | unit, | |||
int | level, | |||
MetricMode | mode, | |||
std::string const & | metricPrefix, | |||
bool | useNameOverride | |||
) | [inline] |
Construct a MetricData point using a string value.
name | Name of the metric | |
value | Value of the metric | |
unit | Units of the metric | |
level | Reporting level of the metric | |
mode | Accumulation mode of the metric | |
metricPrefix | Name prefix for the metric | |
useNameOverride | Whether to override the default name |
Definition at line 125 of file MetricData.hh.
artdaq::MetricData::MetricData | ( | std::string const & | name, | |
int const & | value, | |||
std::string const & | unit, | |||
int | level, | |||
MetricMode | mode, | |||
std::string const & | metricPrefix, | |||
bool | useNameOverride | |||
) | [inline] |
Construct a MetricData point using a int value.
name | Name of the metric | |
value | Value of the metric | |
unit | Units of the metric | |
level | Reporting level of the metric | |
mode | Accumulation mode of the metric | |
metricPrefix | Name prefix for the metric | |
useNameOverride | Whether to override the default name |
Definition at line 145 of file MetricData.hh.
artdaq::MetricData::MetricData | ( | std::string const & | name, | |
double const & | value, | |||
std::string const & | unit, | |||
int | level, | |||
MetricMode | mode, | |||
std::string const & | metricPrefix, | |||
bool | useNameOverride | |||
) | [inline] |
Construct a MetricData point using a double value.
name | Name of the metric | |
value | Value of the metric | |
unit | Units of the metric | |
level | Reporting level of the metric | |
mode | Accumulation mode of the metric | |
metricPrefix | Name prefix for the metric | |
useNameOverride | Whether to override the default name |
Definition at line 166 of file MetricData.hh.
artdaq::MetricData::MetricData | ( | std::string const & | name, | |
float const & | value, | |||
std::string const & | unit, | |||
int | level, | |||
MetricMode | mode, | |||
std::string const & | metricPrefix, | |||
bool | useNameOverride | |||
) | [inline] |
Construct a MetricData point using a float value.
name | Name of the metric | |
value | Value of the metric | |
unit | Units of the metric | |
level | Reporting level of the metric | |
mode | Accumulation mode of the metric | |
metricPrefix | Name prefix for the metric | |
useNameOverride | Whether to override the default name |
Definition at line 187 of file MetricData.hh.
artdaq::MetricData::MetricData | ( | std::string const & | name, | |
long unsigned int const & | value, | |||
std::string const & | unit, | |||
int | level, | |||
MetricMode | mode, | |||
std::string const & | metricPrefix, | |||
bool | useNameOverride | |||
) | [inline] |
Construct a MetricData point using a unsigned long int value.
name | Name of the metric | |
value | Value of the metric | |
unit | Units of the metric | |
level | Reporting level of the metric | |
mode | Accumulation mode of the metric | |
metricPrefix | Name prefix for the metric | |
useNameOverride | Whether to override the default name |
Definition at line 208 of file MetricData.hh.
artdaq::MetricData::MetricData | ( | ) | [inline] |
Default constructor, constructs an MetricType::InvalidMetric.
Definition at line 222 of file MetricData.hh.
MetricData& artdaq::MetricData::operator= | ( | MetricData && | r | ) |
MetricData& artdaq::MetricData::operator= | ( | const MetricData & | r | ) |
union { ... } |
This union holds the values for all other metric types.
Reporting level of the metric.
Definition at line 101 of file MetricData.hh.
std::string artdaq::MetricData::MetricPrefix |
Name prefix for the metric.
Definition at line 109 of file MetricData.hh.
Accumulation mode of the metric.
Definition at line 105 of file MetricData.hh.
std::string artdaq::MetricData::Name |
Name of the metric.
Definition at line 73 of file MetricData.hh.
std::string artdaq::MetricData::StringValue |
Value of the metric, if it is a MetricType::StringMetric.
Definition at line 77 of file MetricData.hh.
Type of the metric.
Definition at line 93 of file MetricData.hh.
std::string artdaq::MetricData::Unit |
Units of the metric.
Definition at line 97 of file MetricData.hh.
Whether to override the default naming convention for this metric.
Definition at line 113 of file MetricData.hh.