From c8ebba00131f218c3f4502adaeafbfb461357d83 Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Thu, 2 Sep 2021 14:56:28 -0400 Subject: [PATCH] MuonAGDDBase: Enable thread-safety checking. Enable thread-safety checking. --- .../MuonAGDDBase/ATLAS_CHECK_THREAD_SAFETY | 1 + .../MuonDetDescr/MuonAGDDBase/src/AGDDMuonStation.cxx | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) create mode 100644 MuonSpectrometer/MuonDetDescr/MuonAGDDBase/MuonAGDDBase/ATLAS_CHECK_THREAD_SAFETY diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/MuonAGDDBase/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/MuonAGDDBase/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 000000000000..6bd22768dad1 --- /dev/null +++ b/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/MuonAGDDBase/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +MuonSpectrometer/MuonDetDescr/MuonAGDDBase diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/src/AGDDMuonStation.cxx b/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/src/AGDDMuonStation.cxx index b3245684b94f..adff8d754ad1 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/src/AGDDMuonStation.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/src/AGDDMuonStation.cxx @@ -32,14 +32,8 @@ void AGDDMuonStation::CreateSolid (const AGDDBuilder& /*builder*/) void AGDDMuonStation::CreateVolume (const AGDDBuilder& builder) { std::cout<<"this is AGDDMuonStation::CreateVolume()"<<std::endl; - static int ifirst=1; - static const GeoMaterial* air=0; - if (ifirst) - { - ifirst=0; - air = GetMMMaterial("std::Air"); - if (!air) std::cout<<" Air not found!"<<std::endl; - } + static const GeoMaterial* const air = GetMMMaterial("std::Air"); + if (!air) std::cout<<" Air not found!"<<std::endl; CreateSolid (builder); -- GitLab