From f9aa817f152b0a48e9e373e937e33729c20f95c7 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Mon, 29 Jun 2020 12:18:50 +0000
Subject: [PATCH] Remove MuonDetectorManager calls from MuonAlignmentCondAlg
 (ATLASRECTS-5533)

---
 .../MuonCondAlg/src/MuonAlignmentCondAlg.cxx  | 36 -------------------
 1 file changed, 36 deletions(-)

diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx
index d7a5291aed6..bb53caa0798 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx
@@ -249,18 +249,6 @@ StatusCode MuonAlignmentCondAlg::loadAlignABLines() {
   }		  
   ATH_MSG_INFO("recorded new " << writeALineHandle.key() << " with range " << rangeALineW << " into Conditions Store");
 
-  // >>>>>>>>>>>> START: This code should be REMOVED after MuonDetectorManger in MuonEventTPCnv moves to Conditions Store >>>>>>>>>>>>
-  // =======================
-  // FIRST Update the MuonDetectorManager and THEN record the BLine.
-  // =======================
-
-  // FIXME: const_cast
-  if (const_cast<MuonGM::MuonDetectorManager*>(m_muonDetMgrDS)->updateDeformations(*writeBLineCdo).isFailure()) ATH_MSG_ERROR("Unable to updateDeformations" );
-  else ATH_MSG_DEBUG("updateDeformations DONE" );
-  // if (m_muonDetMgrDS->updateDeformations(writeBLineCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateDeformations" );
-  // else ATH_MSG_DEBUG("updateDeformations DONE" );
-  // <<<<<<<<<<<<< END: This code should be REMOVED after MuonDetectorManger in MuonEventTPCnv moves to Conditions Store <<<<<<<<<<<<<
-
   if (writeBLineHandle.record(rangeBLineW, std::move(writeBLineCdo)).isFailure()) {
     ATH_MSG_FATAL("Could not record BLineMapContainer " << writeBLineHandle.key() 
 		  << " with EventRange " << rangeBLineW
@@ -884,18 +872,6 @@ StatusCode MuonAlignmentCondAlg::loadAlignILines(std::string folderName)
    // dump I-lines to log file TBA
   if (m_dumpILines && (int)writeCdo->size()>0) dumpILines(folderName, writeCdo.get());
 
-  // >>>>>>>>>>>> START: This code should be REMOVED after MuonDetectorManger in MuonEventTPCnv moves to Conditions Store >>>>>>>>>>>>
-  // =======================
-  // FIRST update MuonDetectorManager and THEN record the output cond object.
-  // =======================
-
-  // FIXME: const_cast
-  if (const_cast<MuonGM::MuonDetectorManager*>(m_muonDetMgrDS)->updateCSCInternalAlignmentMap(*writeCdo).isFailure()) ATH_MSG_ERROR("Unable to updateCSCInternalAlignmentMap" );
-  else ATH_MSG_DEBUG("updateCSCInternalAlignmentMap DONE" );
-  // if (m_muonDetMgrDS->updateCSCInternalAlignmentMap(writeCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateCSCInternalAlignmentMap" );
-  // else ATH_MSG_DEBUG("updateCSCInternalAlignmentMap DONE" );
-  // <<<<<<<<<<<<< END: This code should be REMOVED after MuonDetectorManger in MuonEventTPCnv moves to Conditions Store <<<<<<<<<<<<<
-
   if (writeHandle.record(rangeCscILinesW, std::move(writeCdo)).isFailure()) {
     ATH_MSG_FATAL("Could not record CscInternalAlignmentMapContainer " << writeHandle.key() 
 		  << " with EventRange " << rangeCscILinesW
@@ -1019,18 +995,6 @@ StatusCode MuonAlignmentCondAlg::loadAlignAsBuilt(std::string folderName)
   // !!!!!!!!!!!!!! In the MuonAlignmentDbTool this was in loadAlignABLines. I moved it here
   if ( m_asBuiltFile!="" ) setAsBuiltFromAscii(writeCdo.get());
 
-  // >>>>>>>>>>>> START: This code should be REMOVED after MuonDetectorManger in MuonEventTPCnv moves to Conditions Store >>>>>>>>>>>>
-  // =======================
-  // FIRST update MuonDetectorManager and THEN record the output cond object.
-  // =======================
-
-  // FIXME: const_cast
-  if (const_cast<MuonGM::MuonDetectorManager*>(m_muonDetMgrDS)->updateAsBuiltParams(*writeCdo).isFailure()) ATH_MSG_ERROR("Unable to updateAsBuiltParams" );
-  else ATH_MSG_DEBUG("updateAsBuiltParams DONE" );
-  // if (m_muonDetMgrDS->updateAsBuiltParams(writeCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateAsBuiltParams" );
-  // else ATH_MSG_DEBUG("updateAsBuiltParams DONE" );
-  // <<<<<<<<<<<<< END: This code should be REMOVED after MuonDetectorManger in MuonEventTPCnv moves to Conditions Store <<<<<<<<<<<<<
-
   if (writeHandle.record(rangeMdtAsBuiltW, std::move(writeCdo)).isFailure()) {
     ATH_MSG_FATAL("Could not record MdtAsBuiltMapContainer " << writeHandle.key() 
 		  << " with EventRange " << rangeMdtAsBuiltW
-- 
GitLab