Project
Loading...
Searching...
No Matches
DispatchPolicy.h
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#ifndef FRAMEWORK_DISPATCHPOLICY_H
12#define FRAMEWORK_DISPATCHPOLICY_H
13
14#include <functional>
15#include <string>
16#include <vector>
17
18namespace o2
19{
20namespace framework
21{
22
23struct DeviceSpec;
24struct Output;
25
32 enum struct DispatchOp {
39 };
40
41 using DeviceMatcher = std::function<bool(DeviceSpec const& device)>;
42 // OutputMatcher can be a later extension, but not expected to be of high priority
43 using TriggerMatcher = std::function<bool(Output const&)>;
44
46 std::string name;
54
56
58 static std::vector<DispatchPolicy> createDefaultPolicies();
59};
60
61std::ostream& operator<<(std::ostream& oss, DispatchPolicy::DispatchOp const& val);
62
63} // namespace framework
64} // namespace o2
65
66#endif // FRAMEWORK_DISPATCHPOLICY_H
GLuint GLfloat * val
Definition glcorearb.h:1582
std::ostream & operator<<(std::ostream &s, ChannelType const &type)
Stream operators so that we can use ChannelType with Boost.Test.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static TriggerMatcher defaultDispatchPolicy()
DispatchOp action
the action to be used for matched devices
std::function< bool(DeviceSpec const &device)> DeviceMatcher
TriggerMatcher triggerMatcher
matcher on specific output to trigger sending
std::string name
Name of the policy itself.
std::function< bool(Output const &)> TriggerMatcher
static std::vector< DispatchPolicy > createDefaultPolicies()
Helper to create the default configuration.