Project
Loading...
Searching...
No Matches
test_SimpleCondition.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.
15#include <Monitoring/Monitoring.h>
18#include "Framework/Logger.h"
19
20using namespace o2::framework;
22
26{
27 return WorkflowSpec{
29 "condition_consumer", //
30 {
31 InputSpec{"condition", "TES", "STRING", 0, Lifetime::Condition}, //
32 }, //
33 Outputs{}, //
35 [](ProcessingContext& ctx) {
36 auto s = ctx.inputs().get<std::string>("condition");
37
38 if (s != "Hello") {
39 LOG(error) << "Expecting `Hello', found `" << s << "'";
40 } else {
41 LOG(info) << "Everything OK";
42 }
43 ctx.services().get<ControlService>().readyToQuit(QuitRequest::All);
44 } //
45 } //
46 } //
47 };
48}
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< OutputSpec > Outputs
the main header struct
Definition DataHeader.h:618
WorkflowSpec defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"