Skip to content

Commit a8a5b62

Browse files
committed
GPU: Move statistics and QA processing of GPU Tracking Chain into separate function
1 parent 36f5b5d commit a8a5b62

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

GPU/GPUTracking/Global/GPUChainTracking.cxx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,10 +2205,6 @@ int GPUChainTracking::RunChain()
22052205
if (runRecoStep(RecoStep::TPCCompression, &GPUChainTracking::RunTPCCompression)) {
22062206
return 1;
22072207
}
2208-
if (GetDeviceProcessingSettings().runCompressionStatistics) {
2209-
CompressedClusters c = *mIOPtrs.tpcCompressedClusters;
2210-
mCompressionStatistics->RunStatistics(mIOPtrs.clustersNative, &c, param());
2211-
}
22122208
}
22132209

22142210
if (runRecoStep(RecoStep::TRDTracking, &GPUChainTracking::RunTRDTracking)) {
@@ -2223,6 +2219,17 @@ int GPUChainTracking::RunChain()
22232219
return 1;
22242220
}
22252221

2222+
return GetDeviceProcessingSettings().doublePipeline ? 0 : RunChainFinalize();
2223+
}
2224+
2225+
int GPUChainTracking::RunChainFinalize()
2226+
{
2227+
if (mIOPtrs.clustersNative && (GetRecoSteps() & RecoStep::TPCCompression) && GetDeviceProcessingSettings().runCompressionStatistics) {
2228+
CompressedClusters c = *mIOPtrs.tpcCompressedClusters;
2229+
mCompressionStatistics->RunStatistics(mIOPtrs.clustersNative, &c, param());
2230+
}
2231+
2232+
const bool needQA = GPUQA::QAAvailable() && (GetDeviceProcessingSettings().runQA || (GetDeviceProcessingSettings().eventDisplay && mIOPtrs.nMCInfosTPC));
22262233
if (needQA) {
22272234
mRec->getGeneralStepTimer(GeneralStep::QA).Start();
22282235
mQA->RunQA(!GetDeviceProcessingSettings().runQA);
@@ -2291,7 +2298,7 @@ int GPUChainTracking::FinalizePipelinedProcessing()
22912298
}
22922299
mPipelineFinalizationCtx.reset();
22932300
}
2294-
return 0;
2301+
return RunChainFinalize();
22952302
}
22962303

22972304
int GPUChainTracking::HelperReadEvent(int iSlice, int threadId, GPUReconstructionHelpers::helperParam* par) { return ReadEvent(iSlice, threadId); }

GPU/GPUTracking/Global/GPUChainTracking.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class GPUChainTracking : public GPUChain, GPUReconstructionHelpers::helperDelega
254254
std::vector<outputQueueEntry> mOutputQueue;
255255

256256
private:
257+
int RunChainFinalize();
257258
int RunTPCTrackingSlices_internal();
258259
std::pair<unsigned int, unsigned int> RunTPCClusterizer_transferZS(int iSlice, unsigned int start, unsigned int end, int lane);
259260
void RunTPCClusterizer_compactPeaks(GPUTPCClusterFinder& clusterer, GPUTPCClusterFinder& clustererShadow, int stage, bool doGPU, int lane);

0 commit comments

Comments
 (0)