Project
Loading...
Searching...
No Matches
test_CCDBFetcher.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
16#include <chrono>
17#include <thread>
18
19using namespace o2::framework;
20using namespace o2::header;
21
22// This is how you can define your processing in a declarative way
24{
25 return WorkflowSpec{
26 {
27 "A",
28 {InputSpec{"somecondition", "TOF", "LHCphase", 0, Lifetime::Condition, ccdbParamSpec("TOF/LHCphase")},
29 InputSpec{"sometimer", "TST", "BAR", 0, Lifetime::Timer, {startTimeParamSpec{1638548475371}}}},
30 {OutputSpec{"TST", "A1", 0, Lifetime::Timeframe}},
32 adaptStateless([](DataAllocator& outputs, InputRecord& inputs, ControlService& control) {
33 DataRef condition = inputs.get("somecondition");
34 auto payloadSize = DataRefUtils::getPayloadSize(condition);
35 if (payloadSize != 2048) {
36 LOGP(error, "Wrong size for condition payload (expected {}, found {}", 2048, payloadSize);
37 }
38 payloadSize;
39 control.readyToQuit(QuitRequest::All);
40 })},
41 Options{
42 {"test-option", VariantType::String, "test", {"A test option"}}},
43 }};
44}
WorkflowSpec defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.
void readyToQuit(bool all)
Compatibility with old API.
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< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< DataProcessorSpec > WorkflowSpec
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
ConfigParamSpec startTimeParamSpec(int64_t t)
O2 data header classes and API, v0.1.
Definition DetID.h:49
static o2::header::DataHeader::PayloadSizeType getPayloadSize(const DataRef &ref)