Project
Loading...
Searching...
No Matches
DriverClient.cxx
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
12
#include "
Framework/DriverClient.h
"
13
#include <regex>
14
15
namespace
o2::framework
16
{
17
18
void
DriverClient::observe
(
const
char
* eventPrefix, std::function<
void
(std::string_view)> callback)
19
{
20
mEventMatchers.push_back({eventPrefix, callback});
21
}
22
23
void
DriverClient::dispatch
(std::string_view
event
)
24
{
25
for
(
auto
& handle : mEventMatchers) {
26
if
(
event
.rfind(handle.prefix, 0) == 0) {
27
handle.callback(
event
);
28
}
29
}
30
}
31
32
}
// namespace o2::framework
DriverClient.h
o2::framework::DriverClient::dispatch
void dispatch(std::string_view event)
Dispatch an event.
Definition
DriverClient.cxx:23
o2::framework::DriverClient::observe
void observe(char const *eventType, std::function< void(std::string_view)> callback)
Request action on some eventType notified by the driver.
Definition
DriverClient.cxx:18
event
struct _cl_event * event
Definition
glcorearb.h:2982
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
Framework
Core
src
DriverClient.cxx
Generated on Tue Feb 25 2025 23:16:40 for Project by
1.9.8