Project
Loading...
Searching...
No Matches
tpc-map-creator.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
17using namespace o2::framework;
19
20// we need to add workflow options before including Framework/runDataProcessing
21void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
22{
23 std::vector<o2::framework::ConfigParamSpec> options{
24 {"track-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources to use for tracking"}},
25 {"start-from-unbinned", VariantType::Bool, false, {"Do the binning of the residuals on-the-fly (taking into account allowed track-sources)"}},
26 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
27 std::swap(workflowOptions, options);
28}
29
30// ------------------------------------------------------------------
31
33
35{
36 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
37 o2::conf::ConfigurableParam::writeINI("o2tpcmapcreator-workflow_configuration.ini");
38
39 GID::mask_t allowedSources = GID::getSourcesMask("ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF");
40 GID::mask_t src = allowedSources & GID::getSourcesMask(configcontext.options().get<std::string>("track-sources"));
41
42 auto doBinning = configcontext.options().get<bool>("start-from-unbinned");
43
44 WorkflowSpec specs;
45 specs.emplace_back(o2::tpc::getTPCResidualReaderSpec(doBinning, src));
46 return specs;
47}
Global index for barrel track: provides provenance (detectors combination), index in respective array...
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromString(std::string const &)
static mask_t getSourcesMask(const std::string_view srcList)
static constexpr std::string_view ALL
keywork for all sources
ConfigParamRegistry & options() const
GLenum src
Definition glcorearb.h:1767
Defining PrimaryVertex explicitly as messageable.
Definition TFIDInfo.h:20
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getTPCResidualReaderSpec(bool doBinning, GID::mask_t src)
create a processor spec
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)