Project
Loading...
Searching...
No Matches
test_CCDBFetchToTimeframe.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.
12#include "Framework/Logger.h"
16
17#include <chrono>
18#include <thread>
19
20using namespace o2::framework;
21
22// Set a start value which might correspond to a real timestamp of an object in CCDB, for example:
23// o2-testworkflows-ccdb-fetch-to-timeframe --condition-backend http://alice-ccdb.cern.ch --start-value-enumeration 1575985965925000
25{
26 return WorkflowSpec{
27 {
28 "A",
29 {InputSpec{"somecondition", "TST", "textfile", 0, Lifetime::Condition, ccdbParamSpec("TOF/LHCphase")},
30 InputSpec{"somedata", "TST", "A1", 0, Lifetime::Timer, {startTimeParamSpec(1638548475370)}}},
31 {},
33 adaptStateless([](DataAllocator& outputs, InputRecord& inputs, ControlService& control) {
34 DataRef condition = inputs.get("somecondition");
35 auto payloadSize = DataRefUtils::getPayloadSize(condition);
36 if (payloadSize != 2048) {
37 LOGP(error, "Wrong size for condition payload (expected {}, found {})", 2048, payloadSize);
38 }
39 control.readyToQuit(QuitRequest::All);
40 })},
41 }};
42}
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)
static o2::header::DataHeader::PayloadSizeType getPayloadSize(const DataRef &ref)
WorkflowSpec defineDataProcessing(ConfigContext const &)
This function hooks up the the workflow specifications into the DPL driver.