Skip to content
Snippets Groups Projects
Commit bad5b719 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'master-TRT_CalibAlgs' into 'master'

Replace a static local variable by a mutable atomic member variable in the TRT_StrawStatus class.

See merge request atlas/athena!34300
parents 20647f45 25d40f69
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <array> #include <array>
#include <atomic>
class AtlasDetectorID; class AtlasDetectorID;
class Identifier; class Identifier;
...@@ -112,6 +113,8 @@ namespace InDet ...@@ -112,6 +113,8 @@ namespace InDet
/** member variables for algorithm properties: */ /** member variables for algorithm properties: */
int m_printDetailedInformation; int m_printDetailedInformation;
mutable std::atomic<int> m_printStatusCount{0};
}; };
} // end of namespace } // end of namespace
......
...@@ -358,12 +358,11 @@ void InDet::TRT_StrawStatus::printDetailedInformation() { ...@@ -358,12 +358,11 @@ void InDet::TRT_StrawStatus::printDetailedInformation() {
int chip, HVpad; int chip, HVpad;
m_TRTStrawNeighbourSvc->getChip(id, chip); m_TRTStrawNeighbourSvc->getChip(id, chip);
m_TRTStrawNeighbourSvc->getPad(id, HVpad); m_TRTStrawNeighbourSvc->getPad(id, HVpad);
static int printStatusCount(0); if (!m_printStatusCount) {
if (!printStatusCount) {
ATH_MSG_INFO( "if the code crashes on the next line, there is a problem with m_TRTStrawStatusSummarySvc not being loaded " ); ATH_MSG_INFO( "if the code crashes on the next line, there is a problem with m_TRTStrawStatusSummarySvc not being loaded " );
ATH_MSG_INFO( "in that case, running with reco turned on normally solves the problem, know of no better solution at the moment" ); ATH_MSG_INFO( "in that case, running with reco turned on normally solves the problem, know of no better solution at the moment" );
ATH_MSG_INFO( "if you do not need the detailed print information, you can also just set printDetailedInformation to 0 to avoid this crash" ); ATH_MSG_INFO( "if you do not need the detailed print information, you can also just set printDetailedInformation to 0 to avoid this crash" );
printStatusCount++; m_printStatusCount++;
} }
int status = m_TRTStrawStatusSummaryTool->get_status( id ); int status = m_TRTStrawStatusSummaryTool->get_status( id );
int statusTemporary = m_TRTStrawStatusSummaryTool->getStatus( id ); int statusTemporary = m_TRTStrawStatusSummaryTool->getStatus( id );
......
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