Project
Loading...
Searching...
No Matches
trk-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
14
18
19#include <vector>
20
21using namespace o2::framework;
22
23void customize(std::vector<CallbacksPolicy>& policies)
24{
25 // o2::raw::HBFUtilsInitializer::addNewTimeSliceCallback(policies);
26}
27
28void customize(std::vector<CompletionPolicy>& policies)
29{
30 // ordered policies for the writers
31 policies.push_back(CompletionPolicyHelpers::consumeWhenAllOrdered(".*(?:TRK|trk).*[W,w]riter.*"));
32}
33
34void customize(std::vector<ConfigParamSpec>& workflowOptions)
35{
36 // option allowing to set parameters
37 std::vector<ConfigParamSpec> options{
38 {"digits-from-upstream", VariantType::Bool, false, {"digits will be provided from upstream, skip digits reader"}},
39 {"clusters-from-upstream", VariantType::Bool, false, {"clusters will be provided from upstream, skip clusterizer"}},
40 {"disable-root-output", VariantType::Bool, false, {"do not write output root files"}},
41 {"disable-mc", VariantType::Bool, false, {"disable MC propagation even if available"}},
42 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
43 std::swap(workflowOptions, options);
44}
45
47#include "Framework/Logger.h"
48
50{
51 // Update the (declared) parameters if changed from the command line
52 auto useMC = !configcontext.options().get<bool>("disable-mc");
53 auto extDigits = configcontext.options().get<bool>("digits-from-upstream");
54 auto extClusters = configcontext.options().get<bool>("clusters-from-upstream");
55 auto disableRootOutput = configcontext.options().get<bool>("disable-root-output");
56 o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
57
58 // write the configuration used for the reco workflow
59 o2::conf::ConfigurableParam::writeINI("o2itsrecoflow_configuration.ini");
60
61 return o2::trk::reco_workflow::getWorkflow(useMC, extDigits, extClusters, disableRootOutput);
62}
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::WorkflowSpec getWorkflow(bool useMC, bool upstreamDigits=false, bool upstreamClusters=false, bool disableRootOutput=false)
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< CallbacksPolicy > &policies)