Project
Loading...
Searching...
No Matches
raw-decoder-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
12#include <string>
13#include <vector>
14#include "Framework/Variant.h"
20
21using namespace o2::framework;
22using namespace o2::focal;
23
24void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
25{
27}
28
29// we need to add workflow options before including Framework/runDataProcessing
30void customize(std::vector<ConfigParamSpec>& workflowOptions)
31{
32 std::vector<ConfigParamSpec> options{
33 {"output-subspec", VariantType::UInt32, 0U, {"Subspecification for output objects"}},
34 {"askdistsft", VariantType::Bool, false, {"Subscribe to FLP/DISTSUBTIMEFRAME"}},
35 {"no-pads", VariantType::Bool, false, {"Disable handling of pad data"}},
36 {"no-pixels", VariantType::Bool, false, {"Disable handling of pixel data"}},
37 {"debugmode", VariantType::Bool, false, {"Run dedicated debug code"}},
38 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
40 workflowOptions.insert(workflowOptions.end(), options.begin(), options.end());
41}
42
44
46{
47
48 bool disablePads = cfgc.options().get<bool>("no-pads"),
49 disablePixels = cfgc.options().get<bool>("no-pixels"),
50 askdiststf = cfgc.options().get<bool>("askdistsft"),
51 debugmode = cfgc.options().get<bool>("debugmode");
52 int outputSubspec = cfgc.options().get<int>("output-subspec");
53
54 o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
55
56 WorkflowSpec specs;
57 specs.emplace_back(o2::focal::reco_workflow::getRawDecoderSpec(askdiststf, outputSubspec, !disablePads, !disablePixels, debugmode));
58
59 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
60 o2::raw::HBFUtilsInitializer hbfIni(cfgc, specs);
61 return specs;
62}
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
framework::DataProcessorSpec getRawDecoderSpec(bool askDISTSTF, uint32_t outputSubspec, bool usePadData, bool usePixelData, bool debugMode)
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
WorkflowSpec defineDataProcessing(ConfigContext const &cfgc)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))