DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TestOpMonManager.hpp
Go to the documentation of this file.
1
8
9#ifndef OPMONLIB_INCLUDE_OPMONLIB_TESTOPMONMANAGER_HPP_
10#define OPMONLIB_INCLUDE_OPMONLIB_TESTOPMONMANAGER_HPP_
11
13#include <cstddef>
14
16
17namespace dunedaq {
18
19}
20
21namespace dunedaq::opmonlib {
22/*
23 * This is a specification of the OpMonManager designed to spy on the metrics
24 * generated. It's supposed to be used in tests.
25 */
27{
28
29public:
30 explicit TestOpMonManager(std::string session = "NULL", std::string name = "tree")
31 : OpMonManager(session, name, std::make_shared<BackendOpMonFacility>())
32 {
33 ;
34 }
35
36 virtual ~TestOpMonManager() = default;
37
38 auto get_backend_facility() { return std::dynamic_pointer_cast<BackendOpMonFacility>(get_opmon_facility()); }
39
40 // we expose the collect so we can harvest the metrics at will
42};
43
44} // namespace dunedaq::opmonlib
45
46#endif // OPMONLIB_INCLUDE_OPMONLIB_TESTOPMONMANAGER_HPP_
opmon::MonitoringTreeInfo collect() noexcept
OpMonManager(std::string session, std::string name, std::string opmon_facility_uri="stdout")
TestOpMonManager(std::string session="NULL", std::string name="tree")
The DUNE-DAQ namespace.