DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
BackendOpMonFacility.cpp
Go to the documentation of this file.
1
3
4using namespace dunedaq::opmonlib;
5
6void
8{
9
10 std::lock_guard<std::mutex> lk(m_mutex);
11 m_list.push_back(e);
12}
13
15BackendOpMonFacility::get_entries(std::regex measurement_filter)
16{
17
18 std::unique_lock<std::mutex> lk(m_mutex);
19 data_t ret;
20 m_list.swap(ret);
21 lk.unlock();
22
23 std::smatch values;
24 auto it = ret.begin();
25 while (it != ret.end()) {
26 if (!std::regex_match(it->measurement(), values, measurement_filter)) {
27 it = ret.erase(it);
28 } else {
29 ++it;
30 }
31 }
32
33 return ret;
34}
void publish(entry_t &&e) const override
data_t get_entries(std::regex measurement_filter=std::regex(".*"))