From 1e9cb74b09792fe5fd51ca12f4667baa28f2d042 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Fri, 9 Oct 2020 22:51:26 +0200
Subject: [PATCH] RegSelTool: Don't initialise handle when not used

---
 DetectorDescription/RegionSelector/src/RegSelTool.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DetectorDescription/RegionSelector/src/RegSelTool.cxx b/DetectorDescription/RegionSelector/src/RegSelTool.cxx
index 2c5ab3d3310..0189fd718bb 100644
--- a/DetectorDescription/RegionSelector/src/RegSelTool.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelTool.cxx
@@ -43,11 +43,11 @@ const IRegSelLUT* RegSelTool::lookup() const {
 
 
 StatusCode RegSelTool::initialize() {
-  ATH_CHECK( m_tableKey.initialize() );
   ATH_MSG_DEBUG( "Initialising RegSelTool " << name() << "\ttable: " << m_tableKey );
   if ( !m_initialised ) { 
     ATH_MSG_WARNING( "Lookup table will not be initialised " << name() << "\tkey " << m_tableKey );
   } 
+  ATH_CHECK( m_tableKey.initialize(m_initialised) );
   if ( name().find( "RPC") != std::string::npos ) m_rpcflag = true;
   return StatusCode::SUCCESS;
 }
-- 
GitLab