artdaq_utilities  v1_07_02_01
artdaq Namespace Reference

The artdaq namespace. More...

Classes

class  PackageBuildInfo
 Class holding information about the artdaq package build. More...
 
class  FileMetric
 FileMetric writes metric data to a file on disk. More...
 
class  GraphiteMetric
 Send a metric to Graphite. More...
 
struct  MetricData
 Small structure used to hold a metric data point before sending to the metric plugins More...
 
class  MetricManager
 The MetricManager class handles loading metric plugins and asynchronously sending metric data to them. It is designed to be a "black hole" for metrics, taking as little time as possible so that metrics do not impact the data-taking performance. More...
 
class  MetricPlugin
 The MetricPlugin class defines the interface that MetricManager uses to send metric data to the various metric plugins. More...
 
class  MsgFacilityMetric
 A MetricPlugin class which sends metric data to MessageFacility. More...
 
class  ProcFileMetric
 A MetricPlugin which writes a long unsigned int metric with a given name to a given pipe. More...
 
class  PeriodicReportMetric
 PeriodicReportMetric writes metric data to a file on disk. More...
 
class  SystemMetricCollector
 Collects metrics from the system, using proc filesystem or kernel API calls More...
 
class  TestMetricImpl
 TestMetric writes metric data to a statically-allocated memory block. More...
 
class  TestMetric
 Provides in-memory storage of metric data for testing More...
 

Typedefs

typedef std::unique_ptr
< artdaq::MetricPlugin
makeFunc_t (fhicl::ParameterSet const &ps, std::string const &app_name)
 Make a MetricPlugin instance, loading the plugin if necessary. More...
 

Enumerations

enum  MetricType {
  MetricType::InvalidMetric, MetricType::StringMetric, MetricType::IntMetric, MetricType::DoubleMetric,
  MetricType::FloatMetric, MetricType::UnsignedMetric
}
 This enumeration is used to identify the type of the metric instance (which value should be extraced from the union) More...
 
enum  MetricMode : uint32_t {
  None = 0x0, MetricMode::LastPoint = 0x1, MetricMode::Accumulate = 0x2, MetricMode::Average = 0x4,
  MetricMode::Rate = 0x8, MetricMode::Minimum = 0x10, MetricMode::Maximum = 0x20, MetricMode::Persist = 0x40
}
 The Mode of the metric indicates how multiple metric values should be combined within a reporting interval More...
 

Functions

std::unique_ptr< MetricPluginmakeMetricPlugin (std::string const &generator_plugin_spec, fhicl::ParameterSet const &ps, std::string const &app_name, std::string const &metric_name)
 Load a given MetricPlugin and return a pointer to it. More...
 
fhicl::ParameterSet make_pset (std::string const &config_str)
 Create a fhicl::ParameterSet from a string. More...
 
fhicl::ParameterSet make_pset (std::string const &config_file, cet::filepath_maker &maker)
 Load a fhicl::ParameterSet from file. More...
 
constexpr MetricMode operator| (MetricMode a, MetricMode b)
 Bitwise OR operator for MetricMode More...
 
constexpr MetricMode operator& (MetricMode a, MetricMode b)
 Bitwise AND operator for MetricMode More...
 

Detailed Description

The artdaq namespace.

Typedef Documentation

typedef std::unique_ptr<artdaq::MetricPlugin> artdaq::makeFunc_t(fhicl::ParameterSet const &ps, std::string const &app_name)

Make a MetricPlugin instance, loading the plugin if necessary.

Parameters
psParameterSet used to configure the MetricPlugin instance
app_nameName of the application sending metrics
Returns
A std::unique_ptr<artdaq::MetricPlugin> to the new instance

Definition at line 18 of file MetricMacros.hh.

Enumeration Type Documentation

enum artdaq::MetricMode : uint32_t
strong

The Mode of the metric indicates how multiple metric values should be combined within a reporting interval

Enumerator
LastPoint 

Report only the last value recorded. Useful for event counters, run numbers, etc.

Accumulate 

Report the sum of all values. Use for counters to report accurate results.

Average 

Report the average of all values. Use for rates to report accurate results.

Rate 

over. Use to create rates from counters.

Reports the sum of all values, divided by the length of the time interval they were accumulated

Minimum 

Reports the minimum value recorded.

Maximum 

Repots the maximum value recorded.

Persist 

Keep previous metric value in memory.

Definition at line 29 of file MetricData.hh.

enum artdaq::MetricType
strong

This enumeration is used to identify the type of the metric instance (which value should be extraced from the union)

Enumerator
InvalidMetric 

Default, invalid value.

StringMetric 

Metric is a std::string (not in union)

IntMetric 

Metric is an int.

DoubleMetric 

Metric is a double.

FloatMetric 

Metric is a float.

UnsignedMetric 

Metric is a long unsigned int.

Definition at line 16 of file MetricData.hh.

Function Documentation

fhicl::ParameterSet artdaq::make_pset ( std::string const &  config_str)
inline

Create a fhicl::ParameterSet from a string.

Parameters
config_strParameterSet string
Returns
fhicl::ParameterSet from string

Definition at line 15 of file MakeParameterSet.hh.

fhicl::ParameterSet artdaq::make_pset ( std::string const &  config_file,
cet::filepath_maker &  maker 
)
inline

Load a fhicl::ParameterSet from file.

Parameters
config_fileFilename to load
makercet::filepath_maker with search location rules
Returns
fhicl::ParameterSet loaded from file

Definition at line 32 of file MakeParameterSet.hh.

std::unique_ptr< artdaq::MetricPlugin > artdaq::makeMetricPlugin ( std::string const &  generator_plugin_spec,
fhicl::ParameterSet const &  ps,
std::string const &  app_name,
std::string const &  metric_name 
)

Load a given MetricPlugin and return a pointer to it.

Parameters
generator_plugin_specName of the MetricPlugin
psParameterSet with which to configure the MetricPlugin
app_nameApplication name of the calling application
metric_nameName of this MetricPlugin instance
Returns
std::unique_ptr to the new MetricPlugin instance

Definition at line 8 of file makeMetricPlugin.cc.

constexpr MetricMode artdaq::operator& ( MetricMode  a,
MetricMode  b 
)

Bitwise AND operator for MetricMode

Parameters
aLHS of AND
bRHS of AND
Returns
Logical AND of two MetricMode instances

Definition at line 57 of file MetricData.hh.

constexpr MetricMode artdaq::operator| ( MetricMode  a,
MetricMode  b 
)

Bitwise OR operator for MetricMode

Parameters
aLHS of OR
bRHS of OR
Returns
Logical OR of two MetricMode instances

Definition at line 47 of file MetricData.hh.