artdaq_utilities  v1_04_10
artdaq::MetricData Struct Reference

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
 Default copy constructor More...
 
 MetricData (MetricData &&r) noexcept=default
 Default move constructor More...
 
MetricDataoperator= (const MetricData &r)=default
 Default copy assignment operator More...
 
MetricDataoperator= (MetricData &&r) noexcept=default
 Default move assignment operator More...
 
 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 More...
 
 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 More...
 
 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 More...
 
 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 More...
 
 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 More...
 
 MetricData ()
 Default constructor, constructs an MetricType::InvalidMetric More...
 

Public Attributes

std::string Name
 Name of the metric More...
 
std::string StringValue
 Value of the metric, if it is a MetricType::StringMetric More...
 
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 More...
 
MetricType Type
 Type of the metric More...
 
std::string Unit
 Units of the metric More...
 
int Level
 Reporting level of the metric More...
 
MetricMode Mode
 Accumulation mode of the metric More...
 
std::string MetricPrefix
 Name prefix for the metric More...
 
bool UseNameOverride
 Whether to override the default naming convention for this metric More...
 
size_t DataPointCount
 Number of data points accumulated in this MetricData More...
 

Detailed Description

Small structure used to hold a metric data point before sending to the metric plugins

Definition at line 42 of file MetricData.hh.

Constructor & Destructor Documentation

artdaq::MetricData::MetricData ( const MetricData r)
default

Default copy constructor

Parameters
rMetricData to copy
artdaq::MetricData::MetricData ( MetricData &&  r)
defaultnoexcept

Default move constructor

Parameters
rMetricData 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

Parameters
nameName of the metric
valueValue of the metric
unitUnits of the metric
levelReporting level of the metric
modeAccumulation mode of the metric
metricPrefixName prefix for the metric
useNameOverrideWhether to override the default name

Definition at line 129 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

Parameters
nameName of the metric
valueValue of the metric
unitUnits of the metric
levelReporting level of the metric
modeAccumulation mode of the metric
metricPrefixName prefix for the metric
useNameOverrideWhether to override the default name

Definition at line 151 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

Parameters
nameName of the metric
valueValue of the metric
unitUnits of the metric
levelReporting level of the metric
modeAccumulation mode of the metric
metricPrefixName prefix for the metric
useNameOverrideWhether to override the default name

Definition at line 173 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

Parameters
nameName of the metric
valueValue of the metric
unitUnits of the metric
levelReporting level of the metric
modeAccumulation mode of the metric
metricPrefixName prefix for the metric
useNameOverrideWhether to override the default name

Definition at line 195 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

Parameters
nameName of the metric
valueValue of the metric
unitUnits of the metric
levelReporting level of the metric
modeAccumulation mode of the metric
metricPrefixName prefix for the metric
useNameOverrideWhether to override the default name

Definition at line 217 of file MetricData.hh.

artdaq::MetricData::MetricData ( )
inline

Default constructor, constructs an MetricType::InvalidMetric

Definition at line 232 of file MetricData.hh.

Member Function Documentation

MetricData& artdaq::MetricData::operator= ( const MetricData r)
default

Default copy assignment operator

Parameters
rMetricData to copy
Returns
MetricData copy
MetricData& artdaq::MetricData::operator= ( MetricData &&  r)
defaultnoexcept

Default move assignment operator

Parameters
rMetricData to move
Returns
MetricData reference

Member Data Documentation

union { ... }

This union holds the values for all other metric types

size_t artdaq::MetricData::DataPointCount

Number of data points accumulated in this MetricData

Definition at line 117 of file MetricData.hh.

int artdaq::MetricData::Level

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.

MetricMode artdaq::MetricData::Mode

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.

MetricType artdaq::MetricData::Type

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.

bool artdaq::MetricData::UseNameOverride

Whether to override the default naming convention for this metric

Definition at line 113 of file MetricData.hh.


The documentation for this struct was generated from the following file: