diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx index 54e7219730c2b515169174f3b55044e093895030..8c99a27f0a2e3e9e5cbc9883ba7272eba57c37f6 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonLayerHoughTool.cxx @@ -42,8 +42,8 @@ namespace Muon { ATH_CHECK( detStore()->retrieve( m_detMgr ) ); if( m_doNtuple ){ - if (Gaudi::Concurrency::ConcurrencyFlags::concurrent()) { - // Disabled under concurrency due to thread-safety concerns, but we want to keep it as a debug tool + if (Gaudi::Concurrency::ConcurrencyFlags::concurrent() && Gaudi::Concurrency::ConcurrencyFlags::numThreads()>1) { + // Disabled for >1 threads due to thread-safety concerns, but we want to keep it as a debug tool ATH_MSG_DEBUG("HitNtuple disabled because of concurrency"); m_file = 0; m_tree = 0; diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx index 7f014a60980d5dc67ed9a076d2a4b3bafd753dda..01a400b59841aa44168857cb69b194f4b1b26f55 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCombinedTool.cxx @@ -12,7 +12,6 @@ // (c) ATLAS Combined Muon software ////////////////////////////////////////////////////////////////////////////// -//<<<<<< INCLUDES >>>>>> #include "MuonRecHelperTools/MuonEDMPrinterTool.h" #include "GaudiKernel/ConcurrencyFlags.h" #include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h" @@ -21,8 +20,6 @@ #include "MuonCombinedTool.h" namespace MuonCombined { - - //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> MuonCombinedTool::MuonCombinedTool (const std::string& type, const std::string& name, const IInterface* parent) : AthAlgTool(type, name, parent), @@ -48,10 +45,12 @@ namespace MuonCombined { ATH_CHECK(m_printer.retrieve()); ATH_CHECK(m_muonCombinedTagTools.retrieve()); - // debug tree, only in serial mode - if(m_runMuonCombinedDebugger && !Gaudi::Concurrency::ConcurrencyFlags::concurrent()) { - ATH_CHECK(m_muonCombDebugger.retrieve()); - m_muonCombDebugger->bookBranches(); + // debug tree, only for running with 1 thread + if(m_runMuonCombinedDebugger) { + if (!Gaudi::Concurrency::ConcurrencyFlags::concurrent() || Gaudi::Concurrency::ConcurrencyFlags::numThreads()==1) { + ATH_CHECK(m_muonCombDebugger.retrieve()); + m_muonCombDebugger->bookBranches(); + } } return StatusCode::SUCCESS;