Project
Loading...
Searching...
No Matches
mft-reco-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
18
19using namespace o2::framework;
20
21void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
22{
24}
25
26void customize(std::vector<o2::framework::CompletionPolicy>& policies)
27{
28 // ordered policies for the writers
29 policies.push_back(CompletionPolicyHelpers::consumeWhenAllOrdered(".*(?:MFT|mft).*[W,w]riter.*"));
30}
31
32// we need to add workflow options before including Framework/runDataProcessing
33void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
34{
35 // option allowing to set parameters
36 std::vector<o2::framework::ConfigParamSpec> options{
37 {"digits-from-upstream", o2::framework::VariantType::Bool, false, {"digits will be provided from upstream, skip digits reader"}},
38 {"clusters-from-upstream", o2::framework::VariantType::Bool, false, {"clusters will be provided from upstream, skip clusterizer"}},
39 {"disable-root-output", o2::framework::VariantType::Bool, false, {"do not write output root files"}},
40 {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation even if available"}},
41 {"disable-tracking", o2::framework::VariantType::Bool, false, {"disable tracking step"}},
42 {"run-assessment", o2::framework::VariantType::Bool, false, {"run MFT assessment workflow"}},
43 {"disable-process-gen", o2::framework::VariantType::Bool, false, {"disable processing of all generated tracks (depends on --run-assessment)"}},
44 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
45 {"nThreads", VariantType::Int, 1, {"Number of threads"}},
46 {"use-full-geometry", o2::framework::VariantType::Bool, false, {"use full geometry instead of the light-weight MFT part"}},
47 {"run-tracks2records", o2::framework::VariantType::Bool, false, {"run MFT alignment tracks to records workflow"}}};
50 std::swap(workflowOptions, options);
51}
52
54
56{
57 // Update the (declared) parameters if changed from the command line
58 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
59 // write the configuration
60 o2::conf::ConfigurableParam::writeINI("o2mftrecoflow_configuration.ini");
61
62 auto useMC = !configcontext.options().get<bool>("disable-mc");
63 auto extDigits = configcontext.options().get<bool>("digits-from-upstream");
64 auto extClusters = configcontext.options().get<bool>("clusters-from-upstream");
65 auto disableRootOutput = configcontext.options().get<bool>("disable-root-output");
66 auto runAssessment = configcontext.options().get<bool>("run-assessment");
67 auto processGen = !configcontext.options().get<bool>("disable-process-gen");
68 auto runTracking = !configcontext.options().get<bool>("disable-tracking");
69 auto nThreads = configcontext.options().get<int>("nThreads");
70 auto runTracks2Records = configcontext.options().get<bool>("run-tracks2records");
71 auto useGeom = configcontext.options().get<bool>("use-full-geometry");
73
75 useMC,
76 doStag,
77 useGeom,
78 extDigits,
79 extClusters,
80 disableRootOutput,
81 runAssessment,
82 processGen,
83 runTracking,
84 nThreads,
85 runTracks2Records);
86
87 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
88 o2::raw::HBFUtilsInitializer hbfIni(configcontext, wf);
89
90 return std::move(wf);
91}
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::vector< DataProcessorSpec > WorkflowSpec
framework::WorkflowSpec getWorkflow(bool useMC, bool doStag, bool useGeom, bool upstreamDigits, bool upstreamClusters, bool disableRootOutput, bool runAssessment, bool processGen, bool runTracking, int nThreads, bool runTracks2Records)
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
static void addMFTConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts)
static bool isMFTStaggeringEnabled(o2::framework::ConfigContext const &cfgc)
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))