Project
Loading...
Searching...
No Matches
ctp-raw-decoder.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
19
20#include <string>
21#include <stdexcept>
22#include <unordered_map>
23
24// add workflow options, note that customization needs to be declared before
25// including Framework/runDataProcessing
26void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
27{
28 std::vector<o2::framework::ConfigParamSpec> options{
29 {"ignore-dist-stf", o2::framework::VariantType::Bool, false, {"do not subscribe to FLP/DISTSUBTIMEFRAME/0 message (no lost TF recovery)"}},
30 {"no-lumi", o2::framework::VariantType::Bool, false, {"do not produce luminosity output"}},
31 {"no-digits", o2::framework::VariantType::Bool, false, {"do not produce digits output"}},
32 {"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writer"}},
33 {"configKeyValues", o2::framework::VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
34 std::swap(workflowOptions, options);
35}
36
37#include "Framework/runDataProcessing.h" // the main driver
40
45{
47 o2::conf::ConfigurableParam::updateFromString(cfgc.options().get<std::string>("configKeyValues"));
48
49 specs.emplace_back(o2::ctp::reco_workflow::getRawDecoderSpec(!cfgc.options().get<bool>("ignore-dist-stf"),
50 !cfgc.options().get<bool>("no-digits"),
51 !cfgc.options().get<bool>("no-lumi")));
52 if (!cfgc.options().get<bool>("disable-root-output")) {
53 specs.emplace_back(o2::ctp::getDigitWriterSpec(!cfgc.options().get<bool>("no-lumi")));
54 }
55 return specs;
56}
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
o2::framework::WorkflowSpec defineDataProcessing(o2::framework::ConfigContext const &cfgc)
o2::framework::DataProcessorSpec getRawDecoderSpec(bool askSTFDist, bool digits, bool lumi)
Creating DataProcessorSpec for the CTP.
framework::DataProcessorSpec getDigitWriterSpec(bool raw=true)
std::vector< DataProcessorSpec > WorkflowSpec