From cb8b067a014511d04dfe0c16a222d7645eb98eb5 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:54:30 +0100 Subject: [PATCH 1/6] ITS: initialise each instance of the tracker, not only the first The one-off initialisation in updateTimeDependentParams was guarded by a function-local static, shared by every instance in the process: only the first instance created and configured what is its own. Keep the flag in the instance. With a single instance nothing changes. --- .../ITSMFT/ITS/tracking/include/ITStracking/TrackingInterface.h | 1 + Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackingInterface.h b/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackingInterface.h index 920e815299541..88cf1881d6bb7 100644 --- a/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackingInterface.h +++ b/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackingInterface.h @@ -99,6 +99,7 @@ class ITSTrackingInterface std::vector mFilter; TrackingMode::Type mMode = TrackingMode::Unset; bool mOverrideBeamEstimation = false; + bool mInitOnceDone = false; const o2::itsmft::TopologyDictionary* mDict = nullptr; std::unique_ptr mTracker = nullptr; std::unique_ptr mVertexer = nullptr; diff --git a/Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx b/Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx index b71c4219f6084..0a4e9f2c92575 100644 --- a/Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx +++ b/Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx @@ -386,7 +386,7 @@ void ITSTrackingInterface::run(framework::ProcessingContext& pc) void ITSTrackingInterface::updateTimeDependentParams(framework::ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (mOverrideBeamEstimation) { pc.inputs().get("meanvtx"); } From d6a0b88b919587cd1c6b84dd28899bd7b9f6fc21 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:54:30 +0100 Subject: [PATCH 2/6] MFT: initialise each instance of the tracker, not only the first The one-off initialisation in updateTimeDependentParams was guarded by a function-local static, shared by every instance in the process: only the first instance created and configured what is its own. Keep the flag in the instance. With a single instance nothing changes. --- Detectors/ITSMFT/MFT/workflow/include/MFTWorkflow/TrackerSpec.h | 1 + Detectors/ITSMFT/MFT/workflow/src/TrackerSpec.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Detectors/ITSMFT/MFT/workflow/include/MFTWorkflow/TrackerSpec.h b/Detectors/ITSMFT/MFT/workflow/include/MFTWorkflow/TrackerSpec.h index 3adbee07877aa..87dd2fba24773 100644 --- a/Detectors/ITSMFT/MFT/workflow/include/MFTWorkflow/TrackerSpec.h +++ b/Detectors/ITSMFT/MFT/workflow/include/MFTWorkflow/TrackerSpec.h @@ -57,6 +57,7 @@ class TrackerDPL : public o2::framework::Task float mMFTROFrameLengthMUSInv = -1.; ///< MFT RO frame in \mus inverse bool mUseMC = false; bool mFieldOn = true; + bool mInitOnceDone = false; int mNThreads = 4; std::shared_ptr mGGCCDBRequest; const o2::itsmft::TopologyDictionary* mDict = nullptr; diff --git a/Detectors/ITSMFT/MFT/workflow/src/TrackerSpec.cxx b/Detectors/ITSMFT/MFT/workflow/src/TrackerSpec.cxx index 6abebd8331503..24a8743e3c255 100644 --- a/Detectors/ITSMFT/MFT/workflow/src/TrackerSpec.cxx +++ b/Detectors/ITSMFT/MFT/workflow/src/TrackerSpec.cxx @@ -354,7 +354,7 @@ void TrackerDPL::endOfStream(EndOfStreamContext& ec) void TrackerDPL::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; if (pc.inputs().getPos("mftTGeo") >= 0) { From 921b6e82eb09921708fdf7bb3b4bad30331add89 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:54:30 +0100 Subject: [PATCH 3/6] GlobalTracking: initialise every matcher and vertexer instance, not only the first The one-off initialisation in updateTimeDependentParams was guarded by a function-local static, shared by every instance in the process: only the first instance created and configured what is its own. Keep the flag in the instance. With a single instance nothing changes. In the ITS-TPC, global forward and vertex-track matchers, the primary and secondary vertexers, the TPC track interpolation and MatchTPCITS itself. --- Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h | 1 + Detectors/GlobalTracking/src/MatchTPCITS.cxx | 2 +- Detectors/GlobalTrackingWorkflow/src/GlobalFwdMatchingSpec.cxx | 3 ++- Detectors/GlobalTrackingWorkflow/src/PrimaryVertexingSpec.cxx | 3 ++- .../GlobalTrackingWorkflow/src/SecondaryVertexingSpec.cxx | 3 ++- Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx | 3 ++- .../GlobalTrackingWorkflow/src/VertexTrackMatcherSpec.cxx | 3 ++- .../include/TPCInterpolationWorkflow/TPCInterpolationSpec.h | 1 + .../tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx | 2 +- 9 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h b/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h index 177c2eec4d137..c322cd66cef74 100644 --- a/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h +++ b/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h @@ -665,6 +665,7 @@ class MatchTPCITS ///< do we use track Z difference to reject fake matches? makes sense for triggered mode only bool mCompareTracksDZ = false; + bool mInitOnceDone = false; float YMaxAtXMatchingRef = 999.; ///< max Y in the sector at reference X diff --git a/Detectors/GlobalTracking/src/MatchTPCITS.cxx b/Detectors/GlobalTracking/src/MatchTPCITS.cxx index 6d2a8fcb691c3..bd5e7a9588b0b 100644 --- a/Detectors/GlobalTracking/src/MatchTPCITS.cxx +++ b/Detectors/GlobalTracking/src/MatchTPCITS.cxx @@ -280,7 +280,7 @@ void MatchTPCITS::updateTimeDependentParams() mBz = o2::base::Propagator::Instance()->getNominalBz(); mFieldON = std::abs(mBz) > 0.01; - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { initOnceDone = true; if (mParams->runAfterBurner) { diff --git a/Detectors/GlobalTrackingWorkflow/src/GlobalFwdMatchingSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/GlobalFwdMatchingSpec.cxx index a43a1e8943739..3f24498caf3a4 100644 --- a/Detectors/GlobalTrackingWorkflow/src/GlobalFwdMatchingSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/GlobalFwdMatchingSpec.cxx @@ -66,6 +66,7 @@ class GlobalFwdMatchingDPL : public Task const o2::itsmft::TopologyDictionary* mMFTDict = nullptr; // cluster patterns dictionary bool mUseMC = true; + bool mInitOnceDone = false; TStopwatch mTimer; }; @@ -136,7 +137,7 @@ void GlobalFwdMatchingDPL::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj) void GlobalFwdMatchingDPL::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; diff --git a/Detectors/GlobalTrackingWorkflow/src/PrimaryVertexingSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/PrimaryVertexingSpec.cxx index e92d5c35152e1..d8312867b3f65 100644 --- a/Detectors/GlobalTrackingWorkflow/src/PrimaryVertexingSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/PrimaryVertexingSpec.cxx @@ -72,6 +72,7 @@ class PrimaryVertexingSpec : public Task bool mValidateWithIR{false}; ///< require vertex validation with IR (e.g. from FT0) float mITSROFrameLengthMUS = 0.; float mITSROFBiasMUS = 0.; + bool mInitOnceDone = false; TStopwatch mTimer; }; @@ -253,7 +254,7 @@ void PrimaryVertexingSpec::finaliseCCDB(ConcreteDataMatcher& matcher, void* obj) void PrimaryVertexingSpec::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // Note: reading of the ITS AlpideParam needed for ITS timing is done by the RecoContainer diff --git a/Detectors/GlobalTrackingWorkflow/src/SecondaryVertexingSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/SecondaryVertexingSpec.cxx index 15ec0b0e7ba43..ade43a3c443cd 100644 --- a/Detectors/GlobalTrackingWorkflow/src/SecondaryVertexingSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/SecondaryVertexingSpec.cxx @@ -75,6 +75,7 @@ class SecondaryVertexingSpec : public Task const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps{nullptr}; GTrackID::mask_t mSrc{}; bool mEnableCCDBParams = false; + bool mInitOnceDone = false; bool mEnableCascades = false; bool mEnable3BodyVertices = false; bool mEnableStrangenessTracking = false; @@ -207,7 +208,7 @@ void SecondaryVertexingSpec::updateTimeDependentParams(ProcessingContext& pc) auto const& raw = pc.inputs().get("corrMap"); mTPCCorrMaps = &gpu::TPCFastTransformPOD::get(raw); } - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; mVertexer.init(); diff --git a/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx index 90a02fd6fc493..a8f9bf6d8f356 100644 --- a/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx @@ -89,6 +89,7 @@ class TPCITSMatchingDPL : public Task const o2::gpu::TPCFastTransformPOD* mTPCCorrMaps{}; o2::globaltracking::MatchTPCITS mMatching; // matching engine bool mUseFT0 = false; + bool mInitOnceDone = false; bool mCalibMode = false; bool mSkipTPCOnly = false; // to use only externally constrained tracks (for test only) bool mUseMC = true; @@ -204,7 +205,7 @@ void TPCITSMatchingDPL::updateTimeDependentParams(ProcessingContext& pc) mTPCCorrMaps = &o2::gpu::TPCFastTransformPOD::get(raw); float lumiCTP = mRequestCTPLumi ? pc.inputs().get("lumiCTP") : 0; - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; pc.inputs().get("MatchParam"); diff --git a/Detectors/GlobalTrackingWorkflow/src/VertexTrackMatcherSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/VertexTrackMatcherSpec.cxx index c08d3ab9f4c53..0fafe432f3c79 100644 --- a/Detectors/GlobalTrackingWorkflow/src/VertexTrackMatcherSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/VertexTrackMatcherSpec.cxx @@ -52,6 +52,7 @@ class VertexTrackMatcherSpec : public Task std::shared_ptr mGGCCDBRequest; o2::tpc::VDriftHelper mTPCVDriftHelper{}; o2::vertexing::VertexTrackMatcher mMatcher; + bool mInitOnceDone = false; TStopwatch mTimer; }; @@ -90,7 +91,7 @@ void VertexTrackMatcherSpec::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); mTPCVDriftHelper.extractCCDBInputs(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // put here init-once stuff diff --git a/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h b/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h index 953094b5155b7..2b5e77b764d3c 100644 --- a/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h +++ b/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/include/TPCInterpolationWorkflow/TPCInterpolationSpec.h @@ -68,6 +68,7 @@ class TPCInterpolationDPL : public Task bool mSendTrackData{false}; ///< if true, not only the clusters but also corresponding track data will be sent uint32_t mSlotLength{600u}; ///< the length of one calibration slot required to calculate max number of tracks per TF int mMatCorr{2}; ///< the material correction to be used for track interpolation + bool mInitOnceDone = false; TStopwatch mTimer; }; diff --git a/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx b/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx index b7e514bf76516..e47787aeec52f 100644 --- a/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/tpcinterpolationworkflow/src/TPCInterpolationSpec.cxx @@ -82,7 +82,7 @@ void TPCInterpolationDPL::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); mTPCVDriftHelper.extractCCDBInputs(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // other init-once stuff From 413ae4bbd85c11508e69b37b0160c5ad2195dfab Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:54:30 +0100 Subject: [PATCH 4/6] TRD: initialise each instance of the TRD tasks, not only the first The one-off initialisation in updateTimeDependentParams was guarded by a function-local static, shared by every instance in the process: only the first instance created and configured what is its own. Keep the flag in the instance. With a single instance nothing changes. In the global tracking, the tracklet transformer and the track based calibration. --- .../TRD/workflow/include/TRDWorkflow/TRDGlobalTrackingSpec.h | 1 + .../workflow/include/TRDWorkflow/TRDTrackletTransformerSpec.h | 1 + Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx | 2 +- Detectors/TRD/workflow/src/TRDTrackletTransformerSpec.cxx | 2 +- Detectors/TRD/workflow/src/TrackBasedCalibSpec.cxx | 3 ++- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Detectors/TRD/workflow/include/TRDWorkflow/TRDGlobalTrackingSpec.h b/Detectors/TRD/workflow/include/TRDWorkflow/TRDGlobalTrackingSpec.h index c05f72424562f..838b13ca6310c 100644 --- a/Detectors/TRD/workflow/include/TRDWorkflow/TRDGlobalTrackingSpec.h +++ b/Detectors/TRD/workflow/include/TRDWorkflow/TRDGlobalTrackingSpec.h @@ -91,6 +91,7 @@ class TRDGlobalTracking : public o2::framework::Task o2::dataformats::GlobalTrackID::mask_t mTrkMask; ///< seeding track sources (TPC, ITS-TPC) bool mTrigRecFilter{false}; ///< if true, TRD trigger records without matching ITS IR are filtered out bool mStrict{false}; ///< preliminary matching in strict mode + bool mInitOnceDone = false; TStopwatch mTimer; // temporary members -> should go into processor (GPUTRDTracker or additional refit processor?) std::unique_ptr mTPCRefitter; ///< TPC refitter used for TPC tracks refit during the reconstruction diff --git a/Detectors/TRD/workflow/include/TRDWorkflow/TRDTrackletTransformerSpec.h b/Detectors/TRD/workflow/include/TRDWorkflow/TRDTrackletTransformerSpec.h index d7d5d7c3a07ec..6fc629e4d553e 100644 --- a/Detectors/TRD/workflow/include/TRDWorkflow/TRDTrackletTransformerSpec.h +++ b/Detectors/TRD/workflow/include/TRDWorkflow/TRDTrackletTransformerSpec.h @@ -37,6 +37,7 @@ class TRDTrackletTransformerSpec : public o2::framework::Task std::shared_ptr mGGCCDBRequest; bool mTrigRecFilterActive = false; ///< if true, transform only TRD tracklets for which ITS data is available TrackletTransformer mTransformer; + bool mInitOnceDone = false; }; o2::framework::DataProcessorSpec getTRDTrackletTransformerSpec(bool trigRecFilterActive); diff --git a/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx b/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx index d051099a0baed..cc7629a4bf19d 100644 --- a/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx +++ b/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx @@ -99,7 +99,7 @@ void TRDGlobalTracking::updateTimeDependentParams(ProcessingContext& pc) float lumiCTP = mRequestCTPLumi ? pc.inputs().get("lumiCTP") : 0; // pc.inputs().get("cldict"); // called by the RecoContainer to trigger finaliseCCDB - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // init-once stuff diff --git a/Detectors/TRD/workflow/src/TRDTrackletTransformerSpec.cxx b/Detectors/TRD/workflow/src/TRDTrackletTransformerSpec.cxx index 3bac06b1b260f..43db536a05931 100644 --- a/Detectors/TRD/workflow/src/TRDTrackletTransformerSpec.cxx +++ b/Detectors/TRD/workflow/src/TRDTrackletTransformerSpec.cxx @@ -126,7 +126,7 @@ void TRDTrackletTransformerSpec::run(o2::framework::ProcessingContext& pc) void TRDTrackletTransformerSpec::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // init-once stuff diff --git a/Detectors/TRD/workflow/src/TrackBasedCalibSpec.cxx b/Detectors/TRD/workflow/src/TrackBasedCalibSpec.cxx index 8451d62bfff31..55f86d1839487 100644 --- a/Detectors/TRD/workflow/src/TrackBasedCalibSpec.cxx +++ b/Detectors/TRD/workflow/src/TrackBasedCalibSpec.cxx @@ -52,6 +52,7 @@ class TRDTrackBasedCalibDevice : public Task bool mDoGainCalib{false}; bool mDoVdExBCalib{false}; + bool mInitOnceDone = false; std::shared_ptr mDataRequest; std::shared_ptr mGGCCDBRequest; @@ -99,7 +100,7 @@ void TRDTrackBasedCalibDevice::updateTimeDependentParams(ProcessingContext& pc) if (mDoGainCalib) { pc.inputs().get("localgainfactors"); // just to trigger the finaliseCCDB } - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // init-once stuff From edeef6ce3c015b4ccc47c60ad27dbc6e6b7750d4 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:55:52 +0100 Subject: [PATCH 5/6] MID: initialise each instance of the tracker, not only the first The one-off initialisation in updateTimeDependentParams was guarded by a function-local static, shared by every instance in the process: only the first instance created and configured what is its own. Keep the flag in the instance. With a single instance nothing changes. --- Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx b/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx index 5b6ea6002ca33..ee6af9004607a 100644 --- a/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx +++ b/Detectors/MUON/MID/Workflow/src/TrackerSpec.cxx @@ -133,7 +133,7 @@ class TrackerDeviceDPL { // Triggers finalizeCCDB o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { initOnceDone = true; auto geoTrans = createTransformationFromManager(gGeoManager); @@ -166,6 +166,7 @@ class TrackerDeviceDPL bool mIsMC = false; bool mKeepAll = false; bool mCheckMasked = false; + bool mInitOnceDone = false; TrackLabeler mTrackLabeler{}; std::shared_ptr mGGCCDBRequest; std::unique_ptr mTracker{nullptr}; From a67936e2f654512c5633fa5f0eece04e7d3cc4a2 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:55:54 +0100 Subject: [PATCH 6/6] AOD: initialise each instance of the producer, not only the first The one-off initialisation in updateTimeDependentParams was guarded by a function-local static, shared by every instance in the process: only the first instance created and configured what is its own. Keep the flag in the instance. With a single instance nothing changes. The filled BCs still go once per process into o2::tof::Utils, which keeps one list for all. --- .../include/AODProducerWorkflow/AODProducerWorkflowSpec.h | 1 + Detectors/AOD/src/AODProducerWorkflowSpec.cxx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h b/Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h index 21728e78a7a20..e60959f3656d4 100644 --- a/Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h +++ b/Detectors/AOD/include/AODProducerWorkflow/AODProducerWorkflowSpec.h @@ -276,6 +276,7 @@ class AODProducerWorkflowDPL : public Task std::shared_ptr mStreamer; int mNThreads = 1; + bool mInitOnceDone = false; bool mUseMC = true; bool mUseSigFiltMC = false; // enable signal filtering for MC with embedding bool mEnableSV = true; // enable secondary vertices diff --git a/Detectors/AOD/src/AODProducerWorkflowSpec.cxx b/Detectors/AOD/src/AODProducerWorkflowSpec.cxx index d67925b1e3503..08b3c48239691 100644 --- a/Detectors/AOD/src/AODProducerWorkflowSpec.cxx +++ b/Detectors/AOD/src/AODProducerWorkflowSpec.cxx @@ -3176,7 +3176,7 @@ std::set AODProducerWorkflowDPL::filterEMCALIncomplete(const gsl::span void AODProducerWorkflowDPL::updateTimeDependentParams(ProcessingContext& pc) { o2::base::GRPGeomHelper::instance().checkUpdates(pc); - static bool initOnceDone = false; + auto& initOnceDone = mInitOnceDone; if (!initOnceDone) { // this params need to be queried only once initOnceDone = true; // Note: DPLAlpideParam for ITS and MFT will be loaded by the RecoContainer @@ -3185,11 +3185,13 @@ void AODProducerWorkflowDPL::updateTimeDependentParams(ProcessingContext& pc) auto grpECS = o2::base::GRPGeomHelper::instance().getGRPECS(); o2::BunchFilling bcf = o2::base::GRPGeomHelper::instance().getGRPLHCIF()->getBunchFilling(); std::bitset<3564> bs = bcf.getBCPattern(); - for (auto i = 0U; i < bs.size(); i++) { + static bool tofBCsDone = false; // o2::tof::Utils keeps one list for the process + for (auto i = 0U; !tofBCsDone && i < bs.size(); i++) { if (bs.test(i)) { o2::tof::Utils::addInteractionBC(i); } } + tofBCsDone = true; const auto& alpParamsITS = o2::itsmft::DPLAlpideParam::Instance(); mITSROFrameHalfLengthNS = 0.5 * (grpECS->isDetContinuousReadOut(o2::detectors::DetID::ITS) ? alpParamsITS.roFrameLengthInBC * o2::constants::lhc::LHCBunchSpacingNS : alpParamsITS.roFrameLengthTrig);