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
20
21// Dummy pointers
22using CompletionPolicyData = std::vector<InputSpec>;
24static std::shared_ptr<o2::gpu::GPURecoWorkflowSpec> gTask;
25
27{
28
29framework::WorkflowSpec getWorkflow(bool useMC, const std::string& trmode, o2::gpu::GPUDataTypes::DeviceType dtype, bool useGPUWorkflow,
30 bool upstreamDigits, bool upstreamClusters, bool disableRootOutput, bool useGeom, int useTrig, bool overrideBeamPosition)
31{
33
34 if (!(upstreamDigits || upstreamClusters)) {
35 specs.emplace_back(o2::its3::getITS3DigitReaderSpec(useMC, false, "it3digits.root"));
36 }
37
38 if (!upstreamClusters) {
39 specs.emplace_back(o2::its3::getClustererSpec(useMC));
40 }
41
42 if (!disableRootOutput) {
43 specs.emplace_back(o2::its::getClusterWriterSpec(useMC));
44 }
45
46 if (trmode != "off") {
47 if (useGPUWorkflow) {
49 cfg.runITSTracking = true;
50 cfg.isITS3 = true;
51 cfg.itsTriggerType = useTrig;
52 cfg.itsOverrBeamEst = overrideBeamPosition;
53 cfg.processMC = useMC;
54 Inputs ggInputs;
55 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
57 ggInputs, true);
58 if (!useGeom) {
59 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
60 }
61
62 auto task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&gPolicyData, cfg, std::vector<int>(), 0, ggRequest);
63 gTask = task;
64 Inputs taskInputs = task->inputs();
65 Options taskOptions = task->options();
66 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
67
68 specs.emplace_back(DataProcessorSpec{
69 "its3-gpu-tracker",
70 taskInputs,
71 task->outputs(),
72 AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
73 taskOptions});
74 } else {
75 specs.emplace_back(o2::its3::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
76 }
77 if (!disableRootOutput) {
78 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
79 }
80 }
81
82 return specs;
83}
84
85} // namespace o2::its3::reco_workflow
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
framework::WorkflowSpec getWorkflow(bool useMC, const std::string &trmode, o2::gpu::GPUDataTypes::DeviceType dtype, bool useGPUWorkflow, bool upstreamDigits, bool upstreamClusters, bool disableRootOutput, bool useGeom, int useTrig, bool overrideBeamPosition)
framework::DataProcessorSpec getClustererSpec(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 getITS3DigitReaderSpec(bool useMC=true, bool useCalib=false, std::string defname="it3digits.root")
framework::DataProcessorSpec getClusterWriterSpec(bool useMC)
o2::framework::DataProcessorSpec getTrackWriterSpec(bool useMC)
std::vector< InputSpec > gPolicyData