Project
Loading...
Searching...
No Matches
DataProcessorMatchers.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 O2_FRAMEWORK_DATAPROCESSORMATCHER_H_
12#define O2_FRAMEWORK_DATAPROCESSORMATCHER_H_
13#include <functional>
14
15namespace o2::framework
16{
17
19struct DeviceSpec;
20struct ConfigContext;
21
22// A matcher for a given DataProcessorSpec @p spec.
23using DataProcessorMatcher = std::function<bool(DataProcessorSpec const& spec)>;
24// A matcher which is specific to a given DeviceSpec. @a context is the ConfigContext associated with the topology.
25using DeviceMatcher = std::function<bool(DeviceSpec const& spec, ConfigContext const& context)>;
26// A matcher which is specific to a given edge between two DataProcessors, described
27// by @p source and @p dest. @p context is the ConfigContext associated with the topology.
28// NOTE: we use DataProcessorSpecs rather than devices, because when we assign the policy
29// we do not have all the devices yet.
30using EdgeMatcher = std::function<bool(DataProcessorSpec const& source, DataProcessorSpec const& dest, ConfigContext const& context)>;
31
37 static DataProcessorMatcher matchByName(const char* name);
38};
39
41 static DeviceMatcher matchByName(const char* name);
42};
43
45 static EdgeMatcher matchSourceByName(const char* name);
46 static EdgeMatcher matchDestByName(const char* name);
47 static EdgeMatcher matchEndsByName(const char* sourceName, const char* destName);
48};
49
50} // namespace o2::framework
51#endif // O2_FRAMEWORK_DATAPROCESSORMATCHER_H_
GLuint const GLchar * name
Definition glcorearb.h:781
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::function< bool(DataProcessorSpec const &source, DataProcessorSpec const &dest, ConfigContext const &context)> EdgeMatcher
std::function< bool(DataProcessorSpec const &spec)> DataProcessorMatcher
std::function< bool(DeviceSpec const &spec, ConfigContext const &context)> DeviceMatcher
static DataProcessorMatcher matchByName(const char *name)
static DeviceMatcher matchByName(const char *name)
static EdgeMatcher matchSourceByName(const char *name)
static EdgeMatcher matchEndsByName(const char *sourceName, const char *destName)
static EdgeMatcher matchDestByName(const char *name)