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