Project
Loading...
Searching...
No Matches
raw-to-digits-stream-workflow.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.
11
16#include "Framework/Task.h"
22#include "Framework/Logger.h"
25#include "Framework/Variant.h"
26
27// customize dispatch policy, dispatch immediately what is ready
28void customize(std::vector<o2::framework::DispatchPolicy>& policies)
29{
31 auto readerMatcher = [](auto const& spec) {
32 return true;
33 };
34 auto triggerMatcher = [](auto const& query) {
35 return true;
36 };
37 policies.push_back({"decoded-hmpid-digits", readerMatcher, DispatchOp::WhenReady, triggerMatcher});
38}
39
40// we need to add workflow options before including Framework/runDataProcessing
41void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
42{
43 std::string keyvaluehelp("Semicolon separated key=value strings ...");
44 workflowOptions.push_back(o2::framework::ConfigParamSpec{"configKeyValues", o2::framework::VariantType::String, "", {keyvaluehelp}});
45 workflowOptions.push_back(o2::framework::ConfigParamSpec{"ignore-dist-stf", o2::framework::VariantType::Bool, false, {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}});
46}
47
50
51using namespace o2;
52using namespace o2::framework;
53
55{
56 WorkflowSpec specs;
57 o2::conf::ConfigurableParam::updateFromString(cx.options().get<std::string>("configKeyValues"));
58 auto askSTFDist = !cx.options().get<bool>("ignore-dist-stf");
60 specs.push_back(producer);
61 return specs;
62}
A helper class to iteratate over all parts of all input routes.
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getDecodingSpec2(bool askSTFDist)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
void customize(std::vector< o2::framework::DispatchPolicy > &policies)
WorkflowSpec defineDataProcessing(const ConfigContext &cx)