From 2060334ef51eae849fd73dd24dbc2910c575c245 Mon Sep 17 00:00:00 2001
From: scott snyder <scott.snyder@cern.ch>
Date: Sat, 9 Sep 2017 16:26:44 +0200
Subject: [PATCH] MdtCalibDbAsciiTool: Removing references to
 transientAddress().

In order to make DataProxy properly thread-safe, it is helpful to remove
calls to DataProxy::transientAddress.  That way, it suffices to have
a lock in the DataProxy object.  Trying to add the needed accessor
methods to DataProxy and get rid of calls to transientAddress().
---
 .../src/MdtCalibDbAsciiTool.cxx                  | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx
index f44b55fe4e2..b7b0161343b 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx
@@ -181,14 +181,8 @@ StatusCode MdtCalibDbAsciiTool::initialize() {
     return StatusCode::FAILURE;
   }
 
-  SG::TransientAddress* tad =  proxy->transientAddress();
-  if (!tad) {
-    *m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-    return StatusCode::FAILURE;
-  }
-
   IAddressProvider* addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   if( m_debug ) *m_log << MSG::DEBUG << "set address provider for MdtTubeCalibContainerCollection" << endmsg;
 
   sc=defaultRt();
@@ -204,14 +198,8 @@ StatusCode MdtCalibDbAsciiTool::initialize() {
     return StatusCode::FAILURE;
   }
 
-  tad =  proxy->transientAddress();
-  if (!tad) {
-    *m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-    return StatusCode::FAILURE;
-  }
-
   addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   if( m_debug ) *m_log << MSG::DEBUG << "set address provider for MdtRtRelationCollection" << endmsg;
 
   return sc;
-- 
GitLab