artdaq::FileMetric Class Reference

FileMetric writes metric data to a file on disk. More...

Inheritance diagram for artdaq::FileMetric:
artdaq::MetricPlugin

List of all members.

Public Member Functions

 FileMetric (fhicl::ParameterSet const &config, std::string const &app_name)
 FileMetric Constructor. Opens the file and starts the metric.
virtual ~FileMetric ()
 FileMetric Destructor. Calls stopMetrics and then closes the file.
std::string getLibName () const override
 Get the library name for the File metric.
void sendMetric_ (const std::string &name, const std::string &value, const std::string &unit) override
 Write metric data to a file.
void sendMetric_ (const std::string &name, const int &value, const std::string &unit) override
 Write metric data to a file.
void sendMetric_ (const std::string &name, const double &value, const std::string &unit) override
 Write metric data to a file.
void sendMetric_ (const std::string &name, const float &value, const std::string &unit) override
 Write metric data to a file.
void sendMetric_ (const std::string &name, const unsigned long int &value, const std::string &unit) override
 Write metric data to a file.
void startMetrics_ () override
 Perform startup actions. Writes start message to output file.
void stopMetrics_ () override
 Perform shutdown actions. Writes stop message to output file.

Detailed Description

FileMetric writes metric data to a file on disk.

Definition at line 21 of file file_metric.cc.


Constructor & Destructor Documentation

artdaq::FileMetric::FileMetric ( fhicl::ParameterSet const &  config,
std::string const &  app_name 
) [inline, explicit]

FileMetric Constructor. Opens the file and starts the metric.

Parameters:
config ParameterSet used to configure FileMetric
app_name Name of the application sending metrics
		 * FileMetric accepts the following Parameters:
		 * "fileName" (Default: "FileMetric.out"): Name of the output file
		 * "uniquify" (Default: false): If true, will replace %UID% with the PID of the current process, or append _%UID% to the end of the filename if %UID% is not present in fileName
		 * "time_format" (Default: "%c"): Format to use for time printout
		 * "fileMode" (Default: "append"): Set to "Overwrite" to create a new file instead of appending
		 * 

Definition at line 57 of file file_metric.cc.


Member Function Documentation

std::string artdaq::FileMetric::getLibName (  )  const [inline, override, virtual]

Get the library name for the File metric.

Returns:
The library name for the File metric, "file"

Reimplemented from artdaq::MetricPlugin.

Definition at line 107 of file file_metric.cc.

void artdaq::FileMetric::sendMetric_ ( const std::string &  name,
const unsigned long int &  value,
const std::string &  unit 
) [inline, override]

Write metric data to a file.

Parameters:
name Name of the metric
value Value of the metric
unit Units of the metric

Definition at line 162 of file file_metric.cc.

void artdaq::FileMetric::sendMetric_ ( const std::string &  name,
const float &  value,
const std::string &  unit 
) [inline, override, virtual]

Write metric data to a file.

Parameters:
name Name of the metric
value Value of the metric
unit Units of the metric

Implements artdaq::MetricPlugin.

Definition at line 151 of file file_metric.cc.

void artdaq::FileMetric::sendMetric_ ( const std::string &  name,
const double &  value,
const std::string &  unit 
) [inline, override, virtual]

Write metric data to a file.

Parameters:
name Name of the metric
value Value of the metric
unit Units of the metric

Implements artdaq::MetricPlugin.

Definition at line 140 of file file_metric.cc.

void artdaq::FileMetric::sendMetric_ ( const std::string &  name,
const int &  value,
const std::string &  unit 
) [inline, override, virtual]

Write metric data to a file.

Parameters:
name Name of the metric
value Value of the metric
unit Units of the metric

Implements artdaq::MetricPlugin.

Definition at line 129 of file file_metric.cc.

void artdaq::FileMetric::sendMetric_ ( const std::string &  name,
const std::string &  value,
const std::string &  unit 
) [inline, override, virtual]

Write metric data to a file.

Parameters:
name Name of the metric
value Value of the metric
unit Units of the metric

Implements artdaq::MetricPlugin.

Definition at line 115 of file file_metric.cc.


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

Generated on 24 Sep 2018 for artdaq_utilities by  doxygen 1.6.1