Project
Loading...
Searching...
No Matches
RecoWorkflow.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
13
24
25// Dummy TPC completion policy data
26using CompletionPolicyData = std::vector<InputSpec>;
27static CompletionPolicyData gPolicyData;
28static std::shared_ptr<o2::gpu::GPURecoWorkflowSpec> gTask;
29
30namespace o2
31{
32namespace its
33{
34namespace reco_workflow
35{
36
38 bool useCAtracker,
39 const std::string& trmode,
40 const bool overrideBeamPosition,
41 bool upstreamDigits,
42 bool upstreamClusters,
43 bool disableRootOutput,
44 bool useGeom,
45 int useTrig,
46 bool useGPUWF,
47 o2::gpu::GPUDataTypes::DeviceType dtype)
48{
50 if (!(upstreamDigits || upstreamClusters)) {
51 specs.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, false, true, "itsdigits.root"));
52 }
53 if (!upstreamClusters) {
54 specs.emplace_back(o2::its::getClustererSpec(useMC));
55 }
56 if (!disableRootOutput) {
57 specs.emplace_back(o2::its::getClusterWriterSpec(useMC));
58 }
59 if (!trmode.empty()) {
60 if (useCAtracker) {
61 if (useGPUWF) {
63 cfg.runITSTracking = true;
64 cfg.itsTriggerType = useTrig;
65 cfg.itsOverrBeamEst = overrideBeamPosition;
66
67 Inputs ggInputs;
68 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
70 ggInputs, true);
71 if (!useGeom) {
72 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
73 }
74
75 auto task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&gPolicyData, cfg, std::vector<int>(), 0, ggRequest);
76 gTask = task;
77 Inputs taskInputs = task->inputs();
78 Options taskOptions = task->options();
79 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
80
81 specs.emplace_back(DataProcessorSpec{
82 "its-gpu-tracker",
83 taskInputs,
84 task->outputs(),
85 AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
86 taskOptions});
87 } else {
88 specs.emplace_back(o2::its::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
89 }
90 } else {
91 specs.emplace_back(o2::its::getCookedTrackerSpec(useMC, useGeom, useTrig, trmode));
92 }
93 if (!disableRootOutput) {
94 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
95 specs.emplace_back(o2::globaltracking::getIRFrameWriterSpec("irfr:ITS/IRFRAMES/0", "o2_its_irframe.root", "irframe-writer-its"));
96 }
97 }
98 return specs;
99}
100
101} // namespace reco_workflow
102} // namespace its
103} // namespace o2
std::vector< InputSpec > CompletionPolicyData
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
o2::framework::DataProcessorSpec getIRFrameWriterSpec(const std::string &spec, const std::string &defFileName="o2_irframe.root", const std::string &devName="irframe-writer")
framework::WorkflowSpec getWorkflow(bool useMC, bool useCAtracker, const std::string &trmode, const bool overrideBeamPosition=false, bool upstreamDigits=false, bool upstreamClusters=false, bool disableRootOutput=false, bool useGeom=false, int useTrig=0, bool useGPUWF=false, o2::gpu::GPUDataTypes::DeviceType dType=o2::gpu::GPUDataTypes::DeviceType::CPU)
framework::DataProcessorSpec getClusterWriterSpec(bool useMC)
framework::DataProcessorSpec getTrackerSpec(bool useMC, bool useGeom, int useTrig, const std::string &trMode, const bool overrBeamEst=false, gpu::GPUDataTypes::DeviceType dType=gpu::GPUDataTypes::DeviceType::CPU)
framework::DataProcessorSpec getCookedTrackerSpec(bool useMC, bool useGeom, int useTrig, const std::string &trMode)
framework::DataProcessorSpec getClustererSpec(bool useMC)
o2::framework::DataProcessorSpec getTrackWriterSpec(bool useMC)
framework::DataProcessorSpec getITSDigitReaderSpec(bool useMC=true, bool useCalib=false, bool useTriggers=true, std::string defname="o2_itsdigits.root")
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...