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
25#include "GPUDebugStreamer.h"
26
27using namespace o2::framework;
30
31// ------------------------------------------------------------------
32void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
33{
35}
36
37void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
38{
39 // option allowing to set parameters
40 std::vector<ConfigParamSpec> options{
41 ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
42 {"disable-root-output", VariantType::Bool, false, {"disable root-files output writers"}},
43 {"disable-root-input", VariantType::Bool, false, {"disable root-files input reader"}},
44 {"enable-unbinned-root-output", VariantType::Bool, false, {"writing out unbinned track data"}},
45 {"track-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources to use"}},
46 {"material-type", VariantType::Int, 2, {"Type for the material budget during track propagation: 0=None, 1=Geo, 2=LUT"}}};
49 std::swap(workflowOptions, options);
50}
51
53
55{
56 WorkflowSpec workflow;
57 o2::conf::ConfigurableParam::updateFromString(config.options().get<std::string>("configKeyValues"));
58 const bool disableWriter = config.options().get<bool>("disable-root-output");
59 const bool enableUnbinnedWriter = config.options().get<bool>("enable-unbinned-root-output");
60 GID::mask_t allowedSources = GID::getSourcesMask("ITS,TPC,ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF,FT0");
61 auto srcTrc = allowedSources & GID::getSourcesMask(config.options().get<std::string>("track-sources"));
63 if (GID::includesDet(DetID::ITS, srcTrc)) {
64 srcCls |= GID::getSourcesMask("ITS");
65 }
66 if (GID::includesDet(DetID::TRD, srcTrc)) {
67 srcCls |= GID::getSourcesMask("TRD");
68 }
69 if (GID::includesDet(DetID::TOF, srcTrc)) {
70 srcCls |= GID::getSourcesMask("TOF");
71 }
72
73 auto materialType = static_cast<o2::base::Propagator::MatCorrType>(config.options().get<int>("material-type"));
74
75 o2::globaltracking::InputHelper::addInputSpecs(config, workflow, srcCls, srcTrc, srcTrc, false);
76 o2::globaltracking::InputHelper::addInputSpecsPVertex(config, workflow, false); // P-vertex is always needed
77
78 workflow.emplace_back(o2::tpc::getTPCTimeSeriesSpec(disableWriter, materialType, enableUnbinnedWriter, srcTrc));
79 if (!disableWriter) {
80 workflow.emplace_back(o2::tpc::getTPCTimeSeriesWriterSpec());
81 }
82 o2::raw::HBFUtilsInitializer hbfIni(config, workflow);
83 return workflow;
84}
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
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
static constexpr ID ITS
Definition DetID.h:63
static constexpr ID TRD
Definition DetID.h:65
static constexpr ID TOF
Definition DetID.h:66
ConfigParamRegistry & options() const
static int addInputSpecs(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, GID::mask_t maskClusters, GID::mask_t maskMatches, GID::mask_t maskTracks, bool useMC=true, GID::mask_t maskClustersMC=GID::getSourcesMask(GID::ALL), GID::mask_t maskTracksMC=GID::getSourcesMask(GID::ALL), bool subSpecStrict=false)
static int addInputSpecsPVertex(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, bool mc)
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
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)
static void addITSConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts)
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))
WorkflowSpec defineDataProcessing(ConfigContext const &config)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)