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
26
28{
29
31 TrackingMode::Type trmode,
32 const bool overrideBeamPosition,
33 bool upstreamDigits,
34 bool upstreamClusters,
35 bool disableRootOutput,
36 bool useGeom,
37 int useTrig,
38 bool useGPUWF,
40{
42 if (!(upstreamDigits || upstreamClusters)) {
43 specs.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, false, true, "itsdigits.root"));
44 }
45 if (!upstreamClusters) {
46 specs.emplace_back(o2::its::getClustererSpec(useMC));
47 }
48 if (!disableRootOutput) {
49 specs.emplace_back(o2::its::getClusterWriterSpec(useMC));
50 }
51 if ((trmode != TrackingMode::Off) && (TrackerParamConfig::Instance().trackingMode != TrackingMode::Off)) {
52 if (useGPUWF) {
54 .itsTriggerType = useTrig,
55 .processMC = useMC,
56 .runITSTracking = true,
57 .itsOverrBeamEst = overrideBeamPosition,
58 };
59
60 Inputs ggInputs;
61 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
63 ggInputs, true);
64 if (!useGeom) {
65 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
66 }
67
68 static std::vector<InputSpec> policyData;
69 static std::shared_ptr<o2::gpu::GPURecoWorkflowSpec> task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&policyData, cfg, std::vector<int>(), 0, ggRequest);
70 Inputs taskInputs = task->inputs();
71 Options taskOptions = task->options();
72 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
73
74 specs.emplace_back(DataProcessorSpec{
75 .name = "its-gpu-tracker",
76 .inputs = taskInputs,
77 .outputs = task->outputs(),
78 .algorithm = AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
79 .options = taskOptions});
80 } else {
81 specs.emplace_back(o2::its::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
82 }
83 if (!disableRootOutput) {
84 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
85 specs.emplace_back(o2::globaltracking::getIRFrameWriterSpec("irfr:ITS/IRFRAMES/0", "o2_its_irframe.root", "irframe-writer-its"));
86 }
87 }
88 return specs;
89}
90
91} // namespace o2::its::reco_workflow
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, TrackingMode::Type 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, TrackingMode::Type trMode, const bool overrBeamEst=false, o2::gpu::gpudatatypes::DeviceType dType=o2::gpu::gpudatatypes::DeviceType::CPU)
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")