Skip to content

Commit 1fd7b76

Browse files
committed
GPU Workflow: Avoid duplicated variable
1 parent 202d71b commit 1fd7b76

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

GPU/Workflow/src/GPUWorkflowITS.cxx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@ int32_t GPURecoWorkflowSpec::runITSTracking(o2::framework::ProcessingContext& pc
3737
LOGP(debug, "GPUChainITS is giving me device propagator: {}", (void*)mGPUReco->GetDeviceO2Propagator());
3838
mITSTrackingInterface->run(pc);
3939
static bool first = true;
40-
if (first) {
41-
first = false;
42-
if (pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) {
43-
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, o2::its::VertexerParamConfig::Instance().getName()), o2::its::VertexerParamConfig::Instance().getName());
44-
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, o2::its::TrackerParamConfig::Instance().getName()), o2::its::TrackerParamConfig::Instance().getName());
45-
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, o2::its::ITSGpuTrackingParamConfig::Instance().getName()), o2::its::ITSGpuTrackingParamConfig::Instance().getName());
46-
}
40+
if (mNTFs == 1 && pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) {
41+
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, o2::its::VertexerParamConfig::Instance().getName()), o2::its::VertexerParamConfig::Instance().getName());
42+
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, o2::its::TrackerParamConfig::Instance().getName()), o2::its::TrackerParamConfig::Instance().getName());
43+
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, o2::its::ITSGpuTrackingParamConfig::Instance().getName()), o2::its::ITSGpuTrackingParamConfig::Instance().getName());
4744
}
4845
return 0;
4946
}

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,13 +517,6 @@ int32_t GPURecoWorkflowSpec::runMain(o2::framework::ProcessingContext* pc, GPUTr
517517
if (retVal == 0 && mSpecConfig.runITSTracking) {
518518
retVal = runITSTracking(*pc);
519519
}
520-
static bool first = true;
521-
if (first) {
522-
first = false;
523-
if (pc && pc->services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { // TPC ConfigurableCarams are somewhat special, need to construct by hand
524-
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc->services().get<const o2::framework::DeviceSpec>().name, "rec_tpc"), "GPU_rec_tpc,GPU_rec,GPU_proc_param,GPU_proc,GPU_global,trackTuneParams");
525-
}
526-
}
527520
}
528521

529522
if (!mSpecConfig.enableDoublePipeline) { // TODO: Why is this needed for double-pipeline?
@@ -819,6 +812,10 @@ void GPURecoWorkflowSpec::run(ProcessingContext& pc)
819812
mNTFDumps++;
820813
}
821814
}
815+
if (mNTFs == 1 && pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { // TPC ConfigurableCarams are somewhat special, need to construct by hand
816+
o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, "rec_tpc"), "GPU_rec_tpc,GPU_rec,GPU_proc_param,GPU_proc,GPU_global,trackTuneParams");
817+
}
818+
822819
std::unique_ptr<GPUTrackingInOutPointers> ptrsDump;
823820
if (mConfParam->dumpBadTFMode == 2) {
824821
ptrsDump.reset(new GPUTrackingInOutPointers);

0 commit comments

Comments
 (0)