|
8 | 8 | // granted to it by virtue of its status as an Intergovernmental Organization |
9 | 9 | // or submit itself to any jurisdiction. |
10 | 10 |
|
11 | | -/// @file CATrackerSpec.cxx |
| 11 | +/// @file GPUWorkflowSpec.cxx |
12 | 12 | /// @author Matthias Richter |
13 | 13 | /// @since 2018-04-18 |
14 | 14 | /// @brief Processor spec for running TPC CA tracking |
15 | 15 |
|
16 | | -#include "TPCWorkflow/CATrackerSpec.h" |
| 16 | +#include "GPUWorkflow/GPUWorkflowSpec.h" |
17 | 17 | #include "Headers/DataHeader.h" |
18 | 18 | #include "Framework/WorkflowSpec.h" // o2::framework::mergeInputs |
19 | 19 | #include "Framework/DataRefUtils.h" |
@@ -79,14 +79,11 @@ using namespace o2::header; |
79 | 79 | using namespace o2::gpu; |
80 | 80 | using namespace o2::base; |
81 | 81 | using namespace o2::dataformats; |
82 | | -using namespace o2::tpc::reco_workflow; |
| 82 | +using namespace o2::tpc; |
83 | 83 |
|
84 | | -namespace o2 |
| 84 | +namespace o2::gpu |
85 | 85 | { |
86 | | -namespace tpc |
87 | | -{ |
88 | | - |
89 | | -DataProcessorSpec getCATrackerSpec(CompletionPolicyData* policyData, ca::Config const& specconfig, std::vector<int> const& tpcsectors, unsigned long tpcSectorMask) |
| 86 | +DataProcessorSpec getGPURecoWorkflowSpec(GPUWorkflow::CompletionPolicyData* policyData, GPUWorkflow::Config const& specconfig, std::vector<int> const& tpcsectors, unsigned long tpcSectorMask) |
90 | 87 | { |
91 | 88 | if (specconfig.outputCAClusters && !specconfig.caClusterer && !specconfig.decompressTPC) { |
92 | 89 | throw std::runtime_error("inconsistent configuration: cluster output is only possible if CA clusterer is activated"); |
@@ -157,7 +154,7 @@ DataProcessorSpec getCATrackerSpec(CompletionPolicyData* policyData, ca::Config |
157 | 154 | } |
158 | 155 |
|
159 | 156 | if (config.configGRP.continuousMaxTimeBin == -1) { |
160 | | - config.configGRP.continuousMaxTimeBin = (o2::raw::HBFUtils::Instance().getNOrbitsPerTF() * o2::constants::lhc::LHCMaxBunches + 2 * constants::LHCBCPERTIMEBIN - 2) / constants::LHCBCPERTIMEBIN; |
| 157 | + config.configGRP.continuousMaxTimeBin = (o2::raw::HBFUtils::Instance().getNOrbitsPerTF() * o2::constants::lhc::LHCMaxBunches + 2 * o2::tpc::constants::LHCBCPERTIMEBIN - 2) / o2::tpc::constants::LHCBCPERTIMEBIN; |
161 | 158 | } |
162 | 159 | if (config.configProcessing.deviceNum == -2) { |
163 | 160 | int myId = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId; |
@@ -657,7 +654,7 @@ DataProcessorSpec getCATrackerSpec(CompletionPolicyData* policyData, ca::Config |
657 | 654 | char* buffer = pc.outputs().make<char>({gDataOriginTPC, "CLUSTERNATIVE", subspec, Lifetime::Timeframe, {clusterOutputSectorHeader}}, accessIndex.nClustersSector[i] * sizeof(*accessIndex.clustersLinear) + sizeof(ClusterCountIndex)).data(); |
658 | 655 | ClusterCountIndex* outIndex = reinterpret_cast<ClusterCountIndex*>(buffer); |
659 | 656 | memset(outIndex, 0, sizeof(*outIndex)); |
660 | | - for (int j = 0; j < constants::MAXGLOBALPADROW; j++) { |
| 657 | + for (int j = 0; j < o2::tpc::constants::MAXGLOBALPADROW; j++) { |
661 | 658 | outIndex->nClusters[i][j] = accessIndex.nClusters[i][j]; |
662 | 659 | } |
663 | 660 | memcpy(buffer + sizeof(*outIndex), accessIndex.clusters[i][0], accessIndex.nClustersSector[i] * sizeof(*accessIndex.clustersLinear)); |
@@ -709,7 +706,7 @@ DataProcessorSpec getCATrackerSpec(CompletionPolicyData* policyData, ca::Config |
709 | 706 | auto createInputSpecs = [&tpcsectors, &specconfig, policyData]() { |
710 | 707 | Inputs inputs; |
711 | 708 | if (specconfig.decompressTPC) { |
712 | | - inputs.emplace_back(InputSpec{"input", ConcreteDataTypeMatcher{gDataOriginTPC, specconfig.decompressTPCFromROOT ? header::DataDescription("COMPCLUSTERS") : header::DataDescription("COMPCLUSTERSFLAT")}, Lifetime::Timeframe}); |
| 709 | + inputs.emplace_back(InputSpec{"input", ConcreteDataTypeMatcher{gDataOriginTPC, specconfig.decompressTPCFromROOT ? o2::header::DataDescription("COMPCLUSTERS") : o2::header::DataDescription("COMPCLUSTERSFLAT")}, Lifetime::Timeframe}); |
713 | 710 | } else if (specconfig.caClusterer) { |
714 | 711 | // We accept digits and MC labels also if we run on ZS Raw data, since they are needed for MC label propagation |
715 | 712 | if ((!specconfig.zsOnTheFly || specconfig.processMC) && !specconfig.zsDecoder) { |
@@ -799,6 +796,4 @@ DataProcessorSpec getCATrackerSpec(CompletionPolicyData* policyData, ca::Config |
799 | 796 | {createOutputSpecs()}, |
800 | 797 | AlgorithmSpec(initFunction)}; |
801 | 798 | } |
802 | | - |
803 | | -} // namespace tpc |
804 | | -} // namespace o2 |
| 799 | +} // namespace o2::gpu |
0 commit comments