Project
Loading...
Searching...
No Matches
tpc-time-series.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
14
20#include "GPUDebugStreamer.h"
21
22using namespace o2::framework;
23
24void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
25{
26 // option allowing to set parameters
27 std::vector<ConfigParamSpec> options{
28 ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
29 {"disable-root-output", VariantType::Bool, false, {"disable root-files output writers"}},
30 {"enable-unbinned-root-output", VariantType::Bool, false, {"writing out unbinned track data"}},
31 {"track-sources", VariantType::String, std::string{o2::dataformats::GlobalTrackID::ALL}, {"comma-separated list of sources to use"}},
32 {"material-type", VariantType::Int, 2, {"Type for the material budget during track propagation: 0=None, 1=Geo, 2=LUT"}}};
33 std::swap(workflowOptions, options);
34}
35
37
39{
40 WorkflowSpec workflow;
41 o2::conf::ConfigurableParam::updateFromString(config.options().get<std::string>("configKeyValues"));
42 const bool disableWriter = config.options().get<bool>("disable-root-output");
43 const bool enableUnbinnedWriter = config.options().get<bool>("enable-unbinned-root-output");
44 auto src = o2::dataformats::GlobalTrackID::getSourcesMask(config.options().get<std::string>("track-sources"));
45 auto materialType = static_cast<o2::base::Propagator::MatCorrType>(config.options().get<int>("material-type"));
46 workflow.emplace_back(o2::tpc::getTPCTimeSeriesSpec(disableWriter, materialType, enableUnbinnedWriter, src));
47 if (!disableWriter) {
48 workflow.emplace_back(o2::tpc::getTPCTimeSeriesWriterSpec());
49 }
50 return workflow;
51}
DPL completion policy helper for TPC scetor data.
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
o2::framework::DataProcessorSpec getTPCTimeSeriesWriterSpec()
o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, o2::dataformats::GlobalTrackID::mask_t src)
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
WorkflowSpec defineDataProcessing(ConfigContext const &config)
This function hooks up the the workflow specifications into the DPL driver.