Project
Loading...
Searching...
No Matches
aod-producer-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
22
23using namespace o2::framework;
26
27void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
28{
30}
31
32void customize(std::vector<ConfigParamSpec>& workflowOptions)
33{
34 // option allowing to set parameters
35 std::vector<o2::framework::ConfigParamSpec> options{
36 {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
37 {"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writer"}},
38 {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation"}},
39 {"disable-secondary-vertices", o2::framework::VariantType::Bool, false, {"disable filling secondary vertices"}},
40 {"disable-strangeness-tracker", o2::framework::VariantType::Bool, false, {"disable filling strangeness tracking"}},
41 {"enable-FIT-extra", o2::framework::VariantType::Bool, false, {"enable FIT extra output"}},
42 {"enable-TRD-extra", o2::framework::VariantType::Bool, false, {"enable TRD extra output"}},
43 {"info-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources to use"}},
44 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}},
45 {"combine-source-devices", o2::framework::VariantType::Bool, false, {"merge DPL source devices"}},
46 {"ctpconfig-run-independent", o2::framework::VariantType::Bool, false, {"Use CTP config w/o runNumber tag"}}};
49 std::swap(workflowOptions, options);
50}
51
53
55{
56 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
57 auto useMC = !configcontext.options().get<bool>("disable-mc");
58 bool enableSV = !configcontext.options().get<bool>("disable-secondary-vertices");
59 bool enableST = !configcontext.options().get<bool>("disable-strangeness-tracker");
60 bool ctpcfgperrun = !configcontext.options().get<bool>("ctpconfig-run-independent");
61 bool enableFITextra = configcontext.options().get<bool>("enable-FIT-extra");
62 bool enableTRDextra = configcontext.options().get<bool>("enable-TRD-extra");
63
64 GID::mask_t allowedSrc = GID::getSourcesMask("ITS,MFT,MCH,MID,MCH-MID,TPC,TRD,ITS-TPC,TPC-TOF,TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD,TPC-TRD-TOF,ITS-TPC-TRD-TOF,MFT-MCH,FT0,FV0,FDD,ZDC,EMC,CTP,PHS,CPV,HMP");
65 GID::mask_t src = allowedSrc & GID::getSourcesMask(configcontext.options().get<std::string>("info-sources"));
66
67 // manually add TOF to MC mask for addInputSpecs()
69 src.set(o2::detectors::DetID::TOF);
70 }
71
72 WorkflowSpec specs;
73 specs.emplace_back(o2::aodproducer::getAODProducerWorkflowSpec(src, enableSV, enableST, useMC, ctpcfgperrun, enableFITextra, enableTRDextra));
74
75 auto srcCls = src & ~(GID::getSourceMask(GID::MCH) | GID::getSourceMask(GID::MID)); // Don't read global MID and MCH clusters (those attached to tracks are always read)
76 auto srcMtc = src;
77
78 WorkflowSpec inputspecs;
79 o2::globaltracking::InputHelper::addInputSpecs(configcontext, inputspecs, srcCls, srcMtc, src, useMC, src);
80 o2::globaltracking::InputHelper::addInputSpecsPVertex(configcontext, inputspecs, useMC);
81 if (enableSV) {
83 }
84 if (enableST) {
85 o2::globaltracking::InputHelper::addInputSpecsStrangeTrack(configcontext, inputspecs, useMC);
86 }
87 if (configcontext.options().get<bool>("combine-source-devices")) {
88 std::vector<DataProcessorSpec> unmerged;
89 specs.push_back(specCombiner("AOD-input-reader", inputspecs, unmerged));
90 for (auto& is : unmerged) {
91 specs.push_back(is);
92 }
93 } else {
94 for (auto& s : inputspecs) {
95 specs.push_back(s);
96 }
97 }
98
99 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
100 o2::raw::HBFUtilsInitializer hbfIni(configcontext, specs);
101
102 return std::move(specs);
103}
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
Global index for barrel track: provides provenance (detectors combination), index in respective array...
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
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:60
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 addInputSpecsStrangeTrack(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, bool mc)
static int addInputSpecsSVertex(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs)
static int addInputSpecsPVertex(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, bool mc)
GLenum src
Definition glcorearb.h:1767
framework::DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, bool enableST, bool useMC, bool CTPConfigPerRun, bool enableFITextra, bool enableTRDextra)
create a processor spec
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
o2::framework::DataProcessorSpec specCombiner(std::string const &name, std::vector< DataProcessorSpec > const &speccollection, std::vector< DataProcessorSpec > &remaining)
std::vector< DataProcessorSpec > WorkflowSpec
static void addConfigOption(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))