artdaq_utilities
v1_04_10
|
FileMetric writes metric data to a file on disk. More...
Public Member Functions | |
FileMetric (fhicl::ParameterSet const &config, std::string const &app_name) | |
FileMetric Constructor. Opens the file and starts the metric. More... | |
virtual | ~FileMetric () |
FileMetric Destructor. Calls stopMetrics and then closes the file. | |
std::string | getLibName () const override |
Get the library name for the File metric. More... | |
void | sendMetric_ (const std::string &name, const std::string &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const int &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const double &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const float &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | sendMetric_ (const std::string &name, const unsigned long int &value, const std::string &unit) override |
Write metric data to a file. More... | |
void | startMetrics_ () override |
Perform startup actions. Writes start message to output file. | |
void | stopMetrics_ () override |
Perform shutdown actions. Writes stop message to output file. | |
Public Member Functions inherited from artdaq::MetricPlugin | |
MetricPlugin (fhicl::ParameterSet const &ps, std::string const &app_name) | |
void | addMetricData (std::unique_ptr< MetricData > const &data) |
void | sendMetrics (bool forceSend=false, std::chrono::steady_clock::time_point interval_end=std::chrono::steady_clock::now()) |
void | startMetrics () |
void | stopMetrics () |
void | setRunLevel (int level) |
int | getRunLevel () const |
Additional Inherited Members | |
Public Types inherited from artdaq::MetricPlugin | |
using | Parameters = fhicl::WrappedTable< Config > |
Protected Member Functions inherited from artdaq::MetricPlugin | |
virtual void | sendMetric_ (const std::string &name, const long unsigned int &value, const std::string &unit)=0 |
Protected Attributes inherited from artdaq::MetricPlugin | |
int | runLevel_ |
fhicl::ParameterSet | pset |
The ParameterSet used to configure the MetricPlugin. | |
double | accumulationTime_ |
std::string | app_name_ |
Name of the application which is sending metrics to this plugin. | |
bool | inhibit_ |
Whether to inhibit all metric sending. | |
FileMetric writes metric data to a file on disk.
Definition at line 21 of file file_metric.cc.
|
inlineexplicit |
FileMetric Constructor. Opens the file and starts the metric.
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 58 of file file_metric.cc.
|
inlineoverridevirtual |
Get the library name for the File metric.
Reimplemented from artdaq::MetricPlugin.
Definition at line 99 of file file_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 107 of file file_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 119 of file file_metric.cc.
|
inlineoverridevirtual |
Write metric data to a file.
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.
|
inlineoverridevirtual |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Implements artdaq::MetricPlugin.
Definition at line 139 of file file_metric.cc.
|
inlineoverride |
Write metric data to a file.
name | Name of the metric |
value | Value of the metric |
unit | Units of the metric |
Definition at line 149 of file file_metric.cc.