Skip to content
Snippets Groups Projects
Commit 71c0fcf7 authored by Nicolas Koehler's avatar Nicolas Koehler Committed by Frank Winklmeier
Browse files

Check for number of concurrent threads when debugging muons

parent 8da0dde0
No related branches found
No related tags found
No related merge requests found
...@@ -42,8 +42,8 @@ namespace Muon { ...@@ -42,8 +42,8 @@ namespace Muon {
ATH_CHECK( detStore()->retrieve( m_detMgr ) ); ATH_CHECK( detStore()->retrieve( m_detMgr ) );
if( m_doNtuple ){ if( m_doNtuple ){
if (Gaudi::Concurrency::ConcurrencyFlags::concurrent()) { if (Gaudi::Concurrency::ConcurrencyFlags::concurrent() && Gaudi::Concurrency::ConcurrencyFlags::numThreads()>1) {
// Disabled under concurrency due to thread-safety concerns, but we want to keep it as a debug tool // 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"); ATH_MSG_DEBUG("HitNtuple disabled because of concurrency");
m_file = 0; m_file = 0;
m_tree = 0; m_tree = 0;
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
// (c) ATLAS Combined Muon software // (c) ATLAS Combined Muon software
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//<<<<<< INCLUDES >>>>>>
#include "MuonRecHelperTools/MuonEDMPrinterTool.h" #include "MuonRecHelperTools/MuonEDMPrinterTool.h"
#include "GaudiKernel/ConcurrencyFlags.h" #include "GaudiKernel/ConcurrencyFlags.h"
#include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h" #include "MuonCombinedToolInterfaces/IMuonCombinedTagTool.h"
...@@ -21,8 +20,6 @@ ...@@ -21,8 +20,6 @@
#include "MuonCombinedTool.h" #include "MuonCombinedTool.h"
namespace MuonCombined { namespace MuonCombined {
//<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>>
MuonCombinedTool::MuonCombinedTool (const std::string& type, const std::string& name, const IInterface* parent) MuonCombinedTool::MuonCombinedTool (const std::string& type, const std::string& name, const IInterface* parent)
: AthAlgTool(type, name, parent), : AthAlgTool(type, name, parent),
...@@ -48,10 +45,12 @@ namespace MuonCombined { ...@@ -48,10 +45,12 @@ namespace MuonCombined {
ATH_CHECK(m_printer.retrieve()); ATH_CHECK(m_printer.retrieve());
ATH_CHECK(m_muonCombinedTagTools.retrieve()); ATH_CHECK(m_muonCombinedTagTools.retrieve());
// debug tree, only in serial mode // debug tree, only for running with 1 thread
if(m_runMuonCombinedDebugger && !Gaudi::Concurrency::ConcurrencyFlags::concurrent()) { if(m_runMuonCombinedDebugger) {
ATH_CHECK(m_muonCombDebugger.retrieve()); if (!Gaudi::Concurrency::ConcurrencyFlags::concurrent() || Gaudi::Concurrency::ConcurrencyFlags::numThreads()==1) {
m_muonCombDebugger->bookBranches(); ATH_CHECK(m_muonCombDebugger.retrieve());
m_muonCombDebugger->bookBranches();
}
} }
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment