artdaq_epics_plugin  v1_02_06a
artdaq::EpicsMetric Class Reference

An instance of the MetricPlugin class that sends metric data using the Channel Access protocol from EPICS. More...

Inheritance diagram for artdaq::EpicsMetric:
artdaq::MetricPlugin

Public Member Functions

 EpicsMetric (fhicl::ParameterSet const &pset, std::string const &app_name)
 Construct an instance of the EpicsMetric plugin. More...
 
std::string getLibName () const override
 Gets the unique library name of this plugin. More...
 
void stopMetrics_ () override
 Clears the registered ChannelAccess channels.
 
void startMetrics_ () override
 No initialization is needed to start sending metrics.
 
void sendMetric_ (const std::string &name, const std::string &value, const std::string &unit) override
 Send a string metric data point to ChannelAccess. More...
 
void sendMetric_ (const std::string &name, const int &value, const std::string &unit) override
 Send an integer metric data point to ChannelAccess. More...
 
void sendMetric_ (const std::string &name, const double &value, const std::string &unit) override
 Send a double metric data point to ChannelAccess. More...
 
void sendMetric_ (const std::string &name, const float &value, const std::string &unit) override
 Send a float metric data point to ChannelAccess. More...
 
void sendMetric_ (const std::string &name, const unsigned long int &value, const std::string &unit) override
 Send an unsigned integer metric data point to ChannelAccess. More...
 

Detailed Description

An instance of the MetricPlugin class that sends metric data using the Channel Access protocol from EPICS.

Definition at line 32 of file epics_metric.cc.

Constructor & Destructor Documentation

artdaq::EpicsMetric::EpicsMetric ( fhicl::ParameterSet const &  pset,
std::string const &  app_name 
)
inlineexplicit

Construct an instance of the EpicsMetric plugin.

Parameters
psetParameter set to configure with. MetricPlugin parameters plus "channel_name_prefix", default "artdaq".
app_nameName of the application sending metrics

Definition at line 64 of file epics_metric.cc.

Member Function Documentation

std::string artdaq::EpicsMetric::getLibName ( ) const
inlineoverride

Gets the unique library name of this plugin.

Returns
The library name of this plugin, "epics".

Definition at line 78 of file epics_metric.cc.

void artdaq::EpicsMetric::sendMetric_ ( const std::string &  name,
const std::string &  value,
const std::string &  unit 
)
inlineoverride

Send a string metric data point to ChannelAccess.

Parameters
nameName of the metric
valueValue of the metric
unitUnits used (not really relevant for string metrics)

Send a string metric data point to ChannelAccess. The name will be channel_name_prefix:name. If the named channel is not yet open, it will be opened. If the channel is not registered with an IOC, then the metric data will not be sent and a warning message will be printed the first time.

Definition at line 107 of file epics_metric.cc.

void artdaq::EpicsMetric::sendMetric_ ( const std::string &  name,
const int &  value,
const std::string &  unit 
)
inlineoverride

Send an integer metric data point to ChannelAccess.

Parameters
nameName of the metric
valueValue of the metric
unitUnits used

Send a string metric data point to ChannelAccess. The name will be channel_name_prefix:name. If the named channel is not yet open, it will be opened. If the channel is not registered with an IOC, then the metric data will not be sent and a warning message will be printed the first time.

Definition at line 131 of file epics_metric.cc.

void artdaq::EpicsMetric::sendMetric_ ( const std::string &  name,
const double &  value,
const std::string &  unit 
)
inlineoverride

Send a double metric data point to ChannelAccess.

Parameters
nameName of the metric
valueValue of the metric
unitUnits used

Send a string metric data point to ChannelAccess. The name will be channel_name_prefix:name. If the named channel is not yet open, it will be opened. If the channel is not registered with an IOC, then the metric data will not be sent and a warning message will be printed the first time.

Definition at line 158 of file epics_metric.cc.

void artdaq::EpicsMetric::sendMetric_ ( const std::string &  name,
const float &  value,
const std::string &  unit 
)
inlineoverride

Send a float metric data point to ChannelAccess.

Parameters
nameName of the metric
valueValue of the metric
unitUnits used

Send a string metric data point to ChannelAccess. The name will be channel_name_prefix:name. If the named channel is not yet open, it will be opened. If the channel is not registered with an IOC, then the metric data will not be sent and a warning message will be printed the first time.

Definition at line 185 of file epics_metric.cc.

void artdaq::EpicsMetric::sendMetric_ ( const std::string &  name,
const unsigned long int &  value,
const std::string &  unit 
)
inlineoverride

Send an unsigned integer metric data point to ChannelAccess.

Parameters
nameName of the metric
valueValue of the metric. Will be truncated t fit in the size of a dbr_ulong_t, a 32-bit unsigned integer.
unitUnits used

Send a string metric data point to ChannelAccess. The name will be channel_name_prefix:name. If the named channel is not yet open, it will be opened. If the channel is not registered with an IOC, then the metric data will not be sent and a warning message will be printed the first time.

Definition at line 212 of file epics_metric.cc.


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