Project
Loading...
Searching...
No Matches
test_SingleDataSource.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.
14
15#include <chrono>
16#include <thread>
17
18using namespace o2::framework;
19
20// This is how you can define your processing in a declarative way
22{
23 return WorkflowSpec{
24 {
25 "A",
26 {},
27 {OutputSpec{"TST", "A1", 0, Lifetime::Timeframe}},
29 [](ProcessingContext& ctx) {
30 std::this_thread::sleep_for(std::chrono::seconds(1));
31 auto& aData = ctx.outputs().make<int>(Output{"TST", "A1", 0}, 1);
32 ctx.services().get<ControlService>().readyToQuit(QuitRequest::All);
33 }},
34 Options{{"test-option", VariantType::String, "test", {"A test option"}}},
35 }};
36}
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
WorkflowSpec defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.