-
Notifications
You must be signed in to change notification settings - Fork 496
Expand file tree
/
Copy pathInputRoute.h
More file actions
60 lines (51 loc) · 2.28 KB
/
InputRoute.h
File metadata and controls
60 lines (51 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#ifndef FRAMEWORK_INPUTROUTE_H
#define FRAMEWORK_INPUTROUTE_H
#include "Framework/ExpirationHandler.h"
#include "Framework/InputSpec.h"
#include <cstddef>
#include <string>
#include <functional>
#include <optional>
namespace o2::framework
{
struct PartRef;
struct ServiceRegistry;
struct DeviceState;
class ConfigParamRegistry;
struct RouteConfigurator {
using CreationConfigurator = std::function<ExpirationHandler::Creator(DeviceState&, ConfigParamRegistry const&)>;
using DanglingConfigurator = std::function<ExpirationHandler::Checker(DeviceState&, ConfigParamRegistry const&)>;
using ExpirationConfigurator = std::function<ExpirationHandler::Handler(DeviceState&, ConfigParamRegistry const&)>;
CreationConfigurator creatorConfigurator = nullptr;
DanglingConfigurator danglingConfigurator = nullptr;
ExpirationConfigurator expirationConfigurator = nullptr;
};
/// This uniquely identifies a route to from which data matching @a matcher
/// input spec gets to the device. In case of time pipelining @a timeslice
/// refers to the timeslice associated to this route. The three callbacks @a
/// creatorConfigurator, @a danglingChecker and @a expirationHandler are used
/// to respectively create new empty timeslices, decide wether or not the input
/// should be created without having incoming data associated to it and if yes,
/// how. By default inputs are never considered valid and they are never
/// created from nothing.
struct InputRoute {
// FIXME: This should really go away and we should make sure that
// whenever we pass the input routes we also have the associated
// input specs available.
InputSpec matcher;
size_t inputSpecIndex;
std::string sourceChannel;
size_t timeslice;
std::optional<RouteConfigurator> configurator;
};
} // namespace o2::framework
#endif // FRAMEWORK_INPUTROUTE_H