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, bool doStag, its::TrackingMode::Type 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, doStag, false, "it3digits.root"));
36 }
37
38 if (!upstreamClusters) {
39 specs.emplace_back(o2::its3::getClustererSpec(useMC, doStag));
40 }
41
42 if (!disableRootOutput) {
43 specs.emplace_back(o2::itsmft::getITSClusterWriterSpec(useMC, doStag, false));
44 }
45
46 if (trmode != its::TrackingMode::Off) {
47 if (useGPUWorkflow) {
49 cfg.runITSTracking = true;
50 cfg.itsStaggered = doStag,
51 cfg.isITS3 = true;
52 cfg.itsTriggerType = useTrig;
53 cfg.itsOverrBeamEst = overrideBeamPosition;
54 cfg.processMC = useMC;
55 Inputs ggInputs;
56 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
58 ggInputs, true);
59 if (!useGeom) {
60 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
61 }
62
63 auto task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&gPolicyData, cfg, std::vector<int>(), 0, ggRequest);
64 gTask = task;
65 Inputs taskInputs = task->inputs();
66 Options taskOptions = task->options();
67 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
68
69 specs.emplace_back(DataProcessorSpec{
70 .name = "its3-gpu-tracker",
71 .inputs = taskInputs,
72 .outputs = task->outputs(),
73 .algorithm = AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
74 .options = taskOptions});
75 } else {
76 specs.emplace_back(o2::its3::getTrackerSpec(useMC, doStag, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
77 }
78 if (!disableRootOutput) {
79 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
80 }
81 }
82
83 return specs;
84}
85
86} // 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, bool doStag, its::TrackingMode::Type trmode, o2::gpu::gpudatatypes::DeviceType dtype, bool useGPUWorkflow, bool upstreamDigits, bool upstreamClusters, bool disableRootOutput, bool useGeom, int useTrig, bool overrideBeamPosition)
framework::DataProcessorSpec getITS3DigitReaderSpec(bool useMC=true, bool doStag=false, bool useCalib=false, std::string defname="it3digits.root")
framework::DataProcessorSpec getClustererSpec(bool useMC, bool doStag)
framework::DataProcessorSpec getTrackerSpec(bool useMC, bool doStag, bool useGeom, int useTrig, its::TrackingMode::Type trMode, const bool overrBeamEst=false, gpu::gpudatatypes::DeviceType dType=gpu::gpudatatypes::DeviceType::CPU)
o2::framework::DataProcessorSpec getTrackWriterSpec(bool useMC)
framework::DataProcessorSpec getITSClusterWriterSpec(bool useMC, bool doStag, bool clusterROFOnly=false)
std::vector< InputSpec > gPolicyData