Project
Loading...
Searching...
No Matches
test_DetectMissingTimeframe.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.
20#include <fairmq/Device.h>
21
22#include <iostream>
23#include <chrono>
24#include <thread>
25#include <vector>
26
27using namespace o2::framework;
28
30
31// This is how you can define your processing in a declarative way
33{
35 .name = "A",
36 .outputs = {OutputSpec{{"a1"}, "TST", "A1"},
37 OutputSpec{{"a2"}, "TST", "A2"}},
38 .algorithm = AlgorithmSpec{adaptStateless(
39 [](DataAllocator& outputs, RawDeviceService& device, DataTakingContext& context, ProcessingContext& pcx) {
40 outputs.make<int>(OutputRef{"a1"}, 1);
41 static int i = 0;
42 outputs.make<int>(OutputRef{"a1"}, 1);
43 if (i++ % 2 == 0) {
44 outputs.make<int>(OutputRef{"a2"}, 1);
45 }
46 sleep(1);
47 })},
48 };
50 .name = "D",
51 .inputs = {InputSpec{"a1", "TST", "A1"},
52 InputSpec{"a2", "TST", "A2"}},
53 .algorithm = AlgorithmSpec{adaptStateless(
54 [](InputRecord& inputs) {
55 auto ref = inputs.get("a1");
56 auto header = o2::header::get<const DataProcessingHeader*>(ref.header);
57 LOG(info) << "Start time: " << header->startTime;
58 })},
59 };
60
62 WorkflowSpec{d});
63}
int32_t i
decltype(auto) make(const Output &spec, Args... args)
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
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
WorkflowSpec concat(T &&t, ARGS &&... args)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
WorkflowSpec defineDataProcessing(ConfigContext const &specs)
This function hooks up the the workflow specifications into the DPL driver.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"