Project
Loading...
Searching...
No Matches
CompletionPolicy.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
16#include <functional>
17#include <iostream>
18
19namespace o2::framework
20{
21
24std::vector<CompletionPolicy>
26{
27 return {
28 CompletionPolicyHelpers::consumeWhenAllOrdered("internal-dpl-aod-writer"),
29 CompletionPolicyHelpers::consumeWhenAny("internal-dpl-injected-dummy-sink", [](DeviceSpec const& s) { return s.name.find("internal-dpl-injected-dummy-sink") != std::string::npos; }),
31}
32
33std::ostream& operator<<(std::ostream& oss, CompletionPolicy::CompletionOp const& val)
34{
35 switch (val) {
37 oss << "consume";
38 break;
40 oss << "process";
41 break;
43 oss << "wait";
44 break;
46 oss << "discard";
47 break;
49 oss << "consumeExisting";
50 break;
52 oss << "consumeAndRescan";
53 break;
55 oss << "retry";
56 break;
57 };
58 return oss;
59}
60
61} // namespace o2::framework
GLuint GLfloat * val
Definition glcorearb.h:1582
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::ostream & operator<<(std::ostream &s, ChannelType const &type)
Stream operators so that we can use ChannelType with Boost.Test.
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
static CompletionPolicy consumeWhenAll(const char *name, CompletionPolicy::Matcher matcher)
Default Completion policy. When all the parts of a record have arrived, consume them.
static CompletionPolicy consumeWhenAny(const char *name, CompletionPolicy::Matcher matcher)
When any of the parts of the record have been received, consume them.
static std::vector< CompletionPolicy > createDefaultPolicies()
Helper to create the default configuration.
CompletionOp
Action to take with the InputRecord:
@ Retry
Like Wait but mark the cacheline as dirty.