Project
Loading...
Searching...
No Matches
digits-reader-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
17#include <vector>
22
23using namespace o2::framework;
24
25void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
26{
28}
29
30// we need to add workflow options before including Framework/runDataProcessing
31void customize(std::vector<ConfigParamSpec>& workflowOptions)
32{
33 std::vector<ConfigParamSpec> options{
34 {"disable-mc", VariantType::Bool, false, {"Do not propagate MC info"}},
35 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
36 {"mch-output-digits-data-description", VariantType::String, "DIGITS", {"description string for the output digits message"}},
37 {"mch-output-digitrofs-data-description", VariantType::String, "DIGITROFS", {"description string for the output digit rofs message"}},
38 {"mch-output-digitlabels-data-description", VariantType::String, "DIGITLABELS", {"description string for the output digit labels message"}}};
39 workflowOptions.insert(workflowOptions.end(), options.begin(), options.end());
41}
42
44
46{
47 bool useMC = !cc.options().get<bool>("disable-mc");
48
49 auto name = fmt::format("mch-digit-reader-{}-{}",
50 cc.options().get<std::string>("mch-output-digits-data-description"),
51 cc.options().get<std::string>("mch-output-digitrofs-data-description"));
52
53 WorkflowSpec specs;
54 specs.emplace_back(o2::mch::getDigitReaderSpec(
55 useMC,
56 name,
57 cc.options().get<std::string>("mch-output-digits-data-description"),
58 cc.options().get<std::string>("mch-output-digitrofs-data-description"),
59 cc.options().get<std::string>("mch-output-digitlabels-data-description")));
60
61 o2::raw::HBFUtilsInitializer hbfIni(cc, specs);
62
63 return specs;
64}
WorkflowSpec defineDataProcessing(ConfigContext const &cc)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
GLuint const GLchar * name
Definition glcorearb.h:781
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getDigitReaderSpec(bool useMC, std::string_view specName="mch-digit-reader", std::string_view outputDigitDataDescription="DIGITS", std::string_view outputDigitRofDataDescription="DIGITROFS", std::string_view outputDigitLabelDataDescription="DIGITLABELS")
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))
std::vector< o2::mch::ChannelCode > cc