Project
Loading...
Searching...
No Matches
test_SimpleWildcard.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
18#include "Framework/Logger.h"
19#include <algorithm>
20#include <memory>
21#include <unordered_map>
22#include <TObjString.h>
23
24using namespace o2::framework;
25
27{
28 return {{"A1",
29 Inputs{},
30 Outputs{
31 OutputSpec{{"out"}, "TST", "OUT", 0}},
33 [](ProcessingContext& ctx) {
34 ctx.outputs().make<TObjString>(OutputRef{"out", 0}, "abc");
35 ctx.services().get<ControlService>().endOfStream();
36 ctx.services().get<ControlService>().readyToQuit(QuitRequest::Me);
37 }}},
38 {"A2",
39 Inputs{},
40 Outputs{
41 OutputSpec{{"out"}, "TST", "OUT", 1}},
43 [](ProcessingContext& ctx) {
44 ctx.outputs().make<TObjString>(OutputRef{"out", 1}, "def");
45 ctx.services().get<ControlService>().endOfStream();
46 ctx.services().get<ControlService>().readyToQuit(QuitRequest::Me);
47 }}},
48 {"B",
49 Inputs{InputSpec{"in", {"TST", "OUT"}}},
50 Outputs{},
52 callbacks.set<CallbackService::Id::EndOfStream>([](EndOfStreamContext& context) {
53 context.services().get<ControlService>().readyToQuit(QuitRequest::All);
54 });
55 return adaptStateless([](InputRecord& inputs) {
56 auto s = inputs.get<TObjString*>("in");
57 LOG(info) << "String is " << s->GetString().Data();
58 }); })}}};
59}
The input API of the Data Processing Layer This class holds the inputs which are valid for processing...
decltype(auto) get(R binding, int part=0) const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs
AlgorithmSpec::InitCallback adaptStateful(LAMBDA l)
WorkflowSpec defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"