diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx
index f9558368f577638dc8f59646423a086780383af8..4dc64989f9467785b842b2d70c592444ed63f61f 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx
@@ -59,6 +59,8 @@ StatusCode CondAlg1::execute (const EventContext& ctx) const
   auto s2 = std::make_unique<DMTest::S2> (xint*100);
   ATH_CHECK( scond.record (range, std::move(s2) ) );
 
+  ATH_MSG_DEBUG("Recorded '" << scond.key() << "' with range " << range);
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg2.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg2.cxx
index efb47aa0229eb0a72e514da47dd6356fe51c974c..b57466bc8dd088bd6eb4a3ed7b2db4980b0faad1 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg2.cxx
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg2.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 /*
  */
@@ -82,6 +82,8 @@ StatusCode CondAlg2::execute (const EventContext& ctx) const
   auto s3 = std::make_unique<DMTest::S3> (xint_rl + xint_ts);
   ATH_CHECK( out.record (range, std::move(s3)) );
 
+  ATH_MSG_DEBUG("Recorded '" << out.key() << "' with range " << range);
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterExtAlg.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterExtAlg.cxx
index 50ff261f7b2f90d13e6a2394020ad1351458cf41..e19babc6a8eb57b978db8808440459401c49415e 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterExtAlg.cxx
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterExtAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "CondWriterExtAlg.h"
@@ -49,12 +49,12 @@ StatusCode CondWriterExtAlg::execute()
     // Set IOV in the past to trigger reload in IOVSvc
     IOVRange iov_range(IOVTime(0, 0), IOVTime(0, 0));
     ATH_CHECK( m_iovSvc->setRange(detStore()->clid(m_attrListKey), m_attrListKey, iov_range, "StoreGateSvc") );
-  }
 
     // Drop folder payload
     ATH_CHECK( m_iovDbSvc->dropObject(m_attrListKey, /*resetCache=*/true), StatusCode::FAILURE );
+  }
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 } // namespace DMTest
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
index 865348518c6684e7a18677397e4c145d14c2393b..0c3fcea944bcc5720808f85f43b384f37aa3e88f 100755
--- a/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/MuonGM.py
@@ -20,8 +20,8 @@ elif ( DetFlags.detdescr.Muon_on() ):
     import os
     GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].BuildFromNova = 0
     if ( ( not DetFlags.simulate.any_on() or DetFlags.overlay.any_on() ) and "AthSimulation_DIR" not in os.environ ):
-      GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool"
+#      GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = "MuonAlignmentDbTool/MGM_AlignmentDbTool"
+        print " MuonAlignmentDbTool is not supported anymore"
     else:
-      GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = ""
       GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseConditionDb = 0
       GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseAsciiConditionData = 0
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override.py
index 5cadf898e450c6d023fa0a86b7b568b0ddab8085..36d7f964ebf236d3742c320080282faa45bc2b0f 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override.py
@@ -52,11 +52,11 @@ conddb.blockFolder("/MUONALIGN/MDT/ENDCAP/SIDEC")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_02-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_02-ES1-UPD1-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
 
 
 #conddb.blockFolder("/LAR/ElecCalib/fSampl/Symmetry")
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-05.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-05.py
index 69539e22c5ce514cce9a663a81110847db817a0d..950b4b2a2e08c0e6df03844dd88e37c71d4b2e29 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-05.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-05.py
@@ -48,13 +48,13 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True,className='CondAttrListCollection')
     
 #the TGC alignments had overlap issues... caused G4 crash
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-TGCA_ROLLING_2011_01-ES1-UPD1-00",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-TGCC_ROLLING_2011_01-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
 
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-11.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-11.py
index d3923ff239835c8a403b14ecdfb5082d4189b104..d63b8f74477066b099748bd4fdd9a693915fe1a0 100755
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-11.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_BLKPA-006-11.py
@@ -56,9 +56,9 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_04-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2012_03_01-UPD4-01",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2012_03_01-UPD4-01",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_04-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2012_03_01-UPD4-01",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2012_03_01-UPD4-01",force=True,forceData=True,className='CondAttrListCollection')
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
@@ -66,8 +66,8 @@ conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlign
 #the TGC alignments had overlap issues... caused G4 crash
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-TGCA_ROLLING_2011_01-ES1-UPD1-00",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-TGCC_ROLLING_2011_01-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Configuration/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/Chip","/SCT/DAQ/Configuration/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_COMCOND-BLKPA-RUN1-08.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_COMCOND-BLKPA-RUN1-08.py
index a72b64a422e2817e960ac0a672de5681ef50738e..a21651d36521be1b0776489649ff11297f01a981 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_COMCOND-BLKPA-RUN1-08.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_COMCOND-BLKPA-RUN1-08.py
@@ -86,9 +86,9 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True,className='CondAttrListCollection')
     
 #the TGC alignments had overlap issues... caused G4 crash
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-TGCA_ROLLING_2011_01-ES1-UPD1-00",force=True,forceData=True)
@@ -96,8 +96,8 @@ conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlign
 #G4 overlap crash is still here:
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Configuration/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Configuration/Chip","/SCT/DAQ/Configuration/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_CONDBR2-BLKPA-2015-12.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_CONDBR2-BLKPA-2015-12.py
index 5db39eaf1f19079f9b55578a0cbce08887faa8a9..6fccf1fddff2b4a59a794a4c7ab4ad3360d822a0 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_CONDBR2-BLKPA-2015-12.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_CONDBR2-BLKPA-2015-12.py
@@ -105,9 +105,9 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
@@ -118,8 +118,8 @@ conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlign
 #G4 overlap crash is still here:
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Config/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC15c-SDR-11.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC15c-SDR-11.py
index 307bc44c38b02728cd82da4034c90b1ad29ca2a6..c22bc410e3c98ae48440ce192e9f083fff86e729 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC15c-SDR-11.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC15c-SDR-11.py
@@ -108,9 +108,9 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
@@ -121,8 +121,8 @@ conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlign
 #G4 overlap crash is still here:
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Config/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-23.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-23.py
index b9f1148f73915aeb1f73bc1ab2d08d30717c5dc1..a1973217dfb857ec3f567aa4ba0b233288c0a1a3 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-23.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-23.py
@@ -96,9 +96,9 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_03-BLKP-UPD4-00",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-ECA_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-ECC_ROLLING_2011_02_02-UPD4-01",force=True,forceData=True)
@@ -109,8 +109,8 @@ conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlign
 #G4 overlap crash is still here:
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
 #conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Config/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py
index 2f77f1bc325e6cda58fb3c540023b7ce1e580c04..cd16b80b4eb269965a618e24d220e9317e2bf7c2 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26.py
@@ -96,13 +96,13 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
     
 #the TGC alignments had overlap issues... caused G4 crash
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Config/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py
index 74e01f9bc6083f58f1969207612b6f5713c03bd8..7e3e95d177ee8c8ee2029490183ac05d74a647f2 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-26_folders100M.py
@@ -96,11 +96,11 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Config/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-27.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-27.py
index fc9762e02689afa12a6f86c0e6998411a8b7b48c..02c0049a63ac5a827a85441566cfb7074ded18cf 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-27.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_OFLCOND-MC16-SDR-27.py
@@ -92,13 +92,13 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_09-BLKP-UPD4-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_02_01-UPD4-02",force=True,forceData=True,className='CondAttrListCollection')
     
 #the TGC alignments had overlap issues... caused G4 crash
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceMC=True,className='CondAttrListCollection')
 
 conddb.blockFolder("/SCT/DAQ/Config/Chip")
 conddb.addFolderSplitMC("SCT","/SCT/DAQ/Config/Chip","/SCT/DAQ/Config/Chip",force=True)
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_old.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_old.py
index 9e390dc81a106db31f8c649cf44a7e205d93a7a1..7dcffcd2a23c8fce377ce98b98aaf1157f85924f 100755
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_old.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Rt_override_old.py
@@ -52,10 +52,10 @@ conddb.blockFolder("/MUONALIGN/TGC/SIDEA")
 conddb.blockFolder("/MUONALIGN/TGC/SIDEC")
 
 #use updated muon alignments
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_02-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/BARREL","MuonAlignMDTBarrelAlign-BA_ROLLING_2010_02-ES1-UPD1-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEA","MuonAlignMDTEndCapAAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/MDT/ENDCAP/SIDEC","MuonAlignMDTEndCapCAlign-COSMICS-200909-01-ES1-UPD1-00",force=True,forceData=True,className='CondAttrListCollection')
 
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True)
-conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True)
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEA","MuonAlignTGCEndCapAAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
+conddb.addFolderWithTag("MUONALIGN_OFL","/MUONALIGN/TGC/SIDEC","MuonAlignTGCEndCapCAlign-0001-DEFAULT",force=True,forceData=True,className='CondAttrListCollection')
 
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign.py b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign.py
index 6f829436bf80eb0e612f8767f651b7c0d5bd6632..f9f8b67e79a750f554caf3dde6cb98522cfe68eb 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign.py
@@ -4,24 +4,15 @@ if haas_mualign2:
     #use muon alignments
     print "Haas: Reading muon alignment constants from DB"
 
+    from AthenaCommon.AlgSequence import AthSequencer
+
     #from IOVDbSvc.CondDB import conddb
-    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
+    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    #conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
 
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel=DEBUG
     from AtlasGeoModel.MuonGM import GeoModelSvc
     MuonDetectorTool = GeoModelSvc.DetectorTools[ "MuonDetectorTool" ]
     MuonDetectorTool.UseConditionDb = 1
@@ -33,5 +24,19 @@ if haas_mualign2:
     #register callbacks for alignments, to get IOVs?
     #GeoModelSvc.AlignCallbacks = True
     
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence = AthSequencer("AthCondSeq")
+    if conddb.dbdata != 'COMP200' and conddb.dbmc != 'COMP200' and \
+       'HLT' not in globalflags.ConditionsTag() and not conddb.isOnline :
 
+        condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+        MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                               "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                               "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                               "/MUONALIGN/TGC/SIDEA",
+                                               "/MUONALIGN/TGC/SIDEC"]
+        MuonAlignmentCondAlg.ILinesFromCondDB = False
+        MuonAlignmentCondAlg.DumpALines = False
+        MuonAlignmentCondAlg.DumpBLines = False
+        MuonAlignmentCondAlg.DumpILines = False
     
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py
index 4c780652ebce8211762ee50175ad2dd3ad533fd0..186ded4dc27b1a54533fba22a8b0a05941a7e47a 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_HI2018Pb_reco.py
@@ -4,7 +4,7 @@ print "Haas: Reading muon alignment constants from DB for reco"
 
 from IOVDbSvc.CondDB import conddb
 
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
+#MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
 #MGM_AlignmentDbTool.OutputLevel=DEBUG
 #print MGM_AlignmentDbTool
 from AtlasGeoModel.MuonGM import GeoModelSvc
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco.py b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco.py
index 0f0db9955afd5a0bf7cc99d1cdc8a2bc1e1ae8cf..06bf47ece5a49cd45f5f063b2f41349344b8a70c 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco.py
@@ -18,7 +18,7 @@ from IOVDbSvc.CondDB import conddb
 #                                      "/MUONALIGN/TGC/SIDEC"]
 
 #ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
+#MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
 #MGM_AlignmentDbTool.OutputLevel=DEBUG
 #print MGM_AlignmentDbTool
 from AtlasGeoModel.MuonGM import GeoModelSvc
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco_old.py b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco_old.py
index fc073bc2fcb3cd1c5d31fb3748f794acc3dbfde8..2581be54896f1b1b11700c546bca1f18c8ccc0bd 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco_old.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/muAlign_reco_old.py
@@ -18,9 +18,9 @@ print "Haas: Reading muon alignment constants from DB for reco"
 #                                      "/MUONALIGN/TGC/SIDEC"]
 
 #ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel=DEBUG
-print MGM_AlignmentDbTool
+#MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
+#MGM_AlignmentDbTool.OutputLevel=DEBUG
+#print MGM_AlignmentDbTool
 from AtlasGeoModel.MuonGM import GeoModelSvc
 MuonDetectorTool = GeoModelSvc.DetectorTools[ "MuonDetectorTool" ]
 MuonDetectorTool.UseConditionDb = 1
diff --git a/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py b/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py
index 8ce31e6c95387dde6a7ce8c14949762a1a311859..e5c8b510c8c1b2927d6de56d7ccb180a80ff17c4 100644
--- a/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py
+++ b/HLT/Trigger/TrigControl/TrigServices/python/TrigServicesConfig.py
@@ -66,6 +66,7 @@ def setupMessageSvc():
 
    # Message forwarding to ERS
    MessageSvc.useErsError = ['*']
+   MessageSvc.useErsFatal = ['*']
 
    # set message limit to unlimited when general DEBUG is requested
    if MessageSvc.OutputLevel<=DEBUG :
diff --git a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx
index 10a27aafa119d081db28badf0665dd96bc53f782..825ddc43fa50d371869c1a9749941edb8d7077be 100644
--- a/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellBuilderFromLArRawChannelTool.cxx
@@ -24,6 +24,7 @@
 
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/ReadCondHandle.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
 #include <bitset>
 
@@ -159,7 +160,7 @@ LArCellBuilderFromLArRawChannelTool::process (CaloCellContainer* theCellContaine
       *pCell = LArCell (theDDE,
 			id,
 			rawChan.energy(),
-			rawChan.time(),
+			rawChan.time()*Gaudi::Units::picosecond/Gaudi::Units::nanosecond,    // convert time from ps (LArRawChannel) to ns
 			rawChan.quality(),
 			rawChan.provenance(),
 			rawChan.gain());
diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/CorrContainer.h b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/CorrContainer.h
index cb39d1fb3722b1f838db46b3040a5d0b8308ba87..f59e1e594167babf701e80b5e3ed46974a3d68cf 100755
--- a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/CorrContainer.h
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/MuonAlignmentData/CorrContainer.h
@@ -6,6 +6,7 @@
 #define MUONALIGNMENTDATA_CORRCONTAINER_H
 
 #include "AthenaKernel/CLASS_DEF.h"
+#include "AthenaKernel/CondCont.h"
 #include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonAlignmentData/ALinePar.h"
 #include "MuonAlignmentData/BLinePar.h"
@@ -14,15 +15,19 @@
  
 typedef std::map<Identifier,ALinePar*> ALineMapContainer;
 CLASS_DEF(ALineMapContainer,1324994866,1)
+CLASS_DEF( CondCont<ALineMapContainer>, 1201194425, 0)
 
 typedef std::map<Identifier,BLinePar*> BLineMapContainer;
 CLASS_DEF(BLineMapContainer,1124991377,1)
+CLASS_DEF( CondCont<BLineMapContainer>, 1332301344, 0)
 
 typedef std::map<Identifier,CscInternalAlignmentPar*> CscInternalAlignmentMapContainer;
 CLASS_DEF(CscInternalAlignmentMapContainer,1285567354,1)
+CLASS_DEF( CondCont<CscInternalAlignmentMapContainer>, 1227105862, 0)
 
 typedef std::map<Identifier,MdtAsBuiltPar*> MdtAsBuiltMapContainer;
 CLASS_DEF( MdtAsBuiltMapContainer , 1198729422 , 1 )
+CLASS_DEF( CondCont<MdtAsBuiltMapContainer>, 1076645826, 0)
 
 typedef std::map<Identifier,ALinePar*>::iterator iALineMap;
 typedef std::map<Identifier,BLinePar*>::iterator iBLineMap;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt
index a4f6e09bc79fc632b65a8b0cbf3affd322b46d6c..b43fe73367fc299ae6029eca8f9e8d95373d5f02 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/CMakeLists.txt
@@ -23,17 +23,20 @@ atlas_depends_on_subdirs( PUBLIC
                           MuonSpectrometer/MuonCnv/MuonMDT_CnvTools
                           MuonSpectrometer/MuonCnv/MuonRPC_CnvTools
                           MuonSpectrometer/MuonIdHelpers
+			  MuonSpectrometer/MuonAlignment/MuonAlignmentData
                           MuonSpectrometer/MuonRDO )
 
 # External dependencies:
 find_package( tdaq-common )
+find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_component( MuonByteStream
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel StoreGateLib SGtests CSCcablingLib RPCcablingInterfaceLib MuonIdHelpersLib MuonRDO TrigSteeringEvent AthViews)
+                     INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+		     DEFINITIONS ${CLHEP_DEFINITIONS}
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel StoreGateLib SGtests CSCcablingLib RPCcablingInterfaceLib MuonIdHelpersLib MuonRDO TrigSteeringEvent AthViews)
 
 # Install files from the package:
 atlas_install_headers( MuonByteStream )
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtRawDataProvider.h b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtRawDataProvider.h
index 885a2a48af721bf2bad2dd35317d902f0fd624c8..9c8f74c70d5013ac1e6bb96366a7918ddf1ee92d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtRawDataProvider.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/MuonByteStream/MdtRawDataProvider.h
@@ -16,6 +16,9 @@
 // ROI Descriptor classes
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "MuonAlignmentData/CorrContainer.h"
+
 namespace Muon {
 class IMuonRawDataProviderTool;
 
@@ -52,6 +55,8 @@ private:
   /// ReadHandle for the input RoIs
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey{ this, "RoIs", "OutputRoIs",  "Name of RoI collection to read in" };
 
+  SG::ReadCondHandleKey<ALineMapContainer> m_ALineKey{this, "ALineMapContainer", "ALineMapContainer", "Name of muon alignment ALine condition data"};
+    
 };
 } // ns end
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtRawDataProvider.cxx b/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtRawDataProvider.cxx
index d6bf4127f005beee8e8f3a24afe351817e56b6a1..eb850ec8f8bcec10c1d7dab2db91636f9bd27025 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtRawDataProvider.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStream/src/MdtRawDataProvider.cxx
@@ -35,6 +35,8 @@ StatusCode Muon::MdtRawDataProvider::initialize() {
 
   ATH_CHECK( m_roiCollectionKey.initialize(m_seededDecoding) );// pass the seeded decoding flag - this marks the RoI collection flag as not used for the case when we decode the full detector
 
+  ATH_CHECK( m_ALineKey.initialize() );
+
   if(m_seededDecoding) {
     // We only need the region selector in RoI seeded mode
     if (m_regionSelector.retrieve().isFailure()) {
@@ -55,6 +57,12 @@ StatusCode Muon::MdtRawDataProvider::finalize() {
 StatusCode Muon::MdtRawDataProvider::execute() {
   ATH_MSG_VERBOSE( "MdtRawDataProvider::execute" );
   
+  SG::ReadCondHandle<ALineMapContainer> readALineHandle(m_ALineKey);
+  if(!readALineHandle.isValid()){
+    ATH_MSG_WARNING("Cannot retrieve ALine Handle "<<m_ALineKey.key());
+    return StatusCode::SUCCESS;
+  }
+
   if(m_seededDecoding) {
     
     // read in the RoIs to process
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt
index 616b803915a2c4886ea8215405d954eb5055bfb7..bf41f0255d2efe6b7c7053fe777cfaa4f28f5720 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/CMakeLists.txt
@@ -11,14 +11,18 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaKernel
                           Control/StoreGate
                           Database/AthenaPOOL/AthenaPoolUtilities
+			  DetectorDescription/GeoModel/GeoModelInterfaces
                           DetectorDescription/Identifier
                           GaudiKernel
+                          MuonSpectrometer/MuonAlignment/MuonAlignmentData
                           MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData
                           MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface
                           MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc
                           PRIVATE
                           Event/EventInfo
-                          MuonSpectrometer/MuonIdHelpers )
+                          MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
+                          MuonSpectrometer/MuonIdHelpers 
+			  Tools/PathResolver )
 
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
@@ -30,7 +34,7 @@ atlas_add_library( MuonCondAlgLib
                    PUBLIC_HEADERS MuonCondAlg
                    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface MuonCondSvcLib StoreGateLib MuonIdHelpersLib
+                   LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface MuonCondSvcLib StoreGateLib MuonIdHelpersLib MuonReadoutGeometry
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} EventInfo )
 
 atlas_add_component( MuonCondAlg
@@ -40,4 +44,3 @@ atlas_add_component( MuonCondAlg
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..dd2c2c87239171b0abf492146652a5b445beb4b3
--- /dev/null
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/MuonCondAlg/MuonAlignmentCondAlg.h
@@ -0,0 +1,115 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef MUONCONDALG_MUONALIGNMENTCONDALG_H
+#define MUONCONDALG_MUONALIGNMENTCONDALG_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/CondHandleKeyArray.h"
+#include "GaudiKernel/ICondSvc.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+// typedefs for A/BLineMapContainer
+#include "MuonAlignmentData/CorrContainer.h"
+
+class Identifier; 
+class StoreGateSvc; 
+class MdtIdHelper;
+class CscIdHelper;
+class RpcIdHelper;
+class TgcIdHelper;
+class StatusCode;
+
+namespace MuonGM
+{
+  class MuonDetectorManager;
+}
+
+class MuonAlignmentCondAlg: public AthAlgorithm {
+
+ public:
+
+  MuonAlignmentCondAlg (const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~MuonAlignmentCondAlg() = default;
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+  virtual StatusCode finalize() override;
+
+  std::vector<std::string> parlineFolder() { return m_parlineFolder; }
+    
+ private:
+
+  // Read Handles
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readMdtBarrelKey        {this, "ReadMdtBarrelKey", 
+                                                                                 "/MUONALIGN/MDT/BARREL", 
+                                                                                 "Key of input MDT/BARREL condition data"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readMdtEndcapSideAKey   {this, "ReadMdtEndcapSideAKey", 
+                                                                                 "/MUONALIGN/MDT/ENDCAP/SIDEA", 
+                                                                                 "Key of input MDT/ENDCAP/SIDEA condition data"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readMdtEndcapSideCKey   {this, "ReadMdtEndcapSideCKey", 
+                                                                                 "/MUONALIGN/MDT/ENDCAP/SIDEC", 
+                                                                                 "Key of input MDT/ENDCAP/SIDEC condition data"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readTgcSideAKey         {this, "ReadTgcSideAKey", 
+                                                                                 "/MUONALIGN/TGC/SIDEA", 
+                                                                                 "Key of input TGC/SIDEA condition data"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readTgcSideCKey         {this, "ReadTgcSideCKey", 
+                                                                                 "/MUONALIGN/TGC/SIDEC", 
+                                                                                 "Key of input TGC/SIDEC condition data"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readCscILinesKey        {this, "ReadCscILinesKey", 
+                                                                                 "/MUONALIGN/CSC/ILINES", 
+                                                                                 "Key of input CSC/ILINES condition data"};
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readMdtAsBuiltParamsKey {this, "ReadMdtAsBuiltParamsKey", 
+                                                                                 "/MUONALIGN/MDT/ASBUILTPARAMS", 
+                                                                                 "Key of MDT/ASBUILTPARAMS input condition data"};
+  // Write Handles
+  SG::WriteCondHandleKey<ALineMapContainer> m_writeALineKey                {this, "WriteALineKey", 
+                                                                                  "ALineMapContainer", 
+                                                                                  "Key of output muon alignment ALine condition data"};    
+  SG::WriteCondHandleKey<BLineMapContainer> m_writeBLineKey                {this, "WriteBLineKey", 
+                                                                                  "BLineMapContainer", 
+                                                                                  "Key of output muon alignment BLine condition data"};    
+  SG::WriteCondHandleKey<CscInternalAlignmentMapContainer> m_writeILineKey {this, "WriteILineKey", 
+                                                                                  "CscInternalAlignmentMapContainer", 
+                                                                                  "Key of output muon alignment CSC/ILine condition data"};
+  SG::WriteCondHandleKey<MdtAsBuiltMapContainer> m_writeAsBuiltKey         {this, "WriteAsBuiltKey", 
+                                                                                  "MdtAsBuiltMapContainer", 
+                                                                                  "Key of output muon alignment MDT/AsBuilt condition data"};
+
+  const MuonGM::MuonDetectorManager*  m_muonMgr;
+  ServiceHandle<ICondSvc> m_condSvc;
+  std::string m_geometryVersion;    
+  const MdtIdHelper* m_mdtIdHelper;
+  const CscIdHelper* m_cscIdHelper;
+  const RpcIdHelper* m_rpcIdHelper;
+  const TgcIdHelper* m_tgcIdHelper;
+
+  std::vector<std::string>       m_parlineFolder;
+  bool m_dumpALines;
+  bool m_dumpBLines;
+  bool m_dumpILines;
+  bool m_ILinesFromDb;
+  
+  std::string m_aLinesFile;
+  std::string m_asBuiltFile;
+
+  StatusCode InitializeGeometryAndIdHelpers();
+  StatusCode loadParameters();
+  StatusCode loadAlignABLines();
+  StatusCode loadAlignABLines(std::string folderName,
+			      ALineMapContainer* writeALineCdo,
+			      BLineMapContainer* writeBLineCdo,
+			      EventIDRange& rangeALineW,
+			      EventIDRange& rangeBLineW);
+  StatusCode loadAlignILines(std::string folderName);
+  StatusCode loadAlignAsBuilt(std::string folderName);
+ 
+  void setALinesFromAscii(ALineMapContainer* writeALineCdo) const;
+  void setAsBuiltFromAscii(MdtAsBuiltMapContainer* writeCdo) const;
+  void dumpALines(const std::string& folderName, ALineMapContainer* writeALineCdo);
+  void dumpBLines(const std::string& folderName, BLineMapContainer* writeBLineCdo);
+  void dumpILines(const std::string& folderName, CscInternalAlignmentMapContainer* writeCdo);
+
+};
+
+#endif
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3a324960bd326c7513c1c3aceb58afb6734fa7b0
--- /dev/null
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/MuonAlignmentCondAlg.cxx
@@ -0,0 +1,1292 @@
+/*
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GaudiKernel/MsgStream.h"
+
+#include "StoreGate/StoreGateSvc.h"
+#include "SGTools/TransientAddress.h"
+#include "CoralBase/Attribute.h"
+#include "CoralBase/AttributeListSpecification.h"
+#include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+
+#include "MuonReadoutGeometry/MuonDetectorManager.h"
+#include "MuonReadoutGeometry/GlobalUtilities.h"
+
+#include "Identifier/IdentifierHash.h"
+#include "Identifier/Identifier.h"
+#include "MuonIdHelpers/MdtIdHelper.h"
+#include "MuonIdHelpers/CscIdHelper.h"
+#include "MuonIdHelpers/TgcIdHelper.h"
+#include "MuonIdHelpers/RpcIdHelper.h"
+#include "PathResolver/PathResolver.h"
+#include <fstream>
+#include <string>
+#include <map>
+
+#include "MuonCondAlg/MuonAlignmentCondAlg.h"
+
+#include "MuonCondSvc/MdtStringUtils.h"
+
+MuonAlignmentCondAlg::MuonAlignmentCondAlg(const std::string& name, 
+				       ISvcLocator* pSvcLocator) 
+  : AthAlgorithm(name, pSvcLocator),
+    m_condSvc{"CondSvc", name}
+{
+  m_mdtIdHelper = nullptr;
+  m_cscIdHelper = nullptr;
+  m_rpcIdHelper = nullptr;
+  m_tgcIdHelper = nullptr;
+  m_geometryVersion = "";
+
+  m_parlineFolder.clear();
+  declareProperty("ParlineFolders",  m_parlineFolder);
+  declareProperty("DumpALines",      m_dumpALines=false);
+  declareProperty("DumpBLines",      m_dumpBLines=false);
+  declareProperty("DumpILines",      m_dumpILines=false);
+  declareProperty("ILinesFromCondDB",m_ILinesFromDb=false);
+  declareProperty("ALinesFile",      m_aLinesFile="");
+  declareProperty("AsBuiltFile",     m_asBuiltFile="");
+}
+
+StatusCode MuonAlignmentCondAlg::initialize(){
+
+  ATH_MSG_INFO("Initilalizing");
+  ATH_MSG_INFO("In initialize ---- # of folders registered is " << m_parlineFolder.size());
+
+  ATH_CHECK(m_condSvc.retrieve());
+
+  // Read Handles Keys
+  ATH_CHECK(m_readMdtBarrelKey.initialize());
+  ATH_CHECK(m_readMdtEndcapSideAKey.initialize());
+  ATH_CHECK(m_readMdtEndcapSideCKey.initialize());
+  ATH_CHECK(m_readTgcSideAKey.initialize());
+  ATH_CHECK(m_readTgcSideCKey.initialize());
+  ATH_CHECK(m_readCscILinesKey.initialize());
+  ATH_CHECK(m_readMdtAsBuiltParamsKey.initialize());
+
+  // Write Handles
+  ATH_CHECK(m_writeALineKey.initialize());
+  if(m_condSvc->regHandle(this, m_writeALineKey).isFailure()) {
+    ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeALineKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK(m_writeBLineKey.initialize());
+  if(m_condSvc->regHandle(this, m_writeBLineKey).isFailure()) {
+    ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeBLineKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK(m_writeILineKey.initialize());
+  if(m_condSvc->regHandle(this, m_writeILineKey).isFailure()) {
+    ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeILineKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK(m_writeAsBuiltKey.initialize());
+  if(m_condSvc->regHandle(this, m_writeAsBuiltKey).isFailure()) {
+    ATH_MSG_FATAL("unable to register WriteCondHandle " << m_writeAsBuiltKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+    
+  //=================
+  // Initialize geometry and Id Helpers. Initialization of the pointer to the MuonDetectorManager.
+  // !!!!!!!!!!! It was called in the loadParameters before. !!!!!!!!!!
+  //=================
+
+  if (InitializeGeometryAndIdHelpers().isFailure()) {
+    ATH_MSG_FATAL("Error in InitializeGeometryAndIdHelpers");
+    return StatusCode::FAILURE;
+  }
+ 
+
+ return StatusCode::SUCCESS;
+}
+
+StatusCode MuonAlignmentCondAlg::execute(){
+  
+  StatusCode sc = StatusCode::SUCCESS;
+
+  ATH_MSG_DEBUG( "execute " << name() ); 
+
+  sc = loadParameters();
+
+  return sc;
+}
+
+
+StatusCode MuonAlignmentCondAlg::finalize(){
+  
+  ATH_MSG_DEBUG( "finalize " << name() );
+  return StatusCode::SUCCESS;
+}
+
+StatusCode MuonAlignmentCondAlg::InitializeGeometryAndIdHelpers(){
+
+  //=================
+  // Initialize pointer to the MuonDetectorManager
+  //=================
+  
+  if (StatusCode::SUCCESS != detStore()->retrieve(m_muonMgr)) {
+    ATH_MSG_FATAL("Couldn't load MuonDetectorManager");
+    return StatusCode::FAILURE;
+  }
+
+  //=================
+  // Initialize geometry
+  //=================
+
+  m_geometryVersion = m_muonMgr->geometryVersion();
+  ATH_MSG_INFO("geometry version from the MuonDetectorManager = " << m_geometryVersion);
+  
+  //=================
+  // Initialize Helpers
+  //=================
+  
+  if (m_mdtIdHelper == nullptr) {
+    if (detStore()->retrieve(m_mdtIdHelper, "MDTIDHELPER" ).isFailure()) {
+      ATH_MSG_ERROR("Can't retrieve MdtIdHelper");
+      return StatusCode::FAILURE;
+    } else ATH_MSG_INFO("MdtIdHelper retrieved from the DetectorStore");
+  } else ATH_MSG_DEBUG("MdtIdHelper already initialized");
+
+  //-------------------
+
+  if (m_cscIdHelper == nullptr) {
+    if (detStore()->retrieve(m_cscIdHelper, "CSCIDHELPER" ).isFailure()) {
+      ATH_MSG_ERROR("Can't retrieve CscIdHelper");
+      return StatusCode::FAILURE;
+    } else ATH_MSG_INFO("CscIdHelper retrieved from the DetectorStore");
+  } else ATH_MSG_DEBUG("CscIdHelper already initialized");
+
+  //-------------------
+
+  if (m_rpcIdHelper == nullptr) {
+    if (detStore()->retrieve(m_rpcIdHelper, "RPCIDHELPER" ).isFailure()) {
+      ATH_MSG_ERROR("Can't retrieve RpcIdHelper");
+      return StatusCode::FAILURE;
+    } else ATH_MSG_INFO("RpcIdHelper retrieved from the DetectorStore");
+  } else ATH_MSG_DEBUG("RpcIdHelper already initialized");
+
+  //-------------------
+
+  if (m_tgcIdHelper == nullptr) {
+    if (detStore()->retrieve(m_tgcIdHelper, "TGCIDHELPER" ).isFailure()) {
+      ATH_MSG_ERROR("Can't retrieve TgcIdHelper");
+      return StatusCode::FAILURE;
+    } else ATH_MSG_INFO("TgcIdHelper retrieved from the DetectorStore");
+  } else ATH_MSG_DEBUG("TgcIdHelper already initialized");
+
+  //-------------------
+
+  // !!!!! HERE WE SHOULD PUT CODE FOR NSW (MM and STGC)
+
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode MuonAlignmentCondAlg::loadParameters() {
+
+  StatusCode sc = StatusCode::SUCCESS;
+
+  ATH_MSG_DEBUG( "In LoadParameters " << name() );
+
+  // =======================
+  // Loop on folders requested in configuration and check if /MUONALIGN/CSC/ILINES and /MUONALIGN/MDT/ASBUILTPARAMS are requested
+  // =======================
+  bool AsBuiltRequested = false;
+  bool ILineRequested = false;
+  for (const std::string& currentFolderName : m_parlineFolder) {
+    if(currentFolderName.find("ILINES") != std::string::npos) ILineRequested = true;
+    if(currentFolderName.find("ASBUILTPARAMS") != std::string::npos) AsBuiltRequested = true;
+  }
+
+  // =======================
+  // Load ILine parameters if requested in the joboptions and /MUONALIGN/CSC/ILINES folder given in the joboptions
+  // =======================
+  if( m_ILinesFromDb and ILineRequested) {
+    sc = loadAlignILines("/MUONALIGN/CSC/ILINES");
+  } 
+  else if (ILineRequested and not m_ILinesFromDb) {
+    ATH_MSG_INFO("DB folder for I-Lines given in job options however loading disabled ");
+    sc = StatusCode::SUCCESS;
+  }
+  if(sc.isFailure()) return StatusCode::FAILURE;
+
+  // =======================
+  // Load AsBuilt parameters if /MUONALIGN/MDT/ASBUILTPARAMS folder given in the joboptions
+  // =======================
+  if(AsBuiltRequested) sc = loadAlignAsBuilt("/MUONALIGN/MDT/ASBUILTPARAMS");
+  if(sc.isFailure()) return StatusCode::FAILURE;
+
+  // =======================
+  // Load A- and B-Lines
+  // =======================
+  sc = loadAlignABLines();
+  if(sc.isFailure()) return StatusCode::FAILURE;
+
+  return sc;
+}
+
+StatusCode MuonAlignmentCondAlg::loadAlignABLines() {
+
+  // =======================
+  // Write ALine Cond Handle
+  // =======================
+  SG::WriteCondHandle<ALineMapContainer> writeALineHandle{m_writeALineKey};
+  if (writeALineHandle.isValid()) {
+    ATH_MSG_DEBUG("CondHandle " << writeALineHandle.fullKey() << " is already valid."
+		  << ". In theory this should not be called, but may happen"
+		  << " if multiple concurrent events are being processed out of order.");
+    return StatusCode::SUCCESS;
+  }
+  std::unique_ptr<ALineMapContainer> writeALineCdo{std::make_unique<ALineMapContainer>()};
+
+  // =======================
+  // Write BLine Cond Handle
+  // =======================
+  SG::WriteCondHandle<BLineMapContainer> writeBLineHandle{m_writeBLineKey};
+  if (writeBLineHandle.isValid()) {
+    ATH_MSG_DEBUG("CondHandle " << writeBLineHandle.fullKey() << " is already valid."
+		  << ". In theory this should not be called, but may happen"
+		  << " if multiple concurrent events are being processed out of order.");
+    return StatusCode::SUCCESS;
+  }
+  std::unique_ptr<BLineMapContainer> writeBLineCdo{std::make_unique<BLineMapContainer>()};
+
+
+  // =======================
+  // Loop on folders requested in configuration and process the ones that have A- and B-lines
+  // =======================
+
+  EventIDRange rangeALineW;
+  EventIDRange rangeBLineW;
+  for (const std::string& currentFolderName : m_parlineFolder) {
+    if(currentFolderName.find("ILINES") != std::string::npos) continue;
+    if(currentFolderName.find("ASBUILTPARAMS") != std::string::npos) continue;
+    // Process the current folder for the A- and B-lines
+    if(loadAlignABLines(currentFolderName, 
+			writeALineCdo.get(), 
+			writeBLineCdo.get(),
+			rangeALineW,
+			rangeBLineW).isSuccess()) {
+      ATH_MSG_INFO("A- and B-Lines parameters from DB folder <" << currentFolderName << "> loaded");
+    } else {
+      ATH_MSG_ERROR("A- and B-Lines parameters from DB folder <" << currentFolderName << "> failed to load");
+      return StatusCode::FAILURE; 
+    }
+  }
+
+  // =======================
+  // FIRST Update the MuonDetectorManager and THEN record the ALine.
+  // =======================
+
+  if (m_muonMgr->updateAlignment(writeALineCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateAlignment" );
+  else ATH_MSG_DEBUG("updateAlignment DONE" );
+
+  if (writeALineHandle.record(rangeALineW, std::move(writeALineCdo)).isFailure()) {
+    ATH_MSG_FATAL("Could not record ALineMapContainer " << writeALineHandle.key() 
+		  << " with EventRange " << rangeALineW
+		  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }		  
+  ATH_MSG_INFO("recorded new " << writeALineHandle.key() << " with range " << rangeALineW << " into Conditions Store");
+
+  // =======================
+  // FIRST Update the MuonDetectorManager and THEN record the BLine.
+  // =======================
+
+  if (m_muonMgr->updateDeformations(writeBLineCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateDeformations" );
+  else ATH_MSG_DEBUG("updateDeformations DONE" );
+
+  if (writeBLineHandle.record(rangeBLineW, std::move(writeBLineCdo)).isFailure()) {
+    ATH_MSG_FATAL("Could not record BLineMapContainer " << writeBLineHandle.key() 
+		  << " with EventRange " << rangeBLineW
+		  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }		  
+  ATH_MSG_INFO("recorded new " << writeBLineHandle.key() << " with range " << rangeBLineW << " into Conditions Store");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode MuonAlignmentCondAlg::loadAlignABLines(std::string folderName,
+						ALineMapContainer* writeALineCdo,
+						BLineMapContainer* writeBLineCdo,
+						EventIDRange& rangeALineW,
+						EventIDRange& rangeBLineW) {
+
+  ATH_MSG_INFO("Load alignment parameters from DB folder <" << folderName << ">");
+
+  bool hasBLine = true;
+  if (folderName.find("TGC")!=std::string::npos)  {
+    hasBLine = false;
+    ATH_MSG_INFO("No BLines decoding will be attempted for folder named " << folderName);
+  }
+   
+  // =======================
+  // Read Cond Handles and ranges for current folder
+  // =======================
+  EventIDRange rangeALinesTemp;
+  EventIDRange rangeBLinesTemp;
+  const CondAttrListCollection* readCdo; 
+  if (folderName == "/MUONALIGN/MDT/BARREL") {
+
+    SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readMdtBarrelKey};
+    readCdo = *readHandle; 
+    if(readCdo==nullptr){
+      ATH_MSG_ERROR("Null pointer to the read ALINES conditions object");
+      return StatusCode::FAILURE; 
+    } 
+    
+    if ( !readHandle.range(rangeALinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve ALines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    }
+    if ( !readHandle.range(rangeBLinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve BLines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+    
+    ATH_MSG_INFO("Size of /MUONALIGN/MDT/BARREL CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
+    ATH_MSG_INFO("Range of /MUONALIGN/MDT/BARREL input is, ALines: " << rangeALinesTemp << " BLines: " << rangeBLinesTemp);
+
+  } else if (folderName == "/MUONALIGN/MDT/ENDCAP/SIDEA") {
+
+    SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readMdtEndcapSideAKey};
+    readCdo = *readHandle; 
+    if(readCdo==nullptr){
+      ATH_MSG_ERROR("Null pointer to the read ALINES conditions object");
+      return StatusCode::FAILURE; 
+    } 
+    
+    if ( !readHandle.range(rangeALinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve ALines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+    if ( !readHandle.range(rangeBLinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve BLines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+    
+    ATH_MSG_INFO("Size of /MUONALIGN/MDT/ENDCAP/SIDEA CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
+    ATH_MSG_INFO("Range of /MUONALIGN/MDT/ENDCAP/SIDEA input is, ALines: " << rangeALinesTemp << " BLines: " << rangeBLinesTemp);
+
+  } else if (folderName == "/MUONALIGN/MDT/ENDCAP/SIDEC") {
+
+    SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readMdtEndcapSideCKey};
+    readCdo = *readHandle; 
+    if(readCdo==nullptr){
+      ATH_MSG_ERROR("Null pointer to the read ALINES conditions object");
+      return StatusCode::FAILURE; 
+    } 
+    
+    if ( !readHandle.range(rangeALinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve ALines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+    if ( !readHandle.range(rangeBLinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve BLines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+    
+    ATH_MSG_INFO("Size of /MUONALIGN/MDT/ENDCAP/SIDEC CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
+    ATH_MSG_INFO("Range of /MUONALIGN/MDT/ENDCAP/SIDEC input is, ALines: " << rangeALinesTemp << " BLines: " << rangeBLinesTemp);
+
+  } else if (folderName == "/MUONALIGN/TGC/SIDEA") {
+
+    SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readTgcSideAKey};
+    readCdo = *readHandle; 
+    if(readCdo==nullptr){
+      ATH_MSG_ERROR("Null pointer to the read ALINES conditions object");
+      return StatusCode::FAILURE; 
+    } 
+    
+    if ( !readHandle.range(rangeALinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve ALines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+
+    // !!!!!!!! NO BLINES FOR TGCs !!!!!!!!!!!!!!
+    
+    ATH_MSG_INFO("Size of /MUONALIGN/TGC/SIDEA CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
+    ATH_MSG_INFO("Range of /MUONALIGN/TGC/SIDEA input is, ALines: " << rangeALinesTemp);
+
+  } else if (folderName == "/MUONALIGN/TGC/SIDEC") {
+
+    SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readTgcSideCKey};
+    readCdo = *readHandle; 
+    if(readCdo==nullptr){
+      ATH_MSG_ERROR("Null pointer to the read ALINES conditions object");
+      return StatusCode::FAILURE; 
+    } 
+    
+    if ( !readHandle.range(rangeALinesTemp) ) {
+      ATH_MSG_ERROR("Failed to retrieve ALines validity range for " << readHandle.key());
+      return StatusCode::FAILURE;
+    } 
+    // !!!!!!!! NO BLINES FOR TGCs !!!!!!!!!!!!!!
+    
+    ATH_MSG_INFO("Size of /MUONALIGN/TGC/SIDEC CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
+    ATH_MSG_INFO("Range of /MUONALIGN/TGC/SIDEC input is, ALines: " << rangeALinesTemp);
+
+  }
+
+  // Combine the validity ranges for ALines
+  EventIDRange rangeIntersection{EventIDRange::intersect(rangeALineW, rangeALinesTemp)};     
+  ATH_MSG_DEBUG("rangeIntersection: " << rangeIntersection << " Previous range: " << rangeALineW << " Current range : " << rangeALinesTemp);
+  if (rangeIntersection.stop().isValid() and rangeIntersection.start()>rangeIntersection.stop()) {       
+    ATH_MSG_FATAL("Invalid intersection range: " << rangeIntersection);       
+    return StatusCode::FAILURE;     }     
+  rangeALineW = rangeIntersection;
+
+  // Combine the validity ranges for BLines
+  if (hasBLine) {
+    EventIDRange rangeIntersection{EventIDRange::intersect(rangeBLineW, rangeBLinesTemp)};     
+    ATH_MSG_DEBUG("rangeIntersection: " << rangeIntersection << " Previous range: " << rangeALineW << " Current range: " << rangeALinesTemp);
+    if (rangeIntersection.stop().isValid() and rangeIntersection.start()>rangeIntersection.stop()) {       
+      ATH_MSG_FATAL("Invalid intersection range: " << rangeIntersection);       
+      return StatusCode::FAILURE;     }     
+    rangeBLineW = rangeIntersection;  
+  }
+
+  // =======================
+  // retreive the collection of strings read out from the DB
+  // =======================
+
+  // unpack the strings in the collection and update the 
+  // ALlineContainer in TDS
+  int nLines = 0;
+  int nDecodedLines = 0;
+  int nNewDecodedALines = 0;
+  int nNewDecodedBLines = 0;
+  CondAttrListCollection::const_iterator itr;
+  for (itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
+    const coral::AttributeList& atr=itr->second;
+    std::string data;
+    data=*(static_cast<const std::string*>((atr["data"]).addressOfData()));
+    
+    ATH_MSG_DEBUG("Data load is " << data << " FINISHED HERE ");
+  
+    // Check the first word to see if it is a correction
+    std::string type;
+    
+    //Parse corrections
+    std::string since_str;
+    std::string till_str;
+    std::string delimiter = "\n";
+      
+    
+    std::vector<std::string> lines;
+    MuonCalib::MdtStringUtils::tokenize(data,lines,delimiter);
+    for (std::string blobline : lines) {
+      ++nLines;
+
+      std::string delimiter = ":";
+      std::vector<std::string> tokens;
+      MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+      //Check if tokens is not empty
+      if (tokens.empty()) {
+	ATH_MSG_FATAL("Empty string retrieved from DB in folder " << folderName);
+	return  StatusCode::FAILURE;
+      }
+      type = tokens[0];
+      //Parse line
+      if (type.find("#")==0) {
+	//skip it
+	continue;
+      }
+
+      if (type.find("Header")==0) {
+	std::string delimiter = "|";
+	std::vector<std::string> tokens;
+	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+	since_str = tokens[1];
+	till_str = tokens[2];
+      }
+	
+      if (type.find("IOV")==0) {
+	std::string delimiter = " ";
+	std::vector<std::string> tokens;
+	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+	int ival = 1;
+	long int iovThisBlob=0;
+	
+	std::string str_iovThisBlob = tokens[ival];
+	sscanf(str_iovThisBlob.c_str(),"%80ld",&iovThisBlob);
+	ATH_MSG_INFO("Data read from folder " << folderName <<
+		     " have IoV = " << iovThisBlob);
+      }
+	
+      if (type.find("Corr")==0) {
+//#: Corr line is counter typ,  jff,  jzz, job,                         * Chamber information 
+//#:                       svalue,  zvalue, tvalue,  tsv,  tzv,  ttv,   * A lines 
+//#:                       bz, bp, bn, sp, sn, tw, pg, tr, eg, ep, en   * B lines 
+//#:                       chamber                                      * Chamber name 
+//.... example
+//Corr: EMS  4   1  0     2.260     3.461    28.639 -0.002402 -0.002013  0.000482    -0.006    -0.013 -0.006000  0.000000  0.000000     0.026    -0.353  0.000000  0.070000  0.012000    -0.012    EMS1A08
+
+	std::string delimiter = " ";
+	std::vector<std::string> tokens;
+	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+
+	//Check if tokens has the right length
+	// if (tokens.size() != 12 and tokens.size() != 23) {
+	if (tokens.size() != 25) {
+	  ATH_MSG_FATAL("Invalid length in string retrieved from DB in folder " << folderName << " String length is " << tokens.size());
+	  return  StatusCode::FAILURE;
+	}
+
+	ATH_MSG_VERBOSE("Parsing Line = ");
+	for (std::string token : tokens) ATH_MSG_VERBOSE( token << " | ");
+	ATH_MSG_VERBOSE( " " );
+
+	bool thisRowHasBLine = true;
+	if (tokens.size()<15) {
+	  // only A-lines ..... old COOL blob convention for barrel 
+	  thisRowHasBLine = false;
+	  ATH_MSG_VERBOSE("(old COOL blob convention for barrel) skipping B-line decoding ");
+	}
+
+	// Start parsing
+	int ival=1;
+	
+	// Station Component identification 
+	int jff; 
+	int jzz;
+	int job;
+	std::string stationType = tokens[ival++];	  
+	std::string jff_str = tokens[ival++]; 
+	sscanf(jff_str.c_str(),"%80d",&jff);
+	std::string jzz_str = tokens[ival++];
+	sscanf(jzz_str.c_str(),"%80d",&jzz);
+	std::string job_str = tokens[ival++];
+	sscanf(job_str.c_str(),"%80d",&job);
+	
+	// A-line
+	float s;
+	float z;
+	float t;
+	float ths;
+	float thz;
+	float tht;	  
+	std::string s_str = tokens[ival++];
+	sscanf(s_str.c_str(),"%80f",&s);
+	std::string z_str = tokens[ival++];
+	sscanf(z_str.c_str(),"%80f",&z);
+	std::string t_str = tokens[ival++];
+	sscanf(t_str.c_str(),"%80f",&t);
+	std::string ths_str = tokens[ival++];
+	sscanf(ths_str.c_str(),"%80f",&ths);
+	std::string thz_str = tokens[ival++];
+	sscanf(thz_str.c_str(),"%80f",&thz);
+	std::string tht_str = tokens[ival++];
+	sscanf(tht_str.c_str(),"%80f",&tht);
+
+	// B-line
+	float bz, bp, bn, sp, sn, tw, pg, tr, eg, ep, en;
+	std::string ChamberHwName="";
+	  
+	if (hasBLine && thisRowHasBLine) {	      
+	  std::string tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&bz);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&bp);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&bn);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&sp);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&sn);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&tw);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&pg);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&tr);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&eg);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&ep);
+	  tmp_str = tokens[ival++];
+	  sscanf(tmp_str.c_str(),"%80f",&en);	  
+
+	  // ChamberName (hardware convention)
+	  ChamberHwName = tokens[ival++];
+	}
+	  
+	ATH_MSG_VERBOSE("Station type "  << stationType);
+	ATH_MSG_VERBOSE("jff / jzz / job "  << jff << " / " << jzz << " / " << job);
+	if (hasBLine) {
+	  ATH_MSG_VERBOSE(" HardwareChamberName " << ChamberHwName);
+	}
+	else ATH_MSG_VERBOSE(" ");
+	ATH_MSG_VERBOSE("A-line: s,z,t "  << s << " " << z << " " << t);
+	ATH_MSG_VERBOSE(" ts,tz,tt "  << ths << " " << thz << " " << tht);
+	if (hasBLine) {
+	  if (thisRowHasBLine) {
+	    ATH_MSG_VERBOSE("B-line:  bz,bp,bn " << bz << " " << bp << " " << bn);
+	    ATH_MSG_VERBOSE(" sp,sn " << sp << " " << sn << " tw,pg,tr " << tw << " " << pg << " " << tr
+			    << " eg,ep,en " << eg << " " << ep << " " << en);
+	  }
+	  else ATH_MSG_VERBOSE("No B-line found");
+	} 
+	  
+	int stationName = m_mdtIdHelper->stationNameIndex(stationType);
+	Identifier id;
+	ATH_MSG_VERBOSE("stationName  " << stationName);
+	// if (stationType.substr(0,1)=="T") {
+	if (stationType.at(0) == 'T') {
+	  // tgc case
+	  int stPhi = MuonGM::stationPhiTGC(stationType, jff, jzz, m_geometryVersion); // !!!!! The stationPhiTGC implementation in this package is NOT used !!!!!
+	  int stEta = 1;
+	  if (jzz<0) stEta = -1;			 
+	  if (job != 0) {
+	    // this should become the default now 
+	    stEta=job;
+	    if (jzz<0) stEta = -stEta;
+	  }
+	  id = m_tgcIdHelper->elementID(stationName, stEta, stPhi);
+	  ATH_MSG_VERBOSE("identifier being assigned is " << m_tgcIdHelper->show_to_string(id));
+	}
+	else if (stationType.substr(0,1)=="C") {
+	  // csc case
+	  id = m_cscIdHelper->elementID(stationName, jzz, jff);
+	  ATH_MSG_VERBOSE("identifier being assigned is " << m_cscIdHelper->show_to_string(id));
+	}
+	else if (stationType.substr(0,3)=="BML" && abs(jzz)==7) {
+	  // rpc case
+	  id = m_rpcIdHelper->elementID(stationName, jzz, jff, 1);
+	  ATH_MSG_VERBOSE("identifier being assigned is " << m_rpcIdHelper->show_to_string(id));
+	}
+	else {
+	  id = m_mdtIdHelper->elementID(stationName, jzz, jff);
+	  ATH_MSG_VERBOSE("identifier being assigned is " << m_mdtIdHelper->show_to_string(id));
+	}
+          
+
+	// new Aline
+	++nDecodedLines;
+	++nNewDecodedALines;
+	ALinePar* newALine = new ALinePar();
+	newALine->setAmdbId(stationType, jff, jzz, job);
+	newALine->setParameters(s,z,t,ths,thz,tht);
+	newALine->isNew(true);	  
+	iALineMap ialine;
+	if((ialine = writeALineCdo->find(id)) != writeALineCdo->end()) {
+	  ATH_MSG_WARNING("More than one (A-line) entry in folder " << folderName << 
+			  " for  " << stationType <<
+			  " at Jzz/Jff " << jzz << "/" << jff <<
+			  " --- keep the latest one");
+          ALinePar* oldALinePar =  (*ialine).second;
+          writeALineCdo->erase(id);
+          delete oldALinePar; oldALinePar=0;
+	  --nNewDecodedALines;
+	}
+	writeALineCdo->insert(std::make_pair(id,(ALinePar*)newALine));
+
+	if (hasBLine && thisRowHasBLine) {
+	  // new Bline
+	  ++nNewDecodedBLines;
+	  BLinePar* newBLine = new BLinePar();
+	  newBLine->setAmdbId(stationType, jff, jzz, job);
+	  newBLine->setParameters(bz, bp, bn, sp, sn, tw, pg, tr, eg, ep, en);
+	  newBLine->isNew(true);
+	  iBLineMap ibline;
+	  if((ibline = writeBLineCdo->find(id)) != writeBLineCdo->end()) {
+	    ATH_MSG_WARNING("More than one (B-line) entry in folder " << folderName <<
+			    " for  " << stationType <<
+			    " at Jzz/Jff " << jzz << "/" << jff <<
+			    " --- keep the latest one");
+	    BLinePar* oldBLinePar =  (*ibline).second;
+	    writeBLineCdo->erase(id);
+	    delete oldBLinePar; oldBLinePar=0;
+	    --nNewDecodedBLines;
+	  }
+	  writeBLineCdo->insert(std::make_pair(id,(BLinePar*)newBLine));
+	}
+      }
+    }
+  }
+  ATH_MSG_DEBUG("In folder < " << folderName << 
+		  "> # lines/decodedLines/newDecodedALines/newDecodedBLines= " << nLines <<
+		  "/" << nDecodedLines <<
+		  "/" << nNewDecodedALines <<
+		  "/" << nNewDecodedBLines);
+
+  // set A-lines from ASCII file
+  if (m_aLinesFile!="" && (int)writeALineCdo->size()>0 ) setALinesFromAscii(writeALineCdo);
+  
+  // dump A-lines to log file
+  if (m_dumpALines && (int)writeALineCdo->size()>0) dumpALines(folderName, writeALineCdo);
+   
+  // dump B-lines to log file
+  if (m_dumpBLines && (int)writeBLineCdo->size()>0) dumpBLines(folderName, writeBLineCdo);
+
+  // !!!!!!!!!!!!!! In the MuonAlignmentDbSvc this was here. I moved it to loadAlignAsBuilt
+  // if ( m_asBuiltFile!="" ) setAsBuiltFromAscii();
+
+  ATH_MSG_VERBOSE("Collection CondAttrListCollection CLID " << readCdo->clID());
+      
+  return  StatusCode::SUCCESS; 
+}
+
+StatusCode MuonAlignmentCondAlg::loadAlignILines(std::string folderName) 
+{
+
+  // =======================
+  // Write ILine Cond Handle
+  // =======================
+  SG::WriteCondHandle<CscInternalAlignmentMapContainer> writeHandle{m_writeILineKey};
+  if (writeHandle.isValid()) {
+    ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
+		  << ". In theory this should not be called, but may happen"
+		  << " if multiple concurrent events are being processed out of order.");
+    return StatusCode::SUCCESS;
+  }
+  std::unique_ptr<CscInternalAlignmentMapContainer> writeCdo{std::make_unique<CscInternalAlignmentMapContainer>()};
+
+  ATH_MSG_INFO("Load alignment parameters from DB folder <" << folderName << ">");
+
+  // =======================
+  // Read CSC/ILINES Cond Handle
+  // =======================
+  SG::ReadCondHandle<CondAttrListCollection> readCscILinesHandle{m_readCscILinesKey};
+  const CondAttrListCollection* readCscILinesCdo{*readCscILinesHandle}; 
+  if(readCscILinesCdo==nullptr){
+    ATH_MSG_ERROR("Null pointer to the read CSC/ILINES conditions object");
+    return StatusCode::FAILURE; 
+  } 
+  
+  EventIDRange rangeCscILinesW;
+  if ( !readCscILinesHandle.range(rangeCscILinesW) ) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for " << readCscILinesHandle.key());
+    return StatusCode::FAILURE;
+  } 
+
+  ATH_MSG_INFO("Size of CSC/ILINES CondAttrListCollection " << readCscILinesHandle.fullKey() << " readCscILinesCdo->size()= " << readCscILinesCdo->size());
+  ATH_MSG_INFO("Range of CSC/ILINES input is " << rangeCscILinesW);
+
+  // =======================
+  // Retrieve the collection of strings read out from the DB
+  // =======================
+  // unpack the strings in the collection and update the 
+  // ALlineContainer in TDS
+  int nLines = 0;
+  int nDecodedLines = 0;
+  int nNewDecodedILines = 0;
+  CondAttrListCollection::const_iterator itr;
+  for (itr = readCscILinesCdo->begin(); itr != readCscILinesCdo->end(); ++itr) {
+    const coral::AttributeList& atr=itr->second;
+    std::string data;
+    data=*(static_cast<const std::string*>((atr["data"]).addressOfData()));
+    
+    ATH_MSG_DEBUG("Data load is " << data << " FINISHED HERE ");
+    
+    // Check the first word to see if it is a correction
+    std::string type;
+    
+    //Parse corrections
+    std::string since_str;
+    std::string till_str;
+    std::string delimiter = "\n";
+      
+    
+    std::vector<std::string> lines;
+    MuonCalib::MdtStringUtils::tokenize(data,lines,delimiter);
+    for (std::string blobline : lines) {
+      ++nLines;
+      
+      std::string delimiter = ":";
+      std::vector<std::string> tokens;
+      MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+      //Check if tokens is not empty
+      if (tokens.empty()) {
+	ATH_MSG_FATAL("Empty string retrieved from DB in folder " << folderName);
+	return  StatusCode::FAILURE;
+      }
+      type = tokens[0];
+      //Parse line
+      if (type.find("#")==0) {
+	//skip it
+	continue;
+      }
+
+      if (type.find("Header")==0) {
+	std::string delimiter = "|";
+	std::vector<std::string> tokens;
+	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+	since_str = tokens[1];
+	till_str = tokens[2];
+      }
+	
+      if (type.find("IOV")==0) {
+	std::string delimiter = " ";
+	std::vector<std::string> tokens;
+	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+	int ival = 1;
+	long int iovThisBlob=0;
+
+	std::string str_iovThisBlob = tokens[ival];
+	sscanf(str_iovThisBlob.c_str(),"%80ld",&iovThisBlob);
+	ATH_MSG_INFO("Data read from folder " << folderName <<
+		     " have IoV = " << iovThisBlob);
+      }
+	
+      if (type.find("Corr")==0) {
+        //# Amdb like clob for ilines using geometry tag ISZT-R06-02 
+        //# ISZT_DATA_ID VERS TYP JFF JZZ JOB JLAY TRAS TRAZ TRAT ROTS ROTZ ROTT
+        //
+        //.... example
+        //Corr:  CSL 1 -1 3 1 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
+
+	std::string delimiter = " ";
+	std::vector<std::string> tokens;
+	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+	if (tokens.size() != 12) {
+	  ATH_MSG_FATAL("Invalid length in string retrieved from DB in folder " << folderName << " String length is " << tokens.size());
+	  return  StatusCode::FAILURE;
+	}
+
+	ATH_MSG_VERBOSE("Parsing Line = ");
+	for (std::string token : tokens) ATH_MSG_VERBOSE( token << " | ");
+	ATH_MSG_VERBOSE( " " );
+
+	// Start parsing
+	int ival=1;
+	
+	// Station Component identification 
+	int jff; 
+	int jzz;
+	int job;
+	int jlay;
+	std::string stationType = tokens[ival++];	  
+	std::string jff_str = tokens[ival++]; 
+	sscanf(jff_str.c_str(),"%80d",&jff);
+	std::string jzz_str = tokens[ival++];
+	sscanf(jzz_str.c_str(),"%80d",&jzz);
+	std::string job_str = tokens[ival++];
+	sscanf(job_str.c_str(),"%80d",&job);
+	std::string jlay_str = tokens[ival++];
+	sscanf(jlay_str.c_str(),"%80d",&jlay);
+	
+	// I-line
+	float tras;
+	float traz;
+	float trat;
+	float rots;
+	float rotz;
+	float rott;	
+	std::string tras_str = tokens[ival++];
+	sscanf(tras_str.c_str(),"%80f",&tras);
+	std::string traz_str = tokens[ival++];
+	sscanf(traz_str.c_str(),"%80f",&traz);
+	std::string trat_str = tokens[ival++];
+	sscanf(trat_str.c_str(),"%80f",&trat);
+	std::string rots_str = tokens[ival++];
+	sscanf(rots_str.c_str(),"%80f",&rots);
+	std::string rotz_str = tokens[ival++];
+	sscanf(rotz_str.c_str(),"%80f",&rotz);
+	std::string rott_str = tokens[ival++];
+	sscanf(rott_str.c_str(),"%80f",&rott);
+
+	ATH_MSG_VERBOSE("Station type "  << stationType);
+	ATH_MSG_VERBOSE("jff / jzz / job / jlay "  <<jff <<" / "<< jzz<<" / "<< job<<" / "<<jlay);
+	ATH_MSG_VERBOSE("I-line: tras,traz,trat "  << tras <<" "<< traz <<" "<< trat);
+	ATH_MSG_VERBOSE(" rots,rotz,rott "  << rots <<" "<< rotz <<" "<< rott);
+	  
+	int stationName = m_cscIdHelper->stationNameIndex(stationType);
+	Identifier id;
+	ATH_MSG_VERBOSE("stationName  " << stationName);
+	// if (stationType.substr(0,1)=="C") {
+	if (stationType.at(0) == 'C') {
+	  // csc case
+	  int chamberLayer = 2;
+	  if (job != 3) ATH_MSG_WARNING("job = "<<job<<" is not 3 => chamberLayer should be 1 - not existing ! setting 2");
+	  id = m_cscIdHelper->channelID(stationType, jzz, jff, chamberLayer, jlay, 0, 1);
+	  ATH_MSG_VERBOSE("identifier being assigned is " << m_cscIdHelper->show_to_string(id));
+	}
+	else {
+	  ATH_MSG_ERROR("There is a non CSC chamber in the list of CSC internal alignment parameters.");
+	}
+	// new Iline
+	++nDecodedLines;
+	++nNewDecodedILines;
+	CscInternalAlignmentPar* newILine = new CscInternalAlignmentPar();
+	newILine->setAmdbId(stationType, jff, jzz, job, jlay);
+	newILine->setParameters(tras,traz,trat,rots,rotz,rott);
+	newILine->isNew(true);	  
+	iCscInternalAlignmentMap iiline;
+	if((iiline = writeCdo->find(id)) != writeCdo->end()) {
+	  ATH_MSG_WARNING("More than one (I-line) entry in folder " << folderName << 
+			  " for  " << stationType <<
+			  " at Jzz/Jff/Jlay " << jzz << "/" << jff << "/" << jlay <<
+			  " --- keep the latest one");
+	  CscInternalAlignmentPar* oldCscInternalAlignmentPar =  (*iiline).second;
+	  writeCdo->erase(id);
+	  delete oldCscInternalAlignmentPar; oldCscInternalAlignmentPar=0;
+	  --nNewDecodedILines;
+	}
+	//	m_ilineData->insert(std::make_pair(id,(CscInternalAlignmentPar*)newILine));
+	writeCdo->insert(std::make_pair(id,(CscInternalAlignmentPar*)newILine));
+      }
+    }
+  }
+  ATH_MSG_DEBUG("In folder <" << folderName << "> # lines/decodedLines/newDecodedILines= "
+		<<nLines<<"/"<<nDecodedLines<<"/"<<nNewDecodedILines<<"/");
+
+   // dump I-lines to log file TBA
+  if (m_dumpILines && (int)writeCdo->size()>0) dumpILines(folderName, writeCdo.get());
+
+  // =======================
+  // FIRST update MuonDetectorManager and THEN record the output cond object.
+  // =======================
+
+  if (m_muonMgr->updateCSCInternalAlignmentMap(writeCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateCSCInternalAlignmentMap" );
+  else ATH_MSG_DEBUG("updateCSCInternalAlignmentMap DONE" );
+
+  if (writeHandle.record(rangeCscILinesW, std::move(writeCdo)).isFailure()) {
+    ATH_MSG_FATAL("Could not record CscInternalAlignmentMapContainer " << writeHandle.key() 
+		  << " with EventRange " << rangeCscILinesW
+		  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }		  
+  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << rangeCscILinesW << " into Conditions Store");
+  
+  ATH_MSG_VERBOSE("Collection CondAttrListCollection CLID " << readCscILinesCdo->clID());
+   
+  return  StatusCode::SUCCESS;; 
+}
+
+StatusCode MuonAlignmentCondAlg::loadAlignAsBuilt(std::string folderName) 
+{
+
+  // =======================
+  // Write AsBuilt Cond Handle
+  // =======================
+  SG::WriteCondHandle<MdtAsBuiltMapContainer> writeHandle{m_writeAsBuiltKey};
+  if (writeHandle.isValid()) {
+    ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
+		  << ". In theory this should not be called, but may happen"
+		  << " if multiple concurrent events are being processed out of order.");
+    return StatusCode::SUCCESS;
+  }
+  std::unique_ptr<MdtAsBuiltMapContainer> writeCdo{std::make_unique<MdtAsBuiltMapContainer>()};
+
+  ATH_MSG_INFO( "Load alignment parameters from DB folder <"<<folderName<<">" );
+
+  // =======================
+  // Read MDT/ASBUILTPARAMS Cond Handle
+  // =======================
+  SG::ReadCondHandle<CondAttrListCollection> readMdtAsBuiltHandle{m_readMdtAsBuiltParamsKey};
+  const CondAttrListCollection* readMdtAsBuiltCdo{*readMdtAsBuiltHandle}; 
+  if(readMdtAsBuiltCdo==nullptr){
+    ATH_MSG_ERROR("Null pointer to the read MDT/ASBUILTPARAMS conditions object");
+    return StatusCode::FAILURE; 
+  } 
+  
+  EventIDRange rangeMdtAsBuiltW;
+  if ( !readMdtAsBuiltHandle.range(rangeMdtAsBuiltW) ) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for " << readMdtAsBuiltHandle.key());
+    return StatusCode::FAILURE;
+  } 
+
+  ATH_MSG_INFO("Size of MDT/ASBUILTPARAMS CondAttrListCollection " << readMdtAsBuiltHandle.fullKey() << " ->size()= " << readMdtAsBuiltCdo->size());
+  ATH_MSG_INFO("Range of MDT/ASBUILTPARAMS input is " << rangeMdtAsBuiltW);
+
+  // =======================
+  // Retrieve the collection of strings read out from the DB
+  // =======================
+  // unpack the strings in the collection and update the 
+  // AsBuiltContainer in TDS
+  int nLines = 0;
+  int nDecodedLines = 0;
+  int nNewDecodedAsBuilt = 0;
+  MdtAsBuiltPar xPar;
+  xPar.isNew(true);
+  CondAttrListCollection::const_iterator itr;
+  for (itr = readMdtAsBuiltCdo->begin(); itr != readMdtAsBuiltCdo->end(); ++itr) {
+    const coral::AttributeList& atr=itr->second;
+    std::string data;
+    data=*(static_cast<const std::string*>((atr["data"]).addressOfData()));
+    
+    ATH_MSG_DEBUG( "Data load is " << data << " FINISHED HERE " );
+    
+    // Check the first word to see if it is a correction
+    std::string type;
+    
+    //Parse corrections
+    std::string delimiter = "\n";
+    
+    std::vector<std::string> lines;
+    MuonCalib::MdtStringUtils::tokenize(data,lines,delimiter);
+    for (std::string blobline : lines) {
+      ++nLines;
+      
+      std::string delimiter = ":";
+      std::vector<std::string> tokens;
+      MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
+      //Check if tokens is not empty
+      if (tokens.empty()) {
+	ATH_MSG_FATAL("Empty string retrieved from DB in folder " << folderName);
+	return  StatusCode::FAILURE;
+      }
+      type = tokens[0];
+      //Parse line
+      if (type.find("#")==0) {
+         //skip it
+         continue;
+      }
+	
+      if (type.find("Corr")==0) {
+	if (!xPar.setFromAscii(blobline)) {
+          ATH_MSG_ERROR( "Unable to parse AsBuilt params from Ascii line: " << blobline  );
+          continue;
+	}
+
+        std::string stationType="XXX";
+        int jff = 0;
+        int jzz = 0;
+        int job = 0;
+        xPar.getAmdbId(stationType, jff, jzz, job);
+	Identifier id = m_mdtIdHelper->elementID(stationType, jzz, jff);
+	
+	ATH_MSG_VERBOSE("Station type jff jzz "  << stationType  << jff << " " << jzz  );
+        ++nDecodedLines;
+        ++nNewDecodedAsBuilt;
+        ciMdtAsBuiltMap iasbuild;
+        if((iasbuild = writeCdo->find(id)) != writeCdo->end()) {
+	  ATH_MSG_WARNING( "More than one (As-built) entry in folder "<<folderName<<" for  "
+                           << stationType<<" at Jzz/Jff "<<jzz<<"/"<< jff<<" --- keep the latest one" );
+	  MdtAsBuiltPar* oldMdtAsBuiltPar =  (*iasbuild).second;
+	  writeCdo->erase(id);
+	  delete oldMdtAsBuiltPar; oldMdtAsBuiltPar=0;
+          --nNewDecodedAsBuilt;
+        }
+	writeCdo->insert(std::make_pair(id,new MdtAsBuiltPar(xPar)));
+      }
+    }
+  }
+  ATH_MSG_DEBUG("In folder <"<<folderName<<"> # lines/decodedLines/newDecodedILines= "
+		<<nLines<<"/"<<nDecodedLines<<"/"<<nNewDecodedAsBuilt<<"/" );
+
+  // !!!!!!!!!!!!!! In the MuonAlignmentDbTool this was in loadAlignABLines. I moved it here
+  if ( m_asBuiltFile!="" ) setAsBuiltFromAscii(writeCdo.get());
+
+  // =======================
+  // FIRST update MuonDetectorManager and THEN record the output cond object.
+  // =======================
+  if (m_muonMgr->updateAsBuiltParams(writeCdo.get()).isFailure()) ATH_MSG_ERROR("Unable to updateAsBuiltParams" );
+  else ATH_MSG_DEBUG("updateAsBuiltParams DONE" );
+
+  if (writeHandle.record(rangeMdtAsBuiltW, std::move(writeCdo)).isFailure()) {
+    ATH_MSG_FATAL("Could not record MdtAsBuiltMapContainer " << writeHandle.key() 
+		  << " with EventRange " << rangeMdtAsBuiltW
+		  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }		  
+  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << rangeMdtAsBuiltW << " into Conditions Store");
+
+  ATH_MSG_VERBOSE( "Collection CondAttrListCollection CLID " << readMdtAsBuiltCdo->clID() );
+  
+  return  StatusCode::SUCCESS;; 
+}
+
+void MuonAlignmentCondAlg::dumpALines(const std::string& folderName,
+				    ALineMapContainer* writeALineCdo)
+{
+
+  ATH_MSG_INFO("dumping A-lines for folder " << folderName);
+  ATH_MSG_INFO("A type jff jzz job s(cm)  z(cm)  t(cm)  ths(rad)  thz(rad)  tht(rad)  ID");
+  
+  for (auto aline : *writeALineCdo) {
+    Identifier ALineId = aline.first;
+    ALinePar* ALine = aline.second;
+    std::string stationType;
+    int jff,jzz,job;
+    ALine->getAmdbId(stationType,jff,jzz,job);
+    float s,z,t,ths,thz,tht;
+    ALine->getParameters(s,z,t,ths,thz,tht);
+    
+    ATH_MSG_INFO("A " << std::setiosflags(std::ios::fixed|std::ios::right)
+		 << std::setw(4) << stationType  <<" " 
+		 << std::setw(2) << jff  <<"  " 
+		 << std::setw(2) << jzz  <<" " 
+		 << std::setw(2) << job  <<" "
+		 << std::setw(6) << std::setprecision(3) <<  s   <<" "  // here cm !
+		 << std::setw(6) << std::setprecision(3) <<  z   <<" "  // here cm !
+		 << std::setw(6) << std::setprecision(3) <<  t   <<" "  // here cm !
+		 << std::setw(6) << std::setprecision(6) << ths  <<" " 
+		 << std::setw(6) << std::setprecision(6) << thz  <<" " 
+		 << std::setw(6) << std::setprecision(6) << tht  <<" "
+		 << ALineId);
+
+  }
+  //std::cout<<std::endl;
+}
+
+void MuonAlignmentCondAlg::dumpBLines(const std::string& folderName,
+				    BLineMapContainer* writeBLineCdo)
+{
+
+  ATH_MSG_INFO( "dumping B-lines for folder " << folderName);
+  ATH_MSG_INFO( "B type jff jzz job bs       bp        bn        sp        sn        tw        pg        tr        eg        ep        en        ID");
+  
+  for (auto bline : *writeBLineCdo) {
+    Identifier BLineId = bline.first;
+    BLinePar* BLine = bline.second;
+    std::string stationType;
+    int jff,jzz,job;
+    BLine->getAmdbId(stationType,jff,jzz,job);
+    float bs,bp,bn,sp,sn,tw,pg,tr,eg,ep,en;
+    BLine->getParameters(bs,bp,bn,sp,sn,tw,pg,tr,eg,ep,en);
+    
+    ATH_MSG_INFO( "B " << std::setiosflags(std::ios::fixed|std::ios::right)
+		  << std::setw(4) << stationType  <<" " 
+		  << std::setw(2) << jff  <<" " 
+		  << std::setw(2) << jzz  <<" " 
+		  << std::setw(2) << job  <<"  "
+		  << std::setw(6) << std::setprecision(6) <<  bs  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  bp  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  bn  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  sp  <<" " 
+		  << std::setw(6) << std::setprecision(6) <<  sn  <<" " 
+		  << std::setw(6) << std::setprecision(6) <<  tw  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  pg  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  tr  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  eg  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  ep  <<" "
+		  << std::setw(6) << std::setprecision(6) <<  en  <<" "
+		  << BLineId);
+  }
+}
+
+void MuonAlignmentCondAlg::dumpILines(const std::string& folderName, 
+				    CscInternalAlignmentMapContainer* writeCdo)
+{
+
+  ATH_MSG_INFO( "dumping I-lines for folder " << folderName);
+  ATH_MSG_INFO( "I \ttype\tjff\tjzz\tjob\tjlay\ttras\ttraz\ttrat\trots\trotz\trott");
+  
+  for (auto iline : *writeCdo) {
+    Identifier ILineId = iline.first;
+    CscInternalAlignmentPar* ILine = iline.second;
+    std::string stationType;
+    int jff,jzz,job,jlay;
+    ILine->getAmdbId(stationType,jff,jzz,job,jlay);
+    float tras,traz,trat,rots,rotz,rott;
+    ILine->getParameters(tras,traz,trat,rots,rotz,rott);
+    
+    ATH_MSG_INFO( "I\t" << std::setiosflags(std::ios::fixed|std::ios::right)
+		  << std::setw(4) << stationType  <<"\t" 
+		  << std::setw(2) << jff  <<"\t" 
+		  << std::setw(2) << jzz  <<"\t" 
+		  << std::setw(2) << job  <<"\t"
+		  << std::setw(2) << jlay  <<"\t"
+		  << std::setw(6) << std::setprecision(6) <<  tras  <<"\t"
+		  << std::setw(6) << std::setprecision(6) <<  traz  <<"\t"
+		  << std::setw(6) << std::setprecision(6) <<  trat  <<"\t"
+		  << std::setw(6) << std::setprecision(6) <<  rots  <<"\t" 
+		  << std::setw(6) << std::setprecision(6) <<  rotz  <<"\t" 
+		  << std::setw(6) << std::setprecision(6) <<  rott  <<"\t"
+		  << ILineId);
+  }
+  //std::cout<<std::endl;
+}
+
+void MuonAlignmentCondAlg::setALinesFromAscii(ALineMapContainer* writeALineCdo) const
+{
+
+  ATH_MSG_INFO( " Set alignment constants from text file " << m_aLinesFile);
+
+  std::ifstream infile;
+  infile.open(m_aLinesFile.c_str());
+  
+  char line[512] ;
+  ATH_MSG_DEBUG( "reading file");
+  
+  while( infile.getline(line,512) ) {
+    
+    std::istringstream is(line) ;
+    
+    char AlineMarker[2];
+    std::string name; int jff,jzz,obj;
+    float tras,traz,trat,rots,rotz,rott;
+    if (is >> AlineMarker >> name >> jff >> jzz >> obj
+	>> tras >> traz >> trat >> rots >> rotz >> rott) {
+      ATH_MSG_DEBUG( "SUCCESSFULY read line: " << line);
+    } else {
+      ATH_MSG_ERROR( "ERROR reading line: " << line);
+    }
+    
+    if( AlineMarker[0] == '\0') {
+      ATH_MSG_DEBUG( "read empty line!"); 
+    }
+    else {
+      
+      // loop through A-line container and find the correct one
+      std::string testStationType;
+      int testJff,testJzz,testJob;
+      ALinePar* ALine(0);
+      for (auto aline : *writeALineCdo) {
+	aline.second->getAmdbId(testStationType,testJff,testJzz,testJob);
+	if (testStationType==name &&
+	    testJff        == jff &&
+	    testJzz        == jzz) {
+	  ALine = aline.second;
+	  break;
+	}
+      }
+
+      // set parameter if you found it
+      if (ALine) 
+	ALine->setParameters(tras,traz,trat,rots,rotz,rott);      
+    }
+  }
+  return;
+}
+
+void MuonAlignmentCondAlg::setAsBuiltFromAscii(MdtAsBuiltMapContainer* writeCdo) const
+{
+  ATH_MSG_INFO (" Set alignment constants from text file "<< m_asBuiltFile);
+
+  std::ifstream fin(m_asBuiltFile.c_str());
+  std::string line;
+  MdtAsBuiltPar xPar;
+  xPar.isNew(true);
+  int count = 0;
+  while(getline(fin, line)) {
+    if (line.find("Corr:")==0) {
+      if (!xPar.setFromAscii(line)) {
+        ATH_MSG_ERROR( "Unable to parse AsBuilt params from Ascii line: " << line  );
+	} else {
+        std::string stName="XXX";
+        int jff = 0;
+        int jzz = 0;
+        int job = 0;
+        xPar.getAmdbId(stName, jff, jzz, job);
+        Identifier id = m_mdtIdHelper->elementID(stName, jzz, jff);
+        if (!id.is_valid()) {
+          ATH_MSG_ERROR( "Invalid MDT identifiers: sta=" << stName << " eta=" << jzz << " phi=" << jff  );
+           continue;
+        }
+        std::map<Identifier,MdtAsBuiltPar*>::iterator ci = writeCdo->begin();
+        if((ci = writeCdo->find(id)) != writeCdo->end())
+        {
+          ATH_MSG_DEBUG( "Updating extisting entry in AsBuilt container for Station " <<stName<<" at Jzz/Jff "<<jzz<<"/"<< jff  );
+          ATH_MSG_DEBUG( "That is strange since it's read from ASCII so this station is listed twice!"  );
+          MdtAsBuiltPar* oldAsBuilt =  (*ci).second;
+          writeCdo->erase(id);
+          delete oldAsBuilt; oldAsBuilt=0;
+        } else {
+          ATH_MSG_DEBUG( "New entry in AsBuilt container for Station "
+                         <<stName<<" at Jzz/Jff "<<jzz<<"/"<< jff<<" --- in the container with key "<< m_mdtIdHelper->show_to_string(id) );
+        }
+	  writeCdo->insert(std::make_pair(id,new MdtAsBuiltPar(xPar)));
+	  ++count;
+	}
+    }
+  }
+  ATH_MSG_INFO( "Parsed AsBuilt parameters: " << count  );
+
+  return;
+}
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx
index c7bc94be9202042ffc586824e5b19754b2666f30..1b5ebb6cfd7279ed2fc962da818d9dffd71f5ee1 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondAlg/src/components/MuonCondAlg_entries.cxx
@@ -3,9 +3,11 @@
 #include "MuonCondAlg/RpcCondDbAlg.h"
 #include "MuonCondAlg/TgcCondDbAlg.h"
 #include "MuonCondAlg/MuonAlignmentErrorDbAlg.h"
+#include "MuonCondAlg/MuonAlignmentCondAlg.h"
 
 DECLARE_COMPONENT( CscCondDbAlg )
 DECLARE_COMPONENT( MdtCondDbAlg )
 DECLARE_COMPONENT( RpcCondDbAlg )
 DECLARE_COMPONENT( TgcCondDbAlg )
 DECLARE_COMPONENT( MuonAlignmentErrorDbAlg )
+DECLARE_COMPONENT( MuonAlignmentCondAlg )
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMDT_DCSConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMDT_DCSConditionsTool.h
index ecb6817a3a602cb186867760dbfc87d84b486d5f..92dadd9e5981353c24cd90f5a3387157805c31d0 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMDT_DCSConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMDT_DCSConditionsTool.h
@@ -9,6 +9,7 @@
 #include "GaudiKernel/IAlgTool.h"
 #include "AthenaKernel/IOVSvcDefs.h"
 #include "AthenaKernel/IAddressProvider.h"
+#include "Identifier/Identifier.h"
 
 //**********************************************************
 //* Author Monica Verducci monica.verducci@cern.ch
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMuonAlignmentDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMuonAlignmentDbTool.h
deleted file mode 100644
index c22a843c1ec36aee3e87df0e96ad8d05ad28b71d..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IMuonAlignmentDbTool.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MUONCONDINTERFACE_IMUONALIGNMENTDBTOOL_H 
-#define MUONCONDINTERFACE_IMUONALIGNMENTDBTOOL_H 
- 
-// Includes for Gaudi
-#include "GaudiKernel/IAlgTool.h"
-#include "AthenaKernel/IOVSvcDefs.h"
-#include "AthenaKernel/IAddressProvider.h"
-// typedefs for A/BLineMapContainer
-#include "MuonAlignmentData/CorrContainer.h"
- 
-class MdtIdHelper;
- 
-//namespace MuonCalib 
-// {
-static const InterfaceID IID_IMuonAlignmentDbTool("IMuonAlignmentDbTool", 1, 0);
-
-class IMuonAlignmentDbTool: virtual public IAlgTool, 
-                            virtual public IAddressProvider {
-   
- public:
-
-   static const InterfaceID& interfaceID() {return IID_IMuonAlignmentDbTool;};
-
-   virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS) = 0;
-   virtual StatusCode loadAlignALine(IOVSVC_CALLBACK_ARGS) = 0;
-   virtual StatusCode loadAlignBLine(IOVSVC_CALLBACK_ARGS) = 0;
-
-   virtual std::string aLineFolderName() const = 0;
-   virtual std::vector<std::string> abLineFolderNames() const = 0;
-   virtual std::string bLineFolderName() const = 0;
-   virtual const ALineMapContainer* ALineContainer() const = 0;
-   virtual const BLineMapContainer* BLineContainer() const = 0;
-   virtual const CscInternalAlignmentMapContainer* ILineContainer() const = 0;
-   virtual const MdtAsBuiltMapContainer* AsBuiltContainer() const = 0;
-   
-   virtual std::string aLineDataLocation() = 0;
-   virtual std::string bLineDataLocation() = 0; 
-};
-
-//}
-
-
-#endif  
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonAlignmentDbSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonAlignmentDbSvc.h
deleted file mode 100755
index 212cbe6cf6bd4d3059f564dfbbf8277a726c06b7..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/MuonAlignmentDbSvc.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MUONCONDSVC_MUONALIGNMENTDBSVC_H
-#define MUONCONDSVC_MUONALIGNMENTDBSVC_H
-
-
-#include "StoreGate/StoreGateSvc.h"
-#include "StoreGate/DataHandle.h"
-#include "GaudiKernel/Service.h"
-#include "AthenaBaseComps/AthService.h"
-#include "GaudiKernel/IInterface.h"
-
-#include "MuonCondInterface/IMuonAlignmentDbTool.h"
-
-
-class IIOVSvc;
-namespace MuonCalib 
-{  
-const InterfaceID InterfaceID_IMuonAlignmentDbSvc("MuonAlignmentDbSvc", 1, 0);
-class IMuonAlignmentDBTool;
-
-
-class MuonAlignmentDbSvc : public AthService, virtual public IInterface {
-  friend class SvcFactory<MuonAlignmentDbSvc>; 
- public:
-   MuonAlignmentDbSvc (const std::string& name, ISvcLocator* pSvcLocator);
-
-  
-  
-  static const InterfaceID& interfaceID() { return InterfaceID_IMuonAlignmentDbSvc; }
-  virtual StatusCode queryInterface(const InterfaceID& riid,void** ppvIF);
-  
-  
- public:
-  
-  virtual StatusCode initialize(void);
-
-  virtual StatusCode finalize(void);
-
- private:
-  
-  
-
-   /** Tool handling the DB access */
-   IMuonAlignmentDbTool * m_dbTool;
-
- std::string         m_alineDataLocation;
- std::string         m_blineDataLocation;
- 
- std::string         m_dbToolType;
- std::string         m_dbToolName;
-
- 
-};
-}
-#endif
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/share/MuonAlignmentDbSvc_jobOptions.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/share/MuonAlignmentDbSvc_jobOptions.py
deleted file mode 100755
index 85987f7a50d3fb45e4c079d3b8e5d80dd079217c..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/share/MuonAlignmentDbSvc_jobOptions.py
+++ /dev/null
@@ -1,20 +0,0 @@
-theApp.Dlls += ["MuonCondSvc"]
-
-#
-
-theApp.CreateSvc += [ "MuonCalib::MuonAlignmentDbSvc" ]
-
-#theApp.ExtSvc += [ "MuonAlignmentDbSvc" ]
-MuonAlignmentDbSvc = Service( "MuonCalib::MuonAlignmentDbSvc" )
-MuonAlignmentDbSvc.OutputLevel=VERBOSE
-
-
-
-MuonAlignmentDbSvc.DBToolType="MuonCalib::MuonAlignmentDbTool"
-MuonAlignmentDbSvc.DBToolName="MuonCalib_MuonAlignmentDbTool"
-
-include("MuonCondTool/MuonAlignmentDbTool.py")
-
-MuonCalib_MuonAlignmentDbTool = Service( "ToolSvc.MuonCalib_MuonAlignmentDbTool" )
-MuonCalib_MuonAlignmentDbTool.OutputLevel=VERBOSE
-MuonCalib_MuonAlignmentDbTool.ParlineFolder="/MDT/COOL2.0/BARREL/ALIGN"
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/MuonAlignmentDbSvc.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/MuonAlignmentDbSvc.cxx
deleted file mode 100755
index c4cea0782165aefc3255ef539129d5025d274483..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/MuonAlignmentDbSvc.cxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "MuonCondInterface/IMuonAlignmentDbTool.h"
-#include "MuonCondSvc/MuonAlignmentDbSvc.h"
-
-namespace MuonCalib 
-{  
-MuonAlignmentDbSvc::MuonAlignmentDbSvc(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthService(name, pSvcLocator),
-  m_dbTool(0)
-{
-
-
-     m_dbToolType = "MuonCalib::MuonAlignmentDbTool";
-     m_dbToolName = "MuonCalib_MuonAlignmentDbTool";
-
-                   
-  
-  declareProperty("DBToolType", m_dbToolType);
-  declareProperty("DBToolName", m_dbToolName);
-  
-  m_alineDataLocation="ALineKey"; 
-  m_blineDataLocation="BLineKey"; 
-                                 
-}
-
-
-  ///
-StatusCode MuonAlignmentDbSvc::queryInterface(const InterfaceID& riid, void** ppvIF) 
-{ 
-  if(InterfaceID_IMuonAlignmentDbSvc.versionMatch(riid) ) 
-    { 
-      *ppvIF = (MuonAlignmentDbSvc*)this; 
-    } else { 
-      return AthService::queryInterface(riid, ppvIF); 
-    }
-  return StatusCode::SUCCESS;
-} 
-
-  ///
-StatusCode MuonAlignmentDbSvc::initialize(){
-
-  MsgStream log(msgSvc(), name());
-  StatusCode sc ;
-
-  log << MSG::INFO << "in initialize()" << endmsg;
-
-
-  IToolSvc* p_toolSvc;
-  sc = service("ToolSvc", p_toolSvc);
-
-  log << MSG::INFO<<"Trying to locate the Tool"<<endmsg;
-  sc = p_toolSvc->retrieveTool(m_dbToolType, m_dbToolName, m_dbTool);
-    if (sc.isFailure()) {
-      log << MSG::FATAL << "Could not find tool " << m_dbToolName << ". Exiting."
-	  << endmsg;
-      return sc;
-    } else {
-      log << MSG::INFO << "Database tool \"" << m_dbToolName << "\" retrieved."
-	  << endmsg;
-    }
-
-
-  return StatusCode::SUCCESS;
-
-}
-
-
-StatusCode MuonAlignmentDbSvc::finalize() {
-   MsgStream log(msgSvc(), name());
-   log << MSG::DEBUG << "in finalize()" << endmsg;
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-}
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/components/MuonCondSvc_entries.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/components/MuonCondSvc_entries.cxx
index 2c6402fedf8086da0ec8f99b6b564d6965e03a7c..f4ef19082402082dcdbd39cff2d17f9eba800cce 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/components/MuonCondSvc_entries.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/components/MuonCondSvc_entries.cxx
@@ -1,6 +1,3 @@
-#include "MuonCondSvc/MuonAlignmentDbSvc.h"
-//#include "MuonCondSvc/MuonDetectorStatusDbSvc.h"
-
 #include "../CscCoolStrSvc.h"
 #include "MuonCondSvc/MdtCoolStrSvc.h"
 #include "MuonCondSvc/RpcCoolStrSvc.h"
@@ -23,7 +20,6 @@
 
 using namespace MuonCalib;
 
-DECLARE_COMPONENT( MuonAlignmentDbSvc )
 DECLARE_COMPONENT( TGCTriggerDbAlg )
 DECLARE_COMPONENT( RpcStatusDbSvc )
 DECLARE_COMPONENT( CscCoolStrSvc )
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt
index 6c97e1ac2525565299d81539de2ead1ac81bbad3..ed580cf9f910e9b26d71cab25c4a9c181624793a 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/CMakeLists.txt
@@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
                           MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface
                           MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc
+			  MuonSpectrometer/​MuonDetDescr/MuonReadoutGeometry
                           TestPolicy
                           PRIVATE
                           DetectorDescription/Identifier )
@@ -22,7 +23,7 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 atlas_add_component( MuonCondTest
                      src/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MuonCondInterface MuonCondSvcLib Identifier )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MuonCondInterface MuonCondSvcLib MuonReadoutGeometry Identifier )
 
 # Install files from the package:
 atlas_install_headers( MuonCondTest )
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/AlignCondAthTest.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/AlignCondAthTest.h
index 99b3f06a32f1ba0e5c828a74d37a6fca79f36097..b4d7cf51143146d3ba6d3771f83c27f40b6beaf0 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/AlignCondAthTest.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/MuonCondTest/AlignCondAthTest.h
@@ -9,7 +9,6 @@
 
 #include "GaudiKernel/Algorithm.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "MuonCondSvc/MuonAlignmentDbSvc.h"
 /////////////////////////////////////////////////////////////////////////////
 
 class AlignCondAthTest:public AthAlgorithm {
@@ -26,7 +25,6 @@ public:
 private:
 ///////////////////////////////////
 
-   MuonCalib::MuonAlignmentDbSvc* p_MuonAlignmentDbSvc; 
 };
 
 #endif
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/AlignCondAthTest.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/AlignCondAthTest.cxx
index 531f53250a5e7a82a836edee0909b7c1bf2d2dda..97b4c546ae5b3df0874d8c4c4b1cc6134467d839 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/AlignCondAthTest.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/src/AlignCondAthTest.cxx
@@ -5,20 +5,15 @@
 
 /////////////////////////////////////////////////////////
 #include "MuonCondTest/AlignCondAthTest.h"
-#include "MuonCondSvc/MuonAlignmentDbSvc.h"
-
 
 AlignCondAthTest::AlignCondAthTest(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator){
-   p_MuonAlignmentDbSvc              = 0; 
-
 }
  
 StatusCode AlignCondAthTest::initialize(){
 //
 
   ATH_MSG_INFO( "in initialize()"  );
-  ATH_CHECK( service("MuonCalib::MuonAlignmentDbSvc",p_MuonAlignmentDbSvc ) );
   return StatusCode::SUCCESS;
 //
 }
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h
index a84f19fac39c3cde95d9bee2e319dc146b7a42a2..a5f990787b920cc35e65c3859bdd39d5434c9cd5 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h
@@ -16,7 +16,7 @@
 
 class Identifier;
 
-class MdtHelper;
+class MdtIdHelper;
 class IIOVSvc;
 class StatusCode;
 class IMDT_MapConversion;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h
index 1558115e3da03448d703489e8951bd83549b8eb6..b5909eea9f90747b99591ee346f571e04022b091 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h
@@ -16,7 +16,7 @@
 
 class Identifier;
 
-class MdtHelper;
+class MdtIdHelper;
 class IIOVSvc;
 class StatusCode;
 class IMDT_MapConversion;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h
deleted file mode 100644
index 0e9dbd01f32962fa30a3e1edd7cdbc6f41ae73aa..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MUONCONDTOOL_MUONALIGNMENTDBTOOL_H
-#define MUONCONDTOOL_MUONALIGNMENTDBTOOL_H
-
-#include "GaudiKernel/AlgTool.h"
-#include "MuonCondInterface/IMuonAlignmentDbTool.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-class IIOVSvc;
-class StatusCode;
-
-class MuonAlignmentDbTool: public AthAlgTool, public IMuonAlignmentDbTool
-{
-
-public:    
-
-  MuonAlignmentDbTool(const std::string& type, 
-		const std::string& name, 
-		const IInterface* parent); 
-
-  /** required by the IAddressProvider interface */
-  //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID,
-                                   SG::TransientAddress* tad,
-                                   const EventContext& ctx);
-  
-  inline std::string aLineFolderName() const;
-  inline std::string bLineFolderName() const;
-  inline std::string iLineFolderName() const;
-  inline std::string asBuiltFolderName() const;
-  std::vector<std::string> abLineFolderNames() const;
-  inline const ALineMapContainer* ALineContainer() const;
-  inline const BLineMapContainer* BLineContainer() const;
-  inline const CscInternalAlignmentMapContainer* ILineContainer() const;
-  inline const MdtAsBuiltMapContainer* AsBuiltContainer() const;
-
-  std::string aLineDataLocation() { return m_alineDataLocation; }
-  std::string bLineDataLocation() { return m_blineDataLocation; }
-  std::string iLineDataLocation() { return m_ilineDataLocation; }
-  std::string asBuiltDataLocation() { return m_asbuiltDataLocation; }
-  std::vector<std::string> parlineFolder() { return m_parlineFolder; }
-    
-  virtual StatusCode initialize();
-  virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS);
-  virtual StatusCode loadAlignALine(IOVSVC_CALLBACK_ARGS);
-  virtual StatusCode loadAlignBLine(IOVSVC_CALLBACK_ARGS);
-  virtual StatusCode loadAlignILine(IOVSVC_CALLBACK_ARGS);
-  virtual StatusCode loadAlignAsBuilt(IOVSVC_CALLBACK_ARGS);
-
-private: 
- 
-  StatusCode loadAlignABLines(std::string folderName);
-  StatusCode loadAlignILines(std::string folderName);
-  StatusCode loadAlignAsBuilt(std::string folderName);
-  int stationPhiTGC(std::string stName, int fi, int zi_input) const;
- 
-  void setALinesFromAscii() const;
-  void setAsBuiltFromAscii() const;
-  void dumpALines(const std::string& folderName);
-  void dumpBLines(const std::string& folderName);
-  void dumpILines(const std::string& folderName);
-  void dumpAsBuilt(const std::string& folderName);
-  long int getLastIOVforThisFolder(std::string& folderName);
-  void setLastIOVforThisFolder(std::string& folderName, long int iov);
-    
-  IIOVSvc* m_IOVSvc;
-  ToolHandle<Muon::MuonIdHelperTool> m_idHelperTool;
-
-  std::string m_geometryVersion;    
-    
-  mutable ALineMapContainer * m_alineData;
-  mutable BLineMapContainer * m_blineData;
-  mutable CscInternalAlignmentMapContainer * m_ilineData;
-  mutable MdtAsBuiltMapContainer * m_asbuiltData;
-
-  std::string      m_alineDataLocation;
-  std::string      m_blineDataLocation;
-  std::string      m_ilineDataLocation;
-  std::string      m_asbuiltDataLocation;
-  std::vector<std::string>       m_parlineFolder;
-  std::map<std::string,long int> m_lastIOVread; // map of last IOV read per folder (key is the folder name)
- 
-  bool m_dumpALines;
-  bool m_dumpBLines;
-  bool m_dumpILines;
-  bool m_dumpAsBuilt;
-  bool m_ILinesFromDb;
-  
-  std::string m_aLinesFile;
-  std::string m_asBuiltFile;
-
-  MsgStream m_log;
-  bool      m_debug;
-  bool      m_verbose;
-
-};
- 
-#endif
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx
deleted file mode 100644
index eff4ac38ee33328d0884449eac31c6f6a558e393..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx
+++ /dev/null
@@ -1,1468 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "GaudiKernel/MsgStream.h"
-
-#include "SGTools/TransientAddress.h"
-#include "CoralBase/Attribute.h"
-#include "CoralBase/AttributeListSpecification.h"
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "MuonReadoutGeometry/GlobalUtilities.h"
-
-#include "PathResolver/PathResolver.h"
-#include <fstream>
-#include <string>
-
-#include "MuonAlignmentData/ALinePar.h"
-#include "MuonAlignmentData/BLinePar.h"
-#include "MuonAlignmentData/CscInternalAlignmentPar.h"
-#include "MuonAlignmentData/MdtAsBuiltPar.h"
-#include "MuonAlignmentData/CorrContainer.h"
-
-#include "MuonCondTool/MuonAlignmentDbTool.h" 
-#include "MuonCondInterface/IMuonAlignmentDbTool.h"
-#include "MuonCondSvc/MdtStringUtils.h"
-
-#include <map>
-
-//namespace MuonCalib 
-//{      
-
-MuonAlignmentDbTool::MuonAlignmentDbTool (const std::string& type,
-                             const std::string& name,
-                             const IInterface* parent)
-  : AthAlgTool(type, name, parent), 
-    m_IOVSvc(0),
-    m_idHelperTool("Muon::MuonIdHelperTool/MuonIdHelperTool"),
-    m_alineData(0),
-    m_blineData(0),
-    m_ilineData(0),
-    m_asbuiltData(0),
-    m_log( msgSvc(), name ),
-    m_debug(false),
-    m_verbose(false)
-{
-
-  declareInterface<IMuonAlignmentDbTool>(this);
-
-  m_alineDataLocation="A_LINE_CORR_updates";
-  m_blineDataLocation="B_LINE_CORR_updates";
-  m_ilineDataLocation="I_LINE_CORR_updates";
-  m_asbuiltDataLocation="ASBUILT_CORR_updates";
-  m_geometryVersion = "";
-
-  m_parlineFolder.clear();
-  m_lastIOVread.clear();
-  declareProperty("ParlineFolders",  m_parlineFolder);
-  declareProperty("DumpALines",      m_dumpALines=false);
-  declareProperty("DumpBLines",      m_dumpBLines=false);
-  declareProperty("DumpILines",      m_dumpILines=false);
-  declareProperty("DumpAsBuilt",     m_dumpAsBuilt=false);
-  declareProperty("ILinesFromCondDB",m_ILinesFromDb=false);
-  declareProperty("ALinesFile",      m_aLinesFile="");
-  declareProperty("AsBuiltFile",     m_asBuiltFile="");
-}
-
-//StatusCode MuonAlignmentDbTool::updateAddress(SG::TransientAddress* tad)
-StatusCode MuonAlignmentDbTool::updateAddress(StoreID::type /*storeID*/,
-                                              SG::TransientAddress* tad,
-                                              const EventContext& /*ctx*/)
-{
-  m_log.setLevel(msgLevel());
-  m_debug = m_log.level() <= MSG::DEBUG;
-  m_verbose = m_log.level() <= MSG::VERBOSE;
-  //   MsgStream log(msgSvc(), name());
-    CLID clid        = tad->clID();
-    std::string key  = tad->name();
-    if ( 1324994866== clid && m_alineDataLocation == key)
-    {
-        if( m_debug )  m_log << MSG::DEBUG << "OK aline" << endmsg;
-        return StatusCode::SUCCESS;
-    }
-    if (1124991377== clid && m_blineDataLocation == key)
-    {
-        if( m_debug )  m_log << MSG::DEBUG << "OK bline" << endmsg;
-        return StatusCode::SUCCESS;
-    }
-    if (1285567354== clid && m_ilineDataLocation == key)
-    {
-        if( m_debug )  m_log << MSG::DEBUG << "OK iline" << endmsg;
-        return StatusCode::SUCCESS;
-    }
-    if (1198729422== clid && m_asbuiltDataLocation == key)
-    {
-        if( m_debug )  m_log << MSG::DEBUG << "OK asbuilt" << endmsg;
-        return StatusCode::SUCCESS;
-    }
-    return StatusCode::FAILURE;
-}
-
-StatusCode MuonAlignmentDbTool::initialize()
-{ 
-  //  MsgStream log(msgSvc(), name());
-  m_log.setLevel(msgLevel());
-  m_debug = m_log.level() <= MSG::DEBUG;
-  m_verbose = m_log.level() <= MSG::VERBOSE;
-
-  m_log<<MSG::INFO<<"Initilalizing"<<endmsg;
-  m_log << MSG::INFO << "In initialize ---- # of folders registered is "<<m_parlineFolder.size()<< endmsg;
-
-  // Get interface to IOVSvc
-  m_IOVSvc = 0;
-  bool CREATEIF(true);
-  StatusCode sc = service( "IOVSvc", m_IOVSvc, CREATEIF );
-  if ( sc.isFailure() )
-  {
-       m_log << MSG::ERROR << "Unable to get the IOVSvc" << endmsg;
-       return StatusCode::FAILURE;
-  }
-
-  if(sc.isFailure()) return StatusCode::FAILURE;
-
-  // *********************************************************************  
-  // B Line for the moment are switched off....
-  //log<<MSG::INFO<<"Call-back for B-lines..... maybe going to register"<<endmsg;
-  //  sc=detStore()->regFcn(&IMuonAlignmentDbTool::loadAlignBLine,
-  //                        dynamic_cast<IMuonAlignmentDbTool*>(this),
-  //                        parlineData, m_parlineFolder);
-  //
-  //log<<MSG::INFO<<"Call-back for B-lines registered"<<endmsg;
-  //
-  //if(sc.isFailure()) return StatusCode::FAILURE;
-  // *********************************************************************  
-  
-  // *********************************************************************  
-  // B Line for the moment are switched off....
-  // detStore()->regFcn(&IMuonAlignmentDbTool::loadAlignBLine,dynamic_cast<IMuonAlignmentDbTool*>(this),&MuonAlignmentDbSvc::loadAlignBLine,dynamic_cast<MuonAlignmentDbSvc*>(dbSvc));
-  //log<<MSG::INFO<<"registered loadAlignBline"<<endmsg;
-  // *********************************************************************  
-
-  m_blineData = new BLineMapContainer();
-  
-  m_alineData = new ALineMapContainer() ;
-
-  m_ilineData = new CscInternalAlignmentMapContainer();
-
-  m_asbuiltData = new MdtAsBuiltMapContainer();
-  if( m_debug )  m_log << MSG::DEBUG<<"MGM_alTool init time: pointer to A-line container =<"<<m_alineData<<"> to B-line container <"<<m_blineData<<"> to I-line container =<"<< m_ilineData << " to AsBuilt container =<" << m_asbuiltData <<endmsg;
-
-  
-  // record the containers in the detector store
-  
-  sc = detStore()->record(m_alineData,m_alineDataLocation);
-  if (sc == StatusCode::FAILURE) {
-    m_log << MSG::ERROR << "Cannot record A Lines container in the detector store"
-	<< endmsg;
-    return sc;
-  }
-  else m_log << MSG::INFO << "A Lines container recorded in the detector store"<<endmsg;
-           
-  sc = detStore()->record(m_blineData,m_blineDataLocation);
-  if (sc == StatusCode::FAILURE) {
-    m_log << MSG::ERROR << "Cannot record B Lines container in the detector store"
-	<< endmsg;
-    return sc;
-  }
-  else m_log << MSG::INFO << "B Lines container recorded in the detector store"<<endmsg;
-  
-  sc = detStore()->record(m_asbuiltData,m_asbuiltDataLocation);
-  if (sc == StatusCode::FAILURE) {
-    m_log << MSG::ERROR << "Cannot record B Lines container in the detector store"
-	<< endmsg;
-    return sc;
-  }
-  else m_log << MSG::INFO << "As-Built container recorded in the detector store"<<endmsg;
-
-  if( m_ILinesFromDb ) sc = detStore()->record(m_ilineData,m_ilineDataLocation);
-  if (sc == StatusCode::FAILURE && m_ILinesFromDb) {
-    m_log << MSG::ERROR << "Cannot not record I-Lines container in the detector store"
-	<< endmsg;
-    return sc;
-  }
-  else m_log << MSG::INFO << "I-Lines container recorded in the detector store or skipped since not needed"<<endmsg;
-
-  // Get the TransientAddress from DetectorStore and set "this" as the
-  // AddressProvider
-  SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<ALineMapContainer>::ID(), m_alineDataLocation);
-  if (!proxy) {
-      m_log << MSG::ERROR << "Unable to get the proxy for class ALineParContainer" << endmsg;
-      return StatusCode::FAILURE;
-  }
-  else m_log << MSG::INFO << "proxy for class ALineParContainer found" << endmsg;
-
-
-
-   IAddressProvider* addp = this;
-   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-   //   tad->setProvider(addp);
-   if( m_debug )  m_log << MSG::DEBUG << "set address provider for ALineParContainer" << endmsg;
-
-                                                                            
-
-   proxy = detStore()->proxy(ClassID_traits<BLineMapContainer>::ID(), m_blineDataLocation);
-   if (!proxy) {
-     m_log << MSG::ERROR << "Unable to get the proxy for class BLineParContainer" << endmsg;
-     return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy for class BLineParContainer found" << endmsg;
-   
-   addp = this;
-   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-   //tad->setProvider(addp);
-   if( m_debug )  m_log << MSG::DEBUG << "set address provider for BLineParContainer" << endmsg;
-
-   proxy = detStore()->proxy(ClassID_traits<CscInternalAlignmentMapContainer>::ID(), m_ilineDataLocation);
-   if (!proxy && m_ILinesFromDb) {
-     m_log << MSG::ERROR << "Unable to get the proxy for class CscInternalAlignmentMapContainer" << endmsg;
-     return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy for class CscInternalAlignmentMapContainer found or not needed" << endmsg;
-   
-   addp = this;
-   if( m_ILinesFromDb ) proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-   //tad->setProvider(addp);
-   if( m_debug )  m_log << MSG::DEBUG << "set address provider for CscInternalAlignmentMapContainer" << endmsg;
-
-
-   proxy = detStore()->proxy(ClassID_traits<MdtAsBuiltMapContainer>::ID(), m_asbuiltDataLocation);
-   if (!proxy) {
-     m_log << MSG::ERROR << "Unable to get the proxy for class MdtAsBuiltParContainer" << endmsg;
-     return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy for class MdtAsBuiltParContainer found" << endmsg;
-   
-   addp = this;
-   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-   //tad->setProvider(addp);
-   if( m_debug )  m_log << MSG::DEBUG << "set address provider for MdtAsBuiltParContainer" << endmsg;
-
-  return sc;
- 
-}
-
-
-StatusCode MuonAlignmentDbTool::loadParameters(IOVSVC_CALLBACK_ARGS_P(I,keys))
-{
-  StatusCode sc = StatusCode::SUCCESS;
-  //MsgStream log(msgSvc(), name());
-  m_log << MSG::INFO << "entering loadParameters" << endmsg;
-
-  if (m_geometryVersion == "")
-  {
-      const MuonGM::MuonDetectorManager* muonMgr;
-      if (StatusCode::SUCCESS != detStore()->retrieve(muonMgr))
-      {
-          m_log << MSG::WARNING << "Failed to retrieve the MuonDetectorManager - will assume geometry version R.03.03" << endmsg;
-          m_geometryVersion = "R.03.03";
-      }
-      else {
-          m_geometryVersion = muonMgr->geometryVersion();
-          m_log << MSG::INFO << "geometry version from the MuonDetectorManager = "<<m_geometryVersion<< endmsg;
-      }
-  }
-  else m_log << MSG::INFO << "geometry version already know (from the MuonDetectorManager) = "<<m_geometryVersion<< endmsg;
-  
-  CHECK( m_idHelperTool.retrieve() );
-
-  // reinitialize
-  // retreive and remove the old collection 
-  sc = detStore()->retrieve( m_alineData, m_alineDataLocation );
-  if(sc.isSuccess())  {
-      m_log << MSG::INFO << "Previous A-line Container found in the DetStore <" << m_alineData <<">"<< endmsg;
-      sc = detStore()->remove( m_alineData );
-      if(sc.isSuccess()) {
-	m_log << MSG::INFO << "A-line Container at <" << m_alineData << "> removed "<<endmsg;
-      }
-      else m_log << MSG::INFO << "  I tried to remove an A-line - but then I remembered I don't know where they go. So it failed "
-	       << endmsg;
-  }
-  else {
-    if (m_alineData) {
-        m_log << MSG::INFO << "Previous A-line Container not in the DetStore but pointer not NULL <" << m_alineData <<">"<< endmsg;
-        delete m_alineData;
-    }
-  }
-  m_alineData=0;
-  
-  sc = detStore()->retrieve( m_blineData, m_blineDataLocation );
-  if(sc.isSuccess())  {
-      m_log << MSG::INFO << "Previous B-line Container found in the DetStore <" << m_blineData <<">"<< endmsg;
-      sc = detStore()->remove( m_blineData );
-      if(sc.isSuccess()) {
-	m_log << MSG::INFO << "B-line Container at <" << m_blineData << "> removed "<<endmsg;
-      }
-      else m_log << MSG::INFO << " wow - what is a b line , I wish I knew because then I could have removed it "<<endmsg;
-  }
-  else {
-    if (m_blineData) {
-        m_log << MSG::INFO << "Previous B-line Container not in the DetStore but pointer not NULL <" << m_blineData <<">"<< endmsg;
-        delete m_blineData;
-    }	
-  }
-  m_blineData=0;
-
-  if (&(m_idHelperTool->cscIdHelper())) { // only retrieve I-lines when CSCs are used
-    sc = detStore()->retrieve( m_ilineData, m_ilineDataLocation );
-    if(sc.isSuccess())  {
-      m_log << MSG::INFO << "Previous I-line Container found in the DetStore <" << m_ilineData <<">"<< endmsg;
-      if( m_ILinesFromDb ) {
-        sc = detStore()->remove( m_ilineData );
-        if(sc.isSuccess()) {
-	  m_log << MSG::INFO << "I-line Container at <" << m_ilineData << "> removed "<<endmsg;
-        }
-        else m_log << MSG::INFO << " wow - what is a i line , I wish I knew because then I could have removed it "<<endmsg;
-      }
-      else m_log << MSG::INFO << "Previous I-line Container kept in DetStore since reading from DB disabled"<<endmsg;
-    }
-  } else {
-    if (m_ilineData) {
-        m_log << MSG::INFO << "Previous I-line Container not in the DetStore but pointer not NULL <" << m_ilineData <<">"<< endmsg;
-        delete m_ilineData;
-    }	
-    if (!m_ILinesFromDb) sc = StatusCode::SUCCESS;
-  }
-  m_ilineData=0;
-
-  sc = detStore()->retrieve( m_asbuiltData, m_asbuiltDataLocation );
-  if(sc.isSuccess())  {
-      m_log << MSG::INFO << "Previous As-Built Container found in the DetStore <" << m_asbuiltData <<">"<< endmsg;
-      sc = detStore()->remove( m_asbuiltData );
-      if(sc.isSuccess()) {
-	m_log << MSG::INFO << "As-Built Container at <" << m_asbuiltData << "> removed "<<endmsg;
-      }
-      else m_log << MSG::INFO << " wow - what is as built , I wish I knew because then I could have removed it "<<endmsg;
-  }
-  else {
-    if (m_blineData) {
-        m_log << MSG::INFO << "Previous As-Built Container not in the DetStore but pointer not NULL <" << m_asbuiltData <<">"<< endmsg;
-        delete m_asbuiltData;
-    }	
-  }
-  m_asbuiltData=0;
-  
-  m_alineData = new ALineMapContainer() ;
-  m_log << MSG::INFO<<"New ALineMapContainer pointer "<<(uintptr_t)m_alineData<<endmsg;
-  m_blineData = new BLineMapContainer() ;
-  m_log << MSG::INFO<<"New BLineMapContainer pointer "<<(uintptr_t)m_blineData<<endmsg;
-  m_ilineData = new CscInternalAlignmentMapContainer() ;
-  m_log << MSG::INFO<<"New CscInternalAlignmentMapContainer pointer "<<(uintptr_t)m_ilineData<<endmsg;
-  m_asbuiltData = new MdtAsBuiltMapContainer() ;
-  m_log << MSG::INFO<<"New AsBuiltMapContainer pointer "<<(uintptr_t)m_asbuiltData<<endmsg;
-
-  if (keys.empty()) 
-  {
-      m_log << MSG::INFO << "LoadParameters triggered without IoV keys " << endmsg;
-      m_log << MSG::INFO << "# of folders registered is "<<m_parlineFolder.size()<< endmsg;
-      int ifc=0;
-      int nLoadedFolders = 0;
-      for (std::vector<std::string>::const_iterator itf=m_parlineFolder.begin();
-           itf!=m_parlineFolder.end(); ++itf )
-      {
-          ifc++;
-          std::string currentFolderName = *itf;
-          m_log << MSG::INFO <<"Current Folder Name (*itf)="<<currentFolderName<<" at index "<<ifc<<endmsg;
-	  if( m_debug ) m_log << MSG::DEBUG <<"Before reading ALineMapContainer pointer "<<(uintptr_t)m_alineData<<endmsg;
-          if(currentFolderName.find("ILINES") != std::string::npos ) {
-            if( m_ILinesFromDb ) sc = loadAlignILines(*itf);
-            else {
-              m_log << MSG::INFO << "DB folder for I-Lines given in job options however loading disabled " << endmsg;
-              sc = StatusCode::SUCCESS;
-              nLoadedFolders--;
-            }
-          }
-          else if(currentFolderName.find("ASBUILTPARAMS") != std::string::npos) sc = loadAlignAsBuilt(*itf);
-          else sc = loadAlignABLines(*itf);
-          if (sc == StatusCode::RECOVERABLE)
-              m_log << MSG::WARNING
-                  << "loadAlignABLines couldn't find folder "<<currentFolderName<<endmsg;
-	  else if (sc != StatusCode::SUCCESS)
-              m_log << MSG::WARNING
-                  << "Something wrong in loadAlignALine for folder "<<currentFolderName<<endmsg;
-	  else nLoadedFolders++;
-      }
-      m_log << MSG::INFO << "# of folders found and loaded is "<<nLoadedFolders<< endmsg;
-      if( m_debug ) m_log << MSG::DEBUG <<"end of loop over folders ---- ALineMapContainer pointer "<<(uintptr_t)m_alineData<<endmsg;
-  }
-  else
-  {
-      m_log << MSG::INFO << "LoadParameters has been triggered for the following keys " << endmsg;
-      std::list<std::string>::const_iterator itr;
-      for (itr=keys.begin(); itr!=keys.end(); ++itr)
-      {
-          m_log << MSG::INFO <<"key "<< *itr <<" at index I= "<<I<<endmsg;
-      }
-      for (itr=keys.begin(); itr!=keys.end(); ++itr)
-      {
-          m_log << MSG::INFO <<"Current key "<< *itr <<" at index I= "<<I<<endmsg;
-          int ifc=0;
-          for (std::vector<std::string>::const_iterator itf=m_parlineFolder.begin();
-               itf!=m_parlineFolder.end(); ++itf )
-          {
-              ifc++;
-              std::string currentFolderName = *itf;
-              m_log << MSG::VERBOSE <<"Current Folder Name (*itf)="<<currentFolderName<<" at index "<<ifc<<endmsg;
-              if(*itr==*itf) {
-                  m_log << MSG::INFO <<"Matching Folder Name "<<currentFolderName<<endmsg;
-                  if(currentFolderName.find("ILINES") != std::string::npos) {
-                    if( m_ILinesFromDb ) sc = loadAlignILines(*itf);
-                    else { 
-                      m_log << MSG::INFO << "DB folder for I-Lines given in job options however loading disabled " << endmsg;
-                      sc = StatusCode::SUCCESS;
-                    }
-                  }
-                  else if(currentFolderName.find("ASBUILTPARAMS") != std::string::npos) sc = loadAlignAsBuilt(*itf);
-                  else sc = loadAlignABLines(*itf);
-                  if (sc != StatusCode::SUCCESS)
-                      m_log << MSG::INFO
-                          << "Something wrong in loadAlignABLines: " << *itr << endmsg;
-              }
-          }
-      }
-  }
-  
-  // finally record ABLineContainer
-  if ((detStore()->record( m_alineData, m_alineDataLocation )).isFailure()) return StatusCode::FAILURE;
-  m_log << MSG::INFO<<"New A-line container recoded in the DetStore with key "<<m_alineDataLocation<<endmsg;
-  if ((detStore()->record( m_blineData, m_blineDataLocation )).isFailure()) return StatusCode::FAILURE;
-  m_log << MSG::INFO<<"New B-line container recoded in the DetStore with key "<<m_blineDataLocation<<endmsg;
-  if( m_ILinesFromDb ) {
-    if ((detStore()->record( m_ilineData, m_ilineDataLocation )).isFailure()) return StatusCode::FAILURE;
-    m_log << MSG::INFO<<"New I-line container recoded in the DetStore with key "<<m_ilineDataLocation<<endmsg;
-  }
-  else m_log << MSG::INFO<<"I-line not recorded from this tool since functionality disabled."<<endmsg;
-  if ((detStore()->record( m_asbuiltData, m_asbuiltDataLocation )).isFailure()) return StatusCode::FAILURE;
-  m_log << MSG::INFO<<"New As-built container recoded in the DetStore with key "<<m_asbuiltDataLocation<<endmsg;
-  
-  m_log << MSG::INFO <<"LoadParameters done !"<< endmsg;
-  
-  return sc;
-    
-}
-
-StatusCode MuonAlignmentDbTool::loadAlignALine(IOVSVC_CALLBACK_ARGS_P(/*I*/,/*keys*/))
-{return StatusCode::SUCCESS;}
-StatusCode MuonAlignmentDbTool::loadAlignBLine(IOVSVC_CALLBACK_ARGS_P(/*I*/,/*keys*/))
-{return StatusCode::SUCCESS;}
-StatusCode MuonAlignmentDbTool::loadAlignILine(IOVSVC_CALLBACK_ARGS_P(/*I*/,/*keys*/))
-{return StatusCode::SUCCESS;}
-StatusCode MuonAlignmentDbTool::loadAlignAsBuilt(IOVSVC_CALLBACK_ARGS_P(/*I*/,/*keys*/))
-{return StatusCode::SUCCESS;}
-
-StatusCode MuonAlignmentDbTool::loadAlignABLines(std::string folderName) 
-{
-
-   MsgStream log(msgSvc(), name());
-   StatusCode sc=StatusCode::SUCCESS;
-   log << MSG::INFO << "Load alignment parameters from DB folder <"<<folderName<<">"<< endmsg;
-   if( m_debug ) log << MSG::DEBUG << " ----- ALineMapContainer pointer "<<(uintptr_t)m_alineData<<endmsg;
-
-   // retreive the collection of strings read out from the DB
-   const CondAttrListCollection * atrc;
-   sc=detStore()->retrieve(atrc,folderName);
-   if(sc.isFailure())  {
-     log << MSG::WARNING 
-         << "could not retreive the CondAttrListCollection from DB folder " 
-         << folderName << endmsg;
-     return StatusCode::RECOVERABLE;
-   }
-   else
-       log<<MSG::INFO<<" CondAttrListCollection from DB folder have been obtained with size "<< atrc->size() <<endmsg;
-   if( m_debug ) log << MSG::DEBUG << " data found ----- ALineMapContainer pointer "<<(uintptr_t)m_alineData<<endmsg;
-
-   bool hasBLine = true;
-   if (folderName.find("TGC")!=std::string::npos)  {
-       hasBLine = false;
-       log << MSG::INFO << "No BLines decoding will be attempted for folder named "<<folderName<<endmsg;
-   }
-   
-   
-
-   // unpack the strings in the collection and update the 
-   // ALlineContainer in TDS
-   int nLines = 0;
-   int nDecodedLines = 0;
-   int nNewDecodedALines = 0;
-   int nNewDecodedBLines = 0;
-   CondAttrListCollection::const_iterator itr;
-   for (itr = atrc->begin(); itr != atrc->end(); ++itr)
-   {
-    const coral::AttributeList& atr=itr->second;
-    std::string data;
-    data=*(static_cast<const std::string*>((atr["data"]).addressOfData()));
-    
-    if( m_debug ) log << MSG::DEBUG << "Data load is " << data << " FINISHED HERE "<<endmsg;
-    
-    // Check the first word to see if it is a correction
-    std::string type;
-    
-    //Parse corrections
-    std::string since_str;
-    std::string till_str;
-    std::string delimiter = "\n";
-      
-    
-      std::vector<std::string> lines;
-      MuonCalib::MdtStringUtils::tokenize(data,lines,delimiter);
-      for (unsigned int i=0; i<lines.size();i++)
-      {
-        ++nLines;
-	//std::cout<<"scanning CLOB --- current line = "<<nLines<<std::endl;
-	//	ALinePar* newALine = new ALinePar();
-	std::string blobline = lines[i];
-	
-	std::string delimiter = ":";
-	std::vector<std::string> tokens;
-	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-	type = tokens[0];
-	//Parse line
-	if (type.find("#")==0) {
-	  //skip it
-	  continue;
-	}
-	//std::cout << type ;
-	if (type.find("Header")==0) {
-	  std::string delimiter = "|";
-	  std::vector<std::string> tokens;
-	  MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-	  since_str = tokens[1];
-	  till_str = tokens[2];
-	  //std::cout << "Since: " << since_str << std::endl;
-	  //std::cout << "Till: " << till_str << std::endl;
-	}
-	
-	if (type.find("IOV")==0) 
-	{
-	    //std::cout<<" trovato IOV"<<std::endl;
-	    std::string delimiter = " ";
-	    std::vector<std::string> tokens;
-	    MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-	    if (m_verbose){
-		for (unsigned int i=0; i<tokens.size(); i++) 
-		{	
-		    log << MSG::VERBOSE <<tokens[i] <<" | ";
-		}
-	    }	    
-	    int ival = 1;
-	    long int iovThisBlob=0;
-	    long int lastIOV = getLastIOVforThisFolder(folderName);
-
-	    std::string str_iovThisBlob = tokens[ival];
-	    sscanf(str_iovThisBlob.c_str(),"%80ld",&iovThisBlob);
-	    log << MSG::INFO <<"Data read from folder "<< folderName
-		  <<" have IoV = "<<iovThisBlob<<" to be compared with latest IOVread for the same folder = "<<lastIOV<<endmsg;
-	    if (iovThisBlob == lastIOV) 
-	    {
-		log << MSG::INFO <<"Call back for  "<< folderName
-		      <<" detected without a real IOV transition: IOV registered in this data "<<iovThisBlob
-		      <<" to be compared with latest IOVread for the same folder = "
-		      <<lastIOV<<endmsg<<"Ignoring this call back for folder "<<folderName<<endmsg;
-		return StatusCode::SUCCESS;
-	    }
-	    log << MSG::INFO <<"Call back for  "<< folderName
-		  <<" detected with a real IOV transition: IOV registered in this data "<<iovThisBlob
-		  <<" to be compared with latest IOVread for the same folder = "
-		  <<lastIOV<<endmsg;
-	    setLastIOVforThisFolder(folderName, iovThisBlob);
-	    
-	}
-	
-	if (type.find("Corr")==0) {
-//#: Corr line is counter typ,  jff,  jzz, job,                         * Chamber information 
-//#:                       svalue,  zvalue, tvalue,  tsv,  tzv,  ttv,   * A lines 
-//#:                       bz, bp, bn, sp, sn, tw, pg, tr, eg, ep, en   * B lines 
-//#:                       chamber                                      * Chamber name 
-//.... example
-//Corr: EMS  4   1  0     2.260     3.461    28.639 -0.002402 -0.002013  0.000482    -0.006    -0.013 -0.006000  0.000000  0.000000     0.026    -0.353  0.000000  0.070000  0.012000    -0.012    EMS1A08
-
-	    //std::cout<<" trovato Corr"<<std::endl;
-	  std::string delimiter = " ";
-	  std::vector<std::string> tokens;
-	  MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-          if( m_verbose ) {
-	      log << MSG::VERBOSE << "Parsing Line = ";
-	      for (unsigned int i=0; i<tokens.size(); i++) log << MSG::VERBOSE <<tokens[i] <<" | ";
-	      log<<endmsg;
-	  }	  
-	  bool thisRowHasBLine = true;
-	  if (tokens.size()<15)
-	    {
-	      // only A-lines ..... old COOL blob convention for barrel 
-	      thisRowHasBLine = false;
-	      if( m_verbose )log << MSG::VERBOSE <<"(old COOL blob convention for barrel) skipping B-line decoding "<<endmsg;
-	    }
-
-	  // Start parsing
-	  int ival=1;
-
-	  // Station Component identification 
-	  int jff; 
-	  int jzz;
-	  int job;
-	  std::string stationType = tokens[ival++];	  
-	  std::string jff_str = tokens[ival++]; 
-	  sscanf(jff_str.c_str(),"%80d",&jff);
-	  std::string jzz_str = tokens[ival++];
-	  sscanf(jzz_str.c_str(),"%80d",&jzz);
-	  std::string job_str = tokens[ival++];
-	  sscanf(job_str.c_str(),"%80d",&job);
-	  
-	  // A-line
-	  float s;
-	  float z;
-	  float t;
-	  float ths;
-	  float thz;
-	  float tht;	  
-	  std::string s_str = tokens[ival++];
-	  sscanf(s_str.c_str(),"%80f",&s);
-	  std::string z_str = tokens[ival++];
-	  sscanf(z_str.c_str(),"%80f",&z);
-	  std::string t_str = tokens[ival++];
-	  sscanf(t_str.c_str(),"%80f",&t);
-	  std::string ths_str = tokens[ival++];
-	  sscanf(ths_str.c_str(),"%80f",&ths);
-	  std::string thz_str = tokens[ival++];
-	  sscanf(thz_str.c_str(),"%80f",&thz);
-	  std::string tht_str = tokens[ival++];
-	  sscanf(tht_str.c_str(),"%80f",&tht);
-
-	  // B-line
-	  float bz, bp, bn, sp, sn, tw, pg, tr, eg, ep, en;
-	  std::string ChamberHwName="";
-	  
-	  if (hasBLine && thisRowHasBLine)
-	  {	      
-	  std::string tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&bz);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&bp);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&bn);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&sp);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&sn);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&tw);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&pg);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&tr);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&eg);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&ep);
-	  tmp_str = tokens[ival++];
-	  sscanf(tmp_str.c_str(),"%80f",&en);	  
-
-	  // ChamberName (hardware convention)
-	  ChamberHwName = tokens[ival++];
-	  }
-	  
-	  if( m_verbose ) log << MSG::VERBOSE <<"Station type "  << stationType <<endmsg;
-	  if( m_verbose ) log << MSG::VERBOSE <<"jff / jzz / job "  <<jff <<" / "<< jzz<<" / "<<job;
-	  if (hasBLine) {
-	    if( m_verbose ) log <<MSG::VERBOSE << " HardwareChamberName "<<ChamberHwName<<endmsg;
-	    else if( m_verbose ) log  <<MSG::VERBOSE <<endmsg;
-	  }
-	  if( m_verbose ) log << MSG::VERBOSE <<"A-line: s,z,t "  << s <<" "<< z <<" "<< t;
-	  if( m_verbose ) log << MSG::VERBOSE <<" ts,tz,tt "  << ths <<" "<< thz <<" "<< tht <<endmsg;
-	  if (hasBLine) {
-	    if (thisRowHasBLine) {
-	      if( m_verbose ) log << MSG::VERBOSE <<"B-line:  bz,bp,bn "<<bz<<" "<<bp<<" "<<bn;
-	      if( m_verbose ) log << MSG::VERBOSE <<" sp,sn "<<sp<<" "<<sn<<" tw,pg,tr "<<tw<<" "<<pg<<" "<<tr
-		  <<" eg,ep,en "  <<eg<<" "<<ep<<" "<<en<<endmsg;
-            }
-	    else if( m_verbose ) log << MSG::VERBOSE <<"No B-line found"<<endmsg; 
-	  }
-	  
-	  int stationName = m_idHelperTool->mdtIdHelper().stationNameIndex(stationType);
-	  Identifier id;
-	  if( m_verbose ) log << MSG::VERBOSE<< "stationName  " << stationName << endmsg;
-	  if (stationType.substr(0,1)=="T") 
-	  {
-	      // tgc case
-	      int stPhi = MuonGM::stationPhiTGC(stationType, jff, jzz, m_geometryVersion);
-	      int stEta = 1;
-	      if (jzz<0) stEta = -1;			 
-	      if (job != 0) {
-		  // this should become the default now 
-		  stEta=job;
-		  if (jzz<0) stEta = -stEta;
-	      }
-	      id = m_idHelperTool->tgcIdHelper().elementID(stationName, stEta, stPhi);
-              if( m_verbose ) log << MSG::VERBOSE<< "identifier being assigned is " <<m_idHelperTool->tgcIdHelper().show_to_string(id)<< endmsg;
-	  }
-	  else if ((&(m_idHelperTool->cscIdHelper())) && (stationType.substr(0,1)=="C"))
-	  {
-	      // csc case
-	      id = m_idHelperTool->cscIdHelper().elementID(stationName, jzz, jff);
-              if( m_verbose ) log << MSG::VERBOSE<< "identifier being assigned is " <<m_idHelperTool->cscIdHelper().show_to_string(id)<< endmsg;
-	  }
-	  else if (stationType.substr(0,3)=="BML" && abs(jzz)==7)
-	  {
-	      // rpc case
-	      id = m_idHelperTool->rpcIdHelper().elementID(stationName, jzz, jff, 1);
-              if( m_verbose ) log << MSG::VERBOSE<< "identifier being assigned is " <<m_idHelperTool->rpcIdHelper().show_to_string(id)<< endmsg;
-	  }
-	  else
-          {
-              id = m_idHelperTool->mdtIdHelper().elementID(stationName, jzz, jff);
-              if( m_verbose ) log << MSG::VERBOSE<< "identifier being assigned is " <<m_idHelperTool->mdtIdHelper().show_to_string(id)<< endmsg;
-	  }
-          
-
-          // new Aline
-          ++nDecodedLines;
-          ++nNewDecodedALines;
-          ALinePar* newALine = new ALinePar();
-	  newALine->setAmdbId(stationType, jff, jzz, job);
-	  newALine->setParameters(s,z,t,ths,thz,tht);
-	  newALine->isNew(true);	  
-	  iALineMap ialine;
-	  if((ialine = m_alineData->find(id)) != m_alineData->end())
-          {
-              log << MSG::WARNING<< "More than one (A-line) entry in folder "<<folderName<<" for  "
-                  << stationType<<" at Jzz/Jff "<<jzz<<"/"<< jff <<" --- keep the latest one"<< endmsg;
-              m_alineData->erase(id);
-              --nNewDecodedALines;
-          }
-	  m_alineData->insert(std::make_pair(id,(ALinePar*)newALine));
-
-          if (hasBLine && thisRowHasBLine)
-	  {
-	      // new Bline
-	      ++nNewDecodedBLines;
-	      BLinePar* newBLine = new BLinePar();
-	      newBLine->setAmdbId(stationType, jff, jzz, job);
-	      newBLine->setParameters(bz, bp, bn, sp, sn, tw, pg, tr, eg, ep, en);
-	      newBLine->isNew(true);
-	      iBLineMap ibline;
-	      if((ibline = m_blineData->find(id)) != m_blineData->end())
-	      {
-		  log << MSG::WARNING<< "More than one (B-line) entry in folder "<<folderName<<" for  "
-		      << stationType<<" at Jzz/Jff "<<jzz<<"/"<< jff <<" --- keep the latest one"<< endmsg;
-		  m_blineData->erase(id);
-		  --nNewDecodedBLines;
-	      }
-	      m_blineData->insert(std::make_pair(id,(BLinePar*)newBLine));
-	  }
-	}
-      }
-   }
-  if( m_debug ) log << MSG::DEBUG<<"In folder <"<<folderName<<"> # lines/decodedLines/newDecodedALines/newDecodedBLines= "
-       <<nLines<<"/"<<nDecodedLines<<"/"<<nNewDecodedALines<<"/"<<nNewDecodedBLines<<endmsg;
-
-   // set A-lines from ASCII file
-   if (m_aLinesFile!="" && (int)m_alineData->size()>0 ) setALinesFromAscii();
-   
-   // dump A-lines to log file
-   if (m_dumpALines && (int)m_alineData->size()>0) dumpALines(folderName);
-   
-   // dump B-lines to log file
-   if (m_dumpBLines && (int)m_blineData->size()>0) dumpBLines(folderName);
-   
-   if ( m_asBuiltFile!="" ) setAsBuiltFromAscii();
-
-   if( m_verbose ) m_log << MSG::VERBOSE << "Collection CondAttrListCollection CLID "
-       << atrc->clID() << endmsg;
-   
-   IOVRange range;
-   if ((m_IOVSvc->getRange(1238547719, folderName, range)).isFailure()) return StatusCode::FAILURE;
-   if( m_debug) log << MSG::DEBUG <<"IOVRange for these data is <"<<range<<">"<<endmsg;
-   
-
-// ss:01/07/2008 not clear if this is needed at all 
-   SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<ALineMapContainer>::ID(), m_alineDataLocation);
-    if (!proxy) {
-      log << MSG::ERROR << "Unable to get the proxy for class ALineParContainer" << endmsg;
-      return StatusCode::FAILURE;
-    }
-    IAddressProvider* addp = this;
-    //    tad->setProvider(addp);
-    proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-    if( m_debug ) log << MSG::DEBUG<< "set address provider for ALineParContainer" << endmsg;
-   
-   return  sc; 
-}
-
-StatusCode MuonAlignmentDbTool::loadAlignILines(std::string folderName) 
-{
-   if (!(&(m_idHelperTool->cscIdHelper()))) return StatusCode::SUCCESS; // only load I lines when CSCs are used
-
-   MsgStream log(msgSvc(), name());
-   StatusCode sc=StatusCode::SUCCESS;
-   log << MSG::INFO << "Load alignment parameters from DB folder <"<<folderName<<">"<< endmsg;
-   if( m_debug ) log << MSG::DEBUG << " ----- ILineMapContainer pointer "<<(uintptr_t)m_ilineData<<endmsg;
-
-   // retreive the collection of strings read out from the DB
-   const CondAttrListCollection * atrc;
-   sc=detStore()->retrieve(atrc,folderName);
-   if(sc.isFailure())  {
-     log << MSG::WARNING 
-         << "could not retreive the CondAttrListCollection from DB folder " 
-         << folderName << endmsg;
-     return StatusCode::RECOVERABLE;
-   }
-   else
-       log<<MSG::INFO<<" CondAttrListCollection from DB folder have been obtained with size "<< atrc->size() <<endmsg;
-   if( m_debug ) log << MSG::DEBUG << " data found ----- ILineMapContainer pointer "<<(uintptr_t)m_ilineData<<endmsg;
-
-   // unpack the strings in the collection and update the 
-   // ALlineContainer in TDS
-   int nLines = 0;
-   int nDecodedLines = 0;
-   int nNewDecodedILines = 0;
-   CondAttrListCollection::const_iterator itr;
-   for (itr = atrc->begin(); itr != atrc->end(); ++itr)
-   {
-    const coral::AttributeList& atr=itr->second;
-    std::string data;
-    data=*(static_cast<const std::string*>((atr["data"]).addressOfData()));
-    
-    if( m_debug ) log << MSG::DEBUG << "Data load is " << data << " FINISHED HERE "<<endmsg;
-    
-    // Check the first word to see if it is a correction
-    std::string type;
-    
-    //Parse corrections
-    std::string since_str;
-    std::string till_str;
-    std::string delimiter = "\n";
-      
-    
-      std::vector<std::string> lines;
-      MuonCalib::MdtStringUtils::tokenize(data,lines,delimiter);
-      for (unsigned int i=0; i<lines.size();i++)
-      {
-        ++nLines;
-	//std::cout<<"scanning CLOB --- current line = "<<nLines<<std::endl;
-	//	CscInternalAlignmentPar* newILine = new CscInternalAlignmentPar();
-	std::string blobline = lines[i];
-	
-	std::string delimiter = ":";
-	std::vector<std::string> tokens;
-	MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-	type = tokens[0];
-	//Parse line
-	if (type.find("#")==0) {
-	  //skip it
-	  continue;
-	}
-	//std::cout << type ;
-	if (type.find("Header")==0) {
-	  std::string delimiter = "|";
-	  std::vector<std::string> tokens;
-	  MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-	  since_str = tokens[1];
-	  till_str = tokens[2];
-	  //std::cout << "Since: " << since_str << std::endl;
-	  //std::cout << "Till: " << till_str << std::endl;
-	}
-	
-	if (type.find("IOV")==0) 
-	{
-	    //std::cout<<" trovato IOV"<<std::endl;
-	    std::string delimiter = " ";
-	    std::vector<std::string> tokens;
-	    MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-	    if (m_verbose){
-		for (unsigned int i=0; i<tokens.size(); i++) 
-		{	
-		    log << MSG::VERBOSE <<tokens[i] <<" | ";
-		}
-	    }	    
-	    int ival = 1;
-	    long int iovThisBlob=0;
-	    long int lastIOV = getLastIOVforThisFolder(folderName);
-
-	    std::string str_iovThisBlob = tokens[ival];
-	    sscanf(str_iovThisBlob.c_str(),"%80ld",&iovThisBlob);
-	    log << MSG::INFO <<"Data read from folder "<< folderName
-		  <<" have IoV = "<<iovThisBlob<<" to be compared with latest IOVread for the same folder = "<<lastIOV<<endmsg;
-	    if (iovThisBlob == lastIOV) 
-	    {
-		log << MSG::INFO <<"Call back for  "<< folderName
-		      <<" detected without a real IOV transition: IOV registered in this data "<<iovThisBlob
-		      <<" to be compared with latest IOVread for the same folder = "
-		      <<lastIOV<<endmsg<<"Ignoring this call back for folder "<<folderName<<endmsg;
-		return StatusCode::SUCCESS;
-	    }
-	    log << MSG::INFO <<"Call back for  "<< folderName
-		  <<" detected with a real IOV transition: IOV registered in this data "<<iovThisBlob
-		  <<" to be compared with latest IOVread for the same folder = "
-		  <<lastIOV<<endmsg;
-	    setLastIOVforThisFolder(folderName, iovThisBlob);
-	    
-	}
-	
-	if (type.find("Corr")==0) {
-        //# Amdb like clob for ilines using geometry tag ISZT-R06-02 
-        //# ISZT_DATA_ID VERS TYP JFF JZZ JOB JLAY TRAS TRAZ TRAT ROTS ROTZ ROTT
-        //
-        //.... example
-        //Corr:  CSL 1 -1 3 1 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
-
-	  std::string delimiter = " ";
-	  std::vector<std::string> tokens;
-	  MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-          if( m_verbose ) {
-	      log << MSG::VERBOSE << "Parsing Line = ";
-	      for (unsigned int i=0; i<tokens.size(); i++) log << MSG::VERBOSE <<tokens[i] <<" | ";
-	      log<<endmsg;
-	  }	  
-
-	  // Start parsing
-	  int ival=1;
-
-	  // Station Component identification 
-	  int jff; 
-	  int jzz;
-	  int job;
-	  int jlay;
-	  std::string stationType = tokens[ival++];	  
-	  std::string jff_str = tokens[ival++]; 
-	  sscanf(jff_str.c_str(),"%80d",&jff);
-	  std::string jzz_str = tokens[ival++];
-	  sscanf(jzz_str.c_str(),"%80d",&jzz);
-	  std::string job_str = tokens[ival++];
-	  sscanf(job_str.c_str(),"%80d",&job);
-          std::string jlay_str = tokens[ival++];
-	  sscanf(jlay_str.c_str(),"%80d",&jlay);
-	  
-	  // I-line
-	  float tras;
-	  float traz;
-	  float trat;
-	  float rots;
-	  float rotz;
-          float rott;	
-	  std::string tras_str = tokens[ival++];
-	  sscanf(tras_str.c_str(),"%80f",&tras);
-	  std::string traz_str = tokens[ival++];
-	  sscanf(traz_str.c_str(),"%80f",&traz);
-	  std::string trat_str = tokens[ival++];
-	  sscanf(trat_str.c_str(),"%80f",&trat);
-	  std::string rots_str = tokens[ival++];
-	  sscanf(rots_str.c_str(),"%80f",&rots);
-	  std::string rotz_str = tokens[ival++];
-	  sscanf(rotz_str.c_str(),"%80f",&rotz);
-	  std::string rott_str = tokens[ival++];
-	  sscanf(rott_str.c_str(),"%80f",&rott);
-
-	  if( m_verbose ) log << MSG::VERBOSE <<"Station type "  << stationType <<endmsg;
-	  if( m_verbose ) log << MSG::VERBOSE <<"jff / jzz / job / jlay "  <<jff <<" / "<< jzz<<" / "<< job<<" / "<<jlay ;
-	  if( m_verbose ) log << MSG::VERBOSE <<"I-line: tras,traz,trat "  << tras <<" "<< traz <<" "<< trat;
-	  if( m_verbose ) log << MSG::VERBOSE <<" rots,rotz,rott "  << rots <<" "<< rotz <<" "<< rott <<endmsg;
-	  
-	  int stationName = m_idHelperTool->cscIdHelper().stationNameIndex(stationType);
-	  Identifier id;
-	  if( m_verbose ) log << MSG::VERBOSE<< "stationName  " << stationName << endmsg;
-	  if (stationType.substr(0,1)=="C") 
-	  {
-              // csc case
-              int chamberLayer = 2;
-              if (job != 3) log<<MSG::WARNING<<"job = "<<job<<" is not 3 => chamberLayer should be 1 - not existing ! setting 2"<<endmsg;
-              id = m_idHelperTool->cscIdHelper().channelID(stationType, jzz, jff, chamberLayer, jlay, 0, 1);
-              if( m_verbose ) log << MSG::VERBOSE<< "identifier being assigned is " <<m_idHelperTool->cscIdHelper().show_to_string(id)<< endmsg;
-	  }
-	  else { 
-              log << MSG::ERROR<< "There is a non CSC chamber in the list of CSC internal alignment parameters."<< endmsg;
-	  }
-
-          // new Iline
-          ++nDecodedLines;
-          ++nNewDecodedILines;
-          CscInternalAlignmentPar* newILine = new CscInternalAlignmentPar();
-	  newILine->setAmdbId(stationType, jff, jzz, job, jlay);
-	  newILine->setParameters(tras,traz,trat,rots,rotz,rott);
-	  newILine->isNew(true);	  
-	  iCscInternalAlignmentMap iiline;
-	  if((iiline = m_ilineData->find(id)) != m_ilineData->end())
-          {
-              log << MSG::WARNING<< "More than one (I-line) entry in folder "<<folderName<<" for  "
-                  << stationType<<" at Jzz/Jff/Jlay "<<jzz<<"/"<< jff<<"/"<< jlay <<" --- keep the latest one"<< endmsg;
-              m_ilineData->erase(id);
-              --nNewDecodedILines;
-          }
-	  m_ilineData->insert(std::make_pair(id,(CscInternalAlignmentPar*)newILine));
-
-	}
-      }
-   }
-  if( m_debug ) log << MSG::DEBUG<<"In folder <"<<folderName<<"> # lines/decodedLines/newDecodedILines= "
-       <<nLines<<"/"<<nDecodedLines<<"/"<<nNewDecodedILines<<"/"<<endmsg;
-
-   // set I-lines from ASCII file TBA
-   // this option is currently coded in MuonGeoModel and should perhaps be migrated here
-   
-   // dump I-lines to log file TBA
-   if (m_dumpILines && (int)m_ilineData->size()>0) dumpILines(folderName);
-   
-   if( m_verbose ) log << MSG::VERBOSE << "Collection CondAttrListCollection CLID "
-       << atrc->clID() << endmsg;
-   
-   IOVRange range;
-   if ((m_IOVSvc->getRange(1238547719, folderName, range)).isFailure()) return StatusCode::FAILURE;
-   if( m_debug) log << MSG::DEBUG <<"IOVRange for these data is <"<<range<<">"<<endmsg;
-   
-
-// ss:01/07/2008 not clear if this is needed at all 
-   SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<CscInternalAlignmentMapContainer>::ID(), m_ilineDataLocation);
-    if (!proxy) {
-      log << MSG::ERROR << "Unable to get the proxy for class ILineParContainer" << endmsg;
-      return StatusCode::FAILURE;
-    }
-    IAddressProvider* addp = this;
-    //    tad->setProvider(addp);
-    proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-    if( m_debug ) log << MSG::DEBUG<< "set address provider for ILineParContainer" << endmsg;
-   
-   return  sc; 
-}
-
-StatusCode MuonAlignmentDbTool::loadAlignAsBuilt(std::string folderName) 
-{
-
-   StatusCode sc=StatusCode::SUCCESS;
-   ATH_MSG_INFO( "Load alignment parameters from DB folder <"<<folderName<<">" );
-   ATH_MSG_DEBUG( " ----- MdtAsBuiltMapContainer pointer "<<(uintptr_t)m_asbuiltData );
-
-   // retreive the collection of strings read out from the DB
-   const CondAttrListCollection * atrc;
-   sc=detStore()->retrieve(atrc,folderName);
-   if(sc.isFailure())  {
-     ATH_MSG_WARNING( "could not retreive the CondAttrListCollection from DB folder " 
-                      << folderName  );
-     return StatusCode::RECOVERABLE;
-   }
-   else
-     ATH_MSG_INFO(" CondAttrListCollection from DB folder have been obtained with size "<< atrc->size()  );
-   ATH_MSG_DEBUG( " data found ----- AsBuiltMapContainer pointer "<<(uintptr_t)m_ilineData );
-
-   // unpack the strings in the collection and update the 
-   // AsBuiltContainer in TDS
-   int nLines = 0;
-   int nDecodedLines = 0;
-   int nNewDecodedAsBuilt = 0;
-   MdtAsBuiltPar xPar;
-   xPar.isNew(true);
-   CondAttrListCollection::const_iterator itr;
-   for (itr = atrc->begin(); itr != atrc->end(); ++itr)
-   {
-    const coral::AttributeList& atr=itr->second;
-    std::string data;
-    data=*(static_cast<const std::string*>((atr["data"]).addressOfData()));
-    
-    ATH_MSG_DEBUG( "Data load is " << data << " FINISHED HERE " );
-    
-    // Check the first word to see if it is a correction
-    std::string type;
-    
-    //Parse corrections
-    std::string delimiter = "\n";
-    
-    std::vector<std::string> lines;
-    MuonCalib::MdtStringUtils::tokenize(data,lines,delimiter);
-    for (unsigned int i=0; i<lines.size();i++)
-    {
-      ++nLines;
-      //std::cout<<"scanning CLOB --- current line = "<<nLines<<std::endl;
-      //	CscInternalAlignmentPar* newILine = new CscInternalAlignmentPar();
-      std::string blobline = lines[i];
-
-      std::string delimiter = ":";
-      std::vector<std::string> tokens;
-      MuonCalib::MdtStringUtils::tokenize(blobline,tokens,delimiter);
-      type = tokens[0];
-      //Parse line
-      if (type.find("#")==0) {
-         //skip it
-         continue;
-      }
-	
-      if (type.find("Corr")==0) {
-	if (!xPar.setFromAscii(blobline)) {
-          ATH_MSG_ERROR( "Unable to parse AsBuilt params from Ascii line: " << blobline  );
-          continue;
-	}
-
-        std::string stationType="XXX";
-        int jff = 0;
-        int jzz = 0;
-        int job = 0;
-        xPar.getAmdbId(stationType, jff, jzz, job);
-	Identifier id = m_idHelperTool->mdtIdHelper().elementID(stationType, jzz, jff);
-
-	ATH_MSG_VERBOSE("Station type jff jzz "  << stationType  << jff << " " << jzz  );
-        ++nDecodedLines;
-        ++nNewDecodedAsBuilt;
-        ciMdtAsBuiltMap iasbuild;
-        if((iasbuild = m_asbuiltData->find(id)) != m_asbuiltData->end())
-        {
-          ATH_MSG_WARNING( "More than one (As-built) entry in folder "<<folderName<<" for  "
-                           << stationType<<" at Jzz/Jff "<<jzz<<"/"<< jff<<" --- keep the latest one" );
-          m_asbuiltData->erase(id);
-          --nNewDecodedAsBuilt;
-        }
-	m_asbuiltData->insert(std::make_pair(id,new MdtAsBuiltPar(xPar)));
-      }
-    }
-   }
-   ATH_MSG_DEBUG("In folder <"<<folderName<<"> # lines/decodedLines/newDecodedILines= "
-                 <<nLines<<"/"<<nDecodedLines<<"/"<<nNewDecodedAsBuilt<<"/" );
-
-   // dump I-lines to m_log file TBA
-   if (m_dumpAsBuilt && (int)m_asbuiltData->size()>0) dumpAsBuilt(folderName);
-   
-   ATH_MSG_VERBOSE( "Collection CondAttrListCollection CLID " << atrc->clID() );
-   
-   IOVRange range;
-   if ((m_IOVSvc->getRange(1238547719, folderName, range)).isFailure()) return StatusCode::FAILURE;
-   ATH_MSG_DEBUG("IOVRange for these data is <"<<range<<">" );
-   
-
-// ss:01/07/2008 not clear if this is needed at all 
-   SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<MdtAsBuiltMapContainer>::ID(), m_asbuiltDataLocation);
-    if (!proxy) {
-      ATH_MSG_ERROR( "Unable to get the proxy for class ILineParContainer"  );
-      return StatusCode::FAILURE;
-    }
-    IAddressProvider* addp = this;
-    //    tad->setProvider(addp);
-    proxy->setProvider(addp, StoreID::DETECTOR_STORE);
-    ATH_MSG_DEBUG( "set address provider for MdtAsBuiltParContainer"  );
-   
-   return  sc; 
-}
-
-    
-std::vector<std::string> MuonAlignmentDbTool::abLineFolderNames() const
-{return m_parlineFolder;}
-std::string MuonAlignmentDbTool::aLineFolderName() const
-{return *m_parlineFolder.begin();}
-std::string MuonAlignmentDbTool::bLineFolderName() const
-{return *m_parlineFolder.begin();}
-std::string MuonAlignmentDbTool::iLineFolderName() const
-{return *m_parlineFolder.begin();}
-std::string MuonAlignmentDbTool::asBuiltFolderName() const
-{return *m_parlineFolder.begin();}
-
-const ALineMapContainer*
-MuonAlignmentDbTool::ALineContainer() const
-{return m_alineData;}
-const BLineMapContainer*
-MuonAlignmentDbTool::BLineContainer() const
-{return m_blineData;}
-const CscInternalAlignmentMapContainer*
-MuonAlignmentDbTool::ILineContainer() const
-{return m_ilineData;}
-const MdtAsBuiltMapContainer*
-MuonAlignmentDbTool::AsBuiltContainer() const
-{return m_asbuiltData;}
-
-int MuonAlignmentDbTool::stationPhiTGC(std::string stName, int fi, int zi_input) const
-{
-    // this function is defined to use as input fi in th erange 0 - N
-    fi-=1;
-
-    // remember that if this changes the one in MuonGeoModel/MuonChamber has to change 
-    std::string stName3 = stName.substr(0,3);
-    int stphi = 0;
-
-    int zi = abs(zi_input);
-    
-    if (stName3 == "T4E")
-    {
-        switch (fi)
-        {
-        case 0: stphi = zi;
-            break;
-        case 1: stphi = zi+3;
-            break;
-        case 2: stphi = zi+6;
-            break;
-        case 3: stphi = zi+9-1; //zi are 2 and 3 (counting do not tart by 1)
-            break;
-        case 4: stphi = zi+11;
-            break;
-        case 5: stphi = zi+14;
-            break;
-        case 6: stphi = zi+16;
-            break;
-        case 7: stphi = zi+19;
-            break;
-        default: stphi = 0;
-        }
-        // minumum stPhi at phi 0
-        stphi = stphi - 1;
-        if (stphi <1) stphi = stphi + 21;
-    }
-    else 
-    {
-        int nch = 3;
-        if ( (stName).substr(2,1) == "E" ) nch=6;
-        int fioff = abs(zi);
-        if (fioff>3 && (stName).substr(2,1) == "F")  fioff = fioff-3;
-        // minumum stPhi at phi 0
-        if ((stName).substr(2,1) == "F") fioff = fioff -1;
-        else fioff = fioff -2;
-        stphi = fi*nch + fioff;
-        if (stphi<1) {
-            if ((stName).substr(2,1) == "F") stphi = stphi + 24;
-            else stphi = stphi + 48;
-        }
-    }
-
-    return stphi;    
-}
-
-void MuonAlignmentDbTool::setALinesFromAscii() const
-{
-  MsgStream log(msgSvc(), name());
-  log.setLevel(msgLevel());
-
-  log << MSG::INFO << " Set alignment constants from text file "<< m_aLinesFile << endmsg;
-
-  std::ifstream infile;
-  infile.open(m_aLinesFile.c_str());
-  
-  char line[512] ;
-  if( m_debug ) log << MSG::DEBUG << "reading file" << endmsg;
-  
-  while( infile.getline(line,512) ) {
-    
-    std::istringstream is(line) ;
-    
-    char AlineMarker[2];
-    std::string name; int jff,jzz,obj;
-    float tras,traz,trat,rots,rotz,rott;
-    is >> AlineMarker >> name >> jff >> jzz >> obj
-       >> tras >> traz >> trat >> rots >> rotz >> rott;
-    
-    if( m_debug ) log << MSG::DEBUG << "read line: "<< line << endmsg;
-    
-    if( AlineMarker[0] == '\0') {
-      if( m_debug ) log << MSG::DEBUG << "read empty line!" << endmsg; 
-    }
-    else {
-      
-      // loop through A-line container and find the correct one
-      std::string testStationType;
-      int testJff,testJzz,testJob;
-      ALinePar* ALine(0);
-      for (ciALineMap cialine = m_alineData->begin(); cialine != m_alineData->end(); ++cialine) {
-	(*cialine).second->getAmdbId(testStationType,testJff,testJzz,testJob);
-	if (testStationType==name &&
-	    testJff        == jff &&
-	    testJzz        == jzz) {
-	  ALine = (*cialine).second;
-	  break;
-	}
-      }
-
-      // set parameter if you found it
-      if (ALine) 
-	ALine->setParameters(tras,traz,trat,rots,rotz,rott);      
-    }
-  }
-  return;
-}
-
-void MuonAlignmentDbTool::setAsBuiltFromAscii() const
-{
-  ATH_MSG_INFO (" Set alignment constants from text file "<< m_asBuiltFile);
-
-  std::ifstream fin(m_asBuiltFile.c_str());
-  std::string line;
-  MdtAsBuiltPar xPar;
-  xPar.isNew(true);
-  int count = 0;
-  while(getline(fin, line)) {
-    if (line.find("Corr:")==0) {
-      if (!xPar.setFromAscii(line)) {
-        ATH_MSG_ERROR( "Unable to parse AsBuilt params from Ascii line: " << line  );
-	} else {
-        std::string stName="XXX";
-        int jff = 0;
-        int jzz = 0;
-        int job = 0;
-        xPar.getAmdbId(stName, jff, jzz, job);
-        Identifier id = m_idHelperTool->mdtIdHelper().elementID(stName, jzz, jff);
-        if (!id.is_valid()) {
-          ATH_MSG_ERROR( "Invalid MDT identifiers: sta=" << stName << " eta=" << jzz << " phi=" << jff  );
-           continue;
-        }
-        iMdtAsBuiltMap ci = m_asbuiltData->begin();
-        if((ci = m_asbuiltData->find(id)) != m_asbuiltData->end())
-        {
-          ATH_MSG_DEBUG( "Updating extisting entry in AsBuilt container for Station " <<stName<<" at Jzz/Jff "<<jzz<<"/"<< jff  );
-          ATH_MSG_DEBUG( "That is strange since it's read from ASCII so this station is listed twice!"  );
-          MdtAsBuiltPar* oldAsBuilt =  (*ci).second;
-          m_asbuiltData->erase(id);
-          delete oldAsBuilt; oldAsBuilt=0;
-        } else {
-          ATH_MSG_DEBUG( "New entry in AsBuilt container for Station "
-                         <<stName<<" at Jzz/Jff "<<jzz<<"/"<< jff<<" --- in the container with key "<< m_idHelperTool->mdtIdHelper().show_to_string(id) );
-        }
-	  m_asbuiltData->insert(std::make_pair(id,new MdtAsBuiltPar(xPar)));
-	  ++count;
-	}
-    }
-  }
-  ATH_MSG_INFO( "Parsed AsBuilt parameters: " << count  );
-
-  return;
-}
-
-void MuonAlignmentDbTool::dumpALines(const std::string& folderName)
-{
-    //  MsgStream m_log(msgSvc(), name());
-   m_log.setLevel(msgLevel());
-
-  m_log << MSG::INFO << "dumping A-lines for folder "<<folderName<<endmsg;
-  
-  if( m_debug ) m_log  << MSG::DEBUG << "A "
-	    << "type jff jzz job s(cm)  z(cm)  t(cm)  ths(rad)  thz(rad)  tht(rad)  ID"<< endmsg;
-  
-  for (ciALineMap cialine = m_alineData->begin(); cialine != m_alineData->end(); ++cialine) {
-    Identifier ALineId = (*cialine).first;
-    ALinePar* ALine = (*cialine).second;
-    std::string stationType;
-    int jff,jzz,job;
-    ALine->getAmdbId(stationType,jff,jzz,job);
-    float s,z,t,ths,thz,tht;
-    ALine->getParameters(s,z,t,ths,thz,tht);
-    
-    if( m_debug ) m_log << MSG::DEBUG <<"A " << std::setiosflags(std::ios::fixed|std::ios::right)
-	      << std::setw(4) << stationType  <<" " 
-	      << std::setw(2) << jff  <<"  " 
-	      << std::setw(2) << jzz  <<" " 
-	      << std::setw(2) << job  <<" "
-	      << std::setw(6) << std::setprecision(3) <<  s   <<" "  // here cm !
-	      << std::setw(6) << std::setprecision(3) <<  z   <<" "  // here cm !
-	      << std::setw(6) << std::setprecision(3) <<  t   <<" "  // here cm !
-	      << std::setw(6) << std::setprecision(6) << ths  <<" " 
-	      << std::setw(6) << std::setprecision(6) << thz  <<" " 
-	      << std::setw(6) << std::setprecision(6) << tht  <<" "
-	      << ALineId << endmsg;
-  }
-  //std::cout<<std::endl;
-}
-
-void MuonAlignmentDbTool::dumpBLines(const std::string& folderName)
-{
-    //  MsgStream m_log(msgSvc(), name());
-   m_log.setLevel(msgLevel());
-
-  m_log << MSG::INFO << "dumping B-lines for folder "<<folderName<<endmsg;
-  if( m_debug ) m_log << MSG::DEBUG << "B "
-	    << "type jff jzz job bs       bp        bn        sp        sn        tw        pg        tr        eg        ep        en        ID"
-		      << endmsg;
-  
-  for (ciBLineMap cibline = m_blineData->begin(); cibline != m_blineData->end(); ++cibline) {
-    Identifier BLineId = (*cibline).first;
-    BLinePar* BLine = (*cibline).second;
-    std::string stationType;
-    int jff,jzz,job;
-    BLine->getAmdbId(stationType,jff,jzz,job);
-    float bs,bp,bn,sp,sn,tw,pg,tr,eg,ep,en;
-    BLine->getParameters(bs,bp,bn,sp,sn,tw,pg,tr,eg,ep,en);
-    
-    if( m_debug ) m_log << MSG::DEBUG <<"B " << std::setiosflags(std::ios::fixed|std::ios::right)
-	      << std::setw(4) << stationType  <<" " 
-	      << std::setw(2) << jff  <<" " 
-	      << std::setw(2) << jzz  <<" " 
-	      << std::setw(2) << job  <<"  "
-	      << std::setw(6) << std::setprecision(6) <<  bs  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  bp  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  bn  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  sp  <<" " 
-	      << std::setw(6) << std::setprecision(6) <<  sn  <<" " 
-	      << std::setw(6) << std::setprecision(6) <<  tw  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  pg  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  tr  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  eg  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  ep  <<" "
-	      << std::setw(6) << std::setprecision(6) <<  en  <<" "
-	      << BLineId << endmsg;
-  }
-  //std::cout<<std::endl;
-}
-
-void MuonAlignmentDbTool::dumpILines(const std::string& folderName)
-{
-    //  MsgStream m_log(msgSvc(), name());
-   m_log.setLevel(msgLevel());
-
-  m_log << MSG::INFO << "dumping I-lines for folder "<<folderName<<endmsg;
-  if( m_debug ) m_log << MSG::DEBUG << "I "
-	    << "\ttype\tjff\tjzz\tjob\tjlay\ttras\ttraz\ttrat\trots\trotz\trott"
-		      << endmsg;
-  
-  for (ciCscInternalAlignmentMap ciiline = m_ilineData->begin(); ciiline != m_ilineData->end(); ++ciiline) {
-    Identifier ILineId = (*ciiline).first;
-    CscInternalAlignmentPar* ILine = (*ciiline).second;
-    std::string stationType;
-    int jff,jzz,job,jlay;
-    ILine->getAmdbId(stationType,jff,jzz,job,jlay);
-    float tras,traz,trat,rots,rotz,rott;
-    ILine->getParameters(tras,traz,trat,rots,rotz,rott);
-    
-    if( m_debug ) m_log << MSG::DEBUG <<"I\t" << std::setiosflags(std::ios::fixed|std::ios::right)
-	      << std::setw(4) << stationType  <<"\t" 
-	      << std::setw(2) << jff  <<"\t" 
-	      << std::setw(2) << jzz  <<"\t" 
-	      << std::setw(2) << job  <<"\t"
-	      << std::setw(2) << jlay  <<"\t"
-	      << std::setw(6) << std::setprecision(6) <<  tras  <<"\t"
-	      << std::setw(6) << std::setprecision(6) <<  traz  <<"\t"
-	      << std::setw(6) << std::setprecision(6) <<  trat  <<"\t"
-	      << std::setw(6) << std::setprecision(6) <<  rots  <<"\t" 
-	      << std::setw(6) << std::setprecision(6) <<  rotz  <<"\t" 
-	      << std::setw(6) << std::setprecision(6) <<  rott  <<"\t"
-	      << ILineId << endmsg;
-  }
-  //std::cout<<std::endl;
-}
-
-void MuonAlignmentDbTool::dumpAsBuilt(const std::string& folderName)
-{
-    //  MsgStream m_log(msgSvc(), name());
-   m_log.setLevel(msgLevel());
-
-  m_log << MSG::INFO << "dumping As-build for folder "<<folderName<<endmsg;
-  //std::cout<<std::endl;
-}
-
-void MuonAlignmentDbTool::setLastIOVforThisFolder(std::string& folderName, long int iov)  
-{
-    if (m_lastIOVread.find(folderName)!=m_lastIOVread.end()) 
-    {
-	m_lastIOVread[folderName]=iov;       
-    }
-    else m_lastIOVread.insert(std::pair<std::string, long int>(folderName, iov));
-}
-
-long int MuonAlignmentDbTool::getLastIOVforThisFolder(std::string& folderName) 
-{
-    long int lastIOV = -1;
-    if (m_lastIOVread.find(folderName)!=m_lastIOVread.end()) 
-    {
-	lastIOV = m_lastIOVread[folderName];
-	if (m_debug) m_log << MSG::DEBUG <<"For folder named <" <<folderName<<"> latest IOV loaded was: "<<lastIOV<<endmsg;
-    }
-    else       
-    {
-	if (m_debug) m_log << MSG::DEBUG <<"For folder named <" <<folderName<<"> no previously loaded IOV exists"<<endmsg;
-    }
-    
-
-    return lastIOV;
-}
-
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/components/MuonCondTool_entries.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/components/MuonCondTool_entries.cxx
index 0d9423ead4affefc324b30e261b321d49a281cf5..506e54ed235f2944fb71f1b4fcf38264bb724846 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/components/MuonCondTool_entries.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/components/MuonCondTool_entries.cxx
@@ -1,4 +1,3 @@
-#include "MuonCondTool/MuonAlignmentDbTool.h"
 #include "MuonCondTool/MDT_DCSConditionsTool.h"
 #include "MuonCondTool/MDT_DCSConditionsRun2Tool.h"
 #include "MuonCondTool/RpcDetectorStatusDbTool.h"
@@ -10,7 +9,6 @@
 #include "MuonCondTool/MDT_DQConditionsTool.h"
 #include "MuonCondTool/MuonAlignmentErrorDbTool.h"
 
-DECLARE_COMPONENT( MuonAlignmentDbTool )
 DECLARE_COMPONENT( MDT_DCSConditionsTool )
 DECLARE_COMPONENT( CSC_DCSConditionsTool )
 DECLARE_COMPONENT( RPC_DCSConditionsTool )
@@ -21,4 +19,3 @@ DECLARE_COMPONENT( MDT_DQConditionsTool )
 DECLARE_COMPONENT( MDT_MapConversion )
 DECLARE_COMPONENT( MuonAlignmentErrorDbTool )
 DECLARE_COMPONENT( MDT_DCSConditionsRun2Tool )
-
diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
index 79e7846d7ce4ee292bdf9337ca68c6042843c4fd..0d64c025e668cab164bc8a576a9c43ad39845e6e 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
@@ -29,19 +29,32 @@ def MuonGeoModelCfg(flags):
         # This is all migrated from MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py
 
         from IOVDbSvc.IOVDbSvcConfig import addFolders
-        from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-        MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-        MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                              "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                              "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                              "/MUONALIGN/TGC/SIDEA",
-                                              "/MUONALIGN/TGC/SIDEC"]
-        acc.addPublicTool(MuonAlignmentDbTool)
+        from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+        if (flags.Common.isOnline and not flags.Input.isMC):                
+            acc.merge(addFolders( flags, ['/MUONALIGN/Onl/MDT/BARREL'], 'MUONALIGN', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/Onl/MDT/ENDCAP/SIDEA'], 'MUONALIGN', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/Onl/MDT/ENDCAP/SIDEC'], 'MUONALIGN', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/Onl/TGC/SIDEA'], 'MUONALIGN', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/Onl/TGC/SIDEC'], 'MUONALIGN', className='CondAttrListCollection'))
+        else:
+            acc.merge(addFolders( flags, ['/MUONALIGN/MDT/BARREL'], 'MUONALIGN_OFL', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/MDT/ENDCAP/SIDEA'], 'MUONALIGN_OFL', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/MDT/ENDCAP/SIDEC'], 'MUONALIGN_OFL', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/TGC/SIDEA'], 'MUONALIGN_OFL', className='CondAttrListCollection'))
+            acc.merge(addFolders( flags, ['/MUONALIGN/TGC/SIDEC'], 'MUONALIGN_OFL', className='CondAttrListCollection'))
 
+        MuonAlign = MuonAlignmentCondAlg()
+        MuonAlign.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                    "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                    "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                    "/MUONALIGN/TGC/SIDEA",
+                                    "/MUONALIGN/TGC/SIDEC"]
+
+        acc.addCondAlgo(MuonAlign)
+ 
         # Condition DB is needed only if A-lines or B-lines are requested
         if not (not flags.Muon.Align.UseALines and flags.Muon.Align.UseBLines=='none'):
             detTool.UseConditionDb = 1
-            detTool.TheMuonAlignmentTool = MuonAlignmentDbTool
         # here define to what extent B-lines are enabled
         if flags.Muon.Align.UseBLines=='none':
             detTool.EnableMdtDeformations = 0
@@ -56,20 +69,20 @@ def MuonGeoModelCfg(flags):
         # here define if I-lines (CSC internal alignment) are enabled
         if flags.Muon.Align.UseILines: 
             detTool.EnableCscInternalAlignment = True
-        if flags.IOVDb.DatabaseInstance == 'COMP200' and 'HLT' in flags.IOVDb.GlobalTag:
-            #logMuon.info("Reading CSC I-Lines from layout - special configuration for COMP200 in HLT setup.")
-            detTool.UseIlinesFromGM = True
-            MuonAlignmentDbTool.ILinesFromCondDB = False
-        else :
-            #logMuon.info("Reading CSC I-Lines from conditions database.")
-            if (flags.Common.isOnline and not flags.Input.isMC):                
-                acc.merge(addFolders( flags, ['/MUONALIGN/Onl/CSC/ILINES'], 'MUONALIGN'))
-            else:
-                acc.merge(addFolders( flags, ['/MUONALIGN/CSC/ILINES'], 'MUONALIGN_OFL'))                
-
-            MuonAlignmentDbTool.ParlineFolders += ["/MUONALIGN/CSC/ILINES"]
-            detTool.UseIlinesFromGM = False
-            MuonAlignmentDbTool.ILinesFromCondDB = True
+            if flags.IOVDb.DatabaseInstance == 'COMP200' and 'HLT' in flags.IOVDb.GlobalTag:
+                #logMuon.info("Reading CSC I-Lines from layout - special configuration for COMP200 in HLT setup.")
+                MuonAlign.ILinesFromCondDB = False
+                detTool.UseIlinesFromGM = True
+            else :
+                #logMuon.info("Reading CSC I-Lines from conditions database.")
+                if (flags.Common.isOnline and not flags.Input.isMC):                
+                    acc.merge(addFolders( flags, ['/MUONALIGN/Onl/CSC/ILINES'], 'MUONALIGN', className='CondAttrListCollection'))
+                else:
+                    acc.merge(addFolders( flags, ['/MUONALIGN/CSC/ILINES'], 'MUONALIGN_OFL', className='CondAttrListCollection'))                
+                    
+                    MuonAlign.ParlineFolders += ["/MUONALIGN/CSC/ILINES"]
+                    MuonAlign.ILinesFromCondDB = True
+                    detTool.UseIlinesFromGM = False
 
         # here define if As-Built (MDT chamber alignment) are enabled
         if flags.Muon.Align.UseAsBuilt:
@@ -80,11 +93,12 @@ def MuonGeoModelCfg(flags):
             else :
                 #logMuon.info("Reading As-Built parameters from conditions database")
                 detTool.EnableMdtAsBuiltParameters = 1
-                acc.merge(addFolders( flags, '/MUONALIGN/MDT/ASBUILTPARAMS', 'MUONALIGN_OFL'))
-                MuonAlignmentDbTool.ParlineFolders += ["/MUONALIGN/MDT/ASBUILTPARAMS"]
+                acc.merge(addFolders( flags, '/MUONALIGN/MDT/ASBUILTPARAMS', 'MUONALIGN_OFL', className='CondAttrListCollection'))
+                MuonAlign.ParlineFolders += ["/MUONALIGN/MDT/ASBUILTPARAMS"]
                 pass
+    #####
+
     else:
-        detTool.TheMuonAlignmentTool = ""
         detTool.UseConditionDb = 0
         detTool.UseAsciiConditionData = 0
         if flags.Detector.SimulateMuon:
diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h
index 5fb55f2c1aa3151b1089c08eeb512efa58ca28e0..39367900ae6c473233830e3722c2452070e86a24 100755
--- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h
+++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/MuonDetectorTool.h
@@ -7,7 +7,6 @@
 
 #include "GeoModelUtilities/GeoModelTool.h"
 #include "GaudiKernel/IIncidentListener.h"
-#include "MuonCondInterface/IMuonAlignmentDbTool.h"
 
 namespace MuonGM
 {
@@ -22,21 +21,12 @@ public:
   // Standard Constructor
   MuonDetectorTool( const std::string& type, const std::string& name, const IInterface* parent );
 
-  //    StatusCode queryInterface( const InterfaceID& riid, void** ppvIf );
-    
   // Standard Destructor
   virtual ~MuonDetectorTool() override final;
 
   //initialize - needed to retrieve the alignment Tool 
   virtual StatusCode initialize() override;
 
-    
-  //register call back to condition data 
-  virtual StatusCode registerCallback() override final;
-
-  //align 
-  virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override final;
-
   // build the geometry 
   virtual StatusCode create() override final;
 
@@ -91,8 +81,6 @@ private:
   int m_switchOnOff_BUILDFORWARDSHIELD;
   
   
-  ToolHandle<IMuonAlignmentDbTool> m_condDataTool;
-
   const MuonGM::MuonDetectorManager*  m_manager;
 };
 
diff --git a/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py b/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py
index a0eea700243e5734d4cb9953493f54c7c301ffb1..fe6438c95a89f9e6d42e74fd19ec040fefa58afb 100644
--- a/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py
+++ b/MuonSpectrometer/MuonGeoModel/share/MuonGeoModel_MinimalSetup.py
@@ -5,7 +5,7 @@ GeoModelSvc = GeoModelSvc()
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
 GeoModelSvc.DetectorTools += [ MuonDetectorTool() ]
 GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].BuildFromNova = 0
-GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = ""
+# GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].TheMuonAlignmentTool = ""
 GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseConditionDb = 0
 GeoModelSvc.DetectorTools[ "MuonDetectorTool" ].UseAsciiConditionData = 0
 GeoModelSvc.SupportedGeometry=21
diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx
index 4941b230524fbbe884f6f2c6403f329be1005beb..d40c94264b40799540a8940ce5123ed76a67bb4e 100755
--- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx
+++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorTool.cxx
@@ -58,7 +58,6 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string&
       m_enableMdtDeformations(0),
       m_enableMdtAsBuiltParameters(0),
       m_altMdtAsBuiltFile(""),
-      m_condDataTool(),
       m_manager(0)
 {
     declareInterface<IGeoModelTool>(this);
@@ -99,7 +98,6 @@ MuonDetectorTool::MuonDetectorTool( const std::string& type, const std::string&
     declareProperty("EnableMdtAsBuiltParameters"	, m_enableMdtAsBuiltParameters = 0);
     declareProperty("AlternateAsBuiltParamAlignFile"    , m_altMdtAsBuiltFile);
     //
-    declareProperty("TheMuonAlignmentTool",     m_condDataTool,      "a Tool to read from the condDB and save in StoreGate" );
     // THESE ALLOW TO RESET THE MUON SWITCHES IN THE oracle TABLES:
     // to reset (for example) BUILDBARRELTOROID use ForceSwitchOnOff_BUILDBARRELTOROID = 1001/1000 to have/not have the BARRELTOROID
     // i.e  you must set 1000 to force resetting + 1/0 (enable/disable)
@@ -135,8 +133,6 @@ MuonDetectorTool::initialize()
 {
     ATH_MSG_INFO("Initializing ...");
 
-    if( !m_condDataTool.empty() ) ATH_CHECK( m_condDataTool.retrieve() );
-
     // Incident Svc 
     ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc", name());
     ATH_CHECK( incidentSvc.retrieve() );
@@ -451,187 +447,3 @@ MuonDetectorTool::clear()
   }
   return StatusCode::SUCCESS;
 }
-
-StatusCode   
-MuonDetectorTool::registerCallback()
-{
-
-    if (m_accessCondDb == 0) 
-    {
-        ATH_MSG_INFO("No data will be read from the condition DB" );
-        if (m_asciiCondData == 0) return StatusCode::FAILURE;//!< This is OK: We don't want to look at condition data !
-    }
-
-    // m_accessCondDb == 1, Amdcsimrec will expect A/B line containers from MuonDetectorManager -> fill the starting point 
-    // init A/B line historical container
-    // m_manager->initABlineContainers();
-    // record in SG the A/B line full containers 
-    //if ((detStore->record(m_manager->ALineContainer(),"MDT_A_LINE_CORR")).isFailure()) return StatusCode::FAILURE;
-    //if ((detStore->record(m_manager->BLineContainer(),"MDT_B_LINE_CORR")).isFailure()) return StatusCode::FAILURE;
-
-    bool aFolderFound = false;
-    std::vector<std::string> foundFolderNames;
-
-    if( !m_condDataTool.empty() ){
-      std::vector<std::string> folderNames = m_condDataTool->abLineFolderNames();
-      ATH_MSG_INFO("Register call-back  against "<<folderNames.size()<<" folders listed below " );
-      int ic=0;
-      for (std::vector<std::string>::const_iterator ifld =folderNames.begin(); ifld!=folderNames.end(); ++ifld )
-      {
-          ++ic;
-          if (detStore()->contains<CondAttrListCollection>(*ifld)) {
-              aFolderFound=true;
-              foundFolderNames.push_back(*ifld);
-              ATH_MSG_INFO(" Folder n. "<<ic<<" <"<<(*ifld)<<">     found in the DetStore" );
-          }
-          else
-              ATH_MSG_INFO(" Folder n. "<<ic<<" <"<<(*ifld)<<"> NOT found in the DetStore" );
-      }
-    }
-
-    if (!aFolderFound) 
-    {
-        ATH_MSG_INFO("CondAttrListCollection not found in the DetectorStore"<<endmsg
-                   <<"Unable to register callback on CondAttrListCollection for any folder in the list "<<endmsg
-                   <<"This is OK unless you expect to read alignment and deformations from COOL " );
-        if (m_asciiCondData!=0) 	
-	{
-            int dummyint;
-            std::list<std::string> dummylist;
-            this->align(dummyint,dummylist);
-            if (m_accessCondDb==0) return StatusCode::FAILURE;
-	}
-	else return StatusCode::FAILURE;//!< This is OK for standard reconstruction until we are running with static MS geometry DB !
-    }
-
-    //!< register the IGeoModelTool::align interface of this tool for call back after the data
-    for (std::vector<std::string>::const_iterator ifld=foundFolderNames.begin(); ifld!=foundFolderNames.end(); ++ifld)
-    {
-        const DataHandle<CondAttrListCollection> parlineData;
-        StatusCode sc = detStore()->regFcn(&IGeoModelTool::align,
-                                         dynamic_cast<IGeoModelTool *>(this),
-                                         parlineData,
-                                         *ifld);
-        if (sc.isFailure())
-        {
-            ATH_MSG_WARNING("Unable to register call-back to MuonDetectorTool::align() against folder <"<<*ifld<<">"
-               <<" This is OK unless you expect to read alignment and deformations from COOL " );
-        }
-        else ATH_MSG_INFO("Call-back to MuonDetectorTool::align() against folder "<<*ifld<<" registered " );
-    }
-    
-    return StatusCode::SUCCESS;
-}
-
-StatusCode MuonDetectorTool::align(IOVSVC_CALLBACK_ARGS_P(I,keys))
-{
-    ATH_MSG_INFO("In MuonDetectorTool::align" );
-    if (m_accessCondDb == 0) 
-    {
-        ATH_MSG_INFO("Access to the cond DB not enabled by MuonGeoModel specific job-options (UseConditionDb=0)" );
-        if (m_asciiCondData==0) return StatusCode::SUCCESS;
-    }	
-    if (m_asciiCondData==0) ATH_MSG_INFO("Access to the cond DB enabled by MuonGeoModel specific job-options (UseConditionDb=1)" );
-    
-    ATH_MSG_DEBUG("ToolHandle in align - "<<m_condDataTool );
-    IMuonAlignmentDbTool* pAliTool = &*m_condDataTool;
-    //and why not also print out this pAliTool pointer ? The &* is the trick to get the pointer to the real tool.
-    ATH_MSG_DEBUG("pointer to the concrete tool in align - "<<(uintptr_t)pAliTool );
-
-    std::ofstream geoModelStats;
-    int mem = 0;
-    float cpu = 0;
-    int umem = 0;
-    float ucpu = 0;
-    
-    if (m_dumpMemoryBreakDown){
-      geoModelStats.open("MuonGeoModelStatistics_MuonDetectorTool",std::ios::app);
-	umem = GeoPerfUtils::getMem();
-	ucpu = float(GeoPerfUtils::getCpu()/100.);
-	geoModelStats <<"At MuonDetectorTool::align method just called back   \t SZ= " <<umem << " Kb \t Time = " << ucpu << " seconds  ---- \t DeltaM = "<<umem-mem<<" \t Delta T ="<<ucpu - cpu << std::endl;
-	mem = umem;
-	cpu = ucpu;
-    }
-    
-    StatusCode sc = m_condDataTool->loadParameters(I, keys);
-    if (sc.isRecoverable())
-    {
-        ATH_MSG_WARNING("Recoverable error while loading the Alignment and Deformation parameters"<<endmsg
-                      <<"part of alignment data requested might be missing" );
-    }
-    else if (sc.isFailure())
-    {
-        ATH_MSG_ERROR("Unable to load the Alignment and Deformation parameters" );
-        return sc;
-    }
-    ATH_MSG_INFO("Alignment and Deformation parameters loaded and stored in the DetectorStore" );
-
-    if (m_dumpMemoryBreakDown)
-    {
-	umem = GeoPerfUtils::getMem();
-	ucpu = float(GeoPerfUtils::getCpu()/100.);
-	geoModelStats <<"At MuonDetectorTool::align method finished reading from COOL   \t SZ= " <<umem << " Kb \t Time = " << ucpu << " seconds  ---- \t DeltaM = "<<umem-mem<<" \t Delta T ="<<ucpu - cpu << std::endl;
-	mem = umem;
-	cpu = ucpu;
-    }
-
-    sc = m_manager->updateAlignment(m_condDataTool->ALineContainer());
-    if (sc.isFailure()) ATH_MSG_ERROR("Unable to updateAlignment" );
-    else ATH_MSG_DEBUG("updateAlignment DONE" );
-
-    if (m_dumpMemoryBreakDown)
-    {
-	umem = GeoPerfUtils::getMem();
-	ucpu = float(GeoPerfUtils::getCpu()/100.);
-	geoModelStats <<"At MuonDetectorTool::align method after manager->updateAlignment   \t SZ= " <<umem << " Kb \t Time = " << ucpu << " seconds  ---- \t DeltaM = "<<umem-mem<<" \t Delta T ="<<ucpu - cpu << std::endl;
-	mem = umem;
-	cpu = ucpu;
-    }
-
-
-    sc = m_manager->updateDeformations(m_condDataTool->BLineContainer());
-    if (sc.isFailure()) ATH_MSG_ERROR("Unable to updateDeformations" );
-    else ATH_MSG_DEBUG("updateDeformations DONE" );
-
-    if (m_dumpMemoryBreakDown)
-    {
-	umem = GeoPerfUtils::getMem();
-	ucpu = float(GeoPerfUtils::getCpu()/100.);
-	geoModelStats <<"At MuonDetectorTool::align method after manager->updateDeformations   \t SZ= " <<umem << " Kb \t Time = " << ucpu << " seconds  ---- \t DeltaM = "<<umem-mem<<" \t Delta T ="<<ucpu - cpu << std::endl;
-	mem = umem;
-	cpu = ucpu;
-    }
-
-    sc = m_manager->updateAsBuiltParams(m_condDataTool->AsBuiltContainer());
-    if (sc.isFailure()) ATH_MSG_ERROR("Unable to updateAsBuiltParams" );
-    else ATH_MSG_DEBUG("updateAsBuiltParams DONE" );
-
-    if (m_dumpMemoryBreakDown)
-    {
-	umem = GeoPerfUtils::getMem();
-	ucpu = float(GeoPerfUtils::getCpu()/100.);
-	geoModelStats <<"At MuonDetectorTool::align method after manager->updateAsBuiltParams   \t SZ= " <<umem << " Kb \t Time = " << ucpu << " seconds  ---- \t DeltaM = "<<umem-mem<<" \t Delta T ="<<ucpu - cpu << std::endl;
-	mem = umem;
-	cpu = ucpu;
-    }
-    
-    if (!m_useCscIntAlinesFromGM) sc = m_manager->updateCSCInternalAlignmentMap(m_condDataTool->ILineContainer());
-    if (sc.isFailure() && !m_useCscIntAlinesFromGM) ATH_MSG_ERROR("Unable to updateCSCInternalAlignmentMap" );
-    else ATH_MSG_DEBUG("updateCSCInternalAlignmentMap DONE or used via GM" );
-
-    if (m_dumpMemoryBreakDown && !m_useCscIntAlinesFromGM)
-    {
-	umem = GeoPerfUtils::getMem();
-	ucpu = float(GeoPerfUtils::getCpu()/100.);
-	geoModelStats <<"At MuonDetectorTool::align method after manager->updateCSCInternalAlignmentMap   \t SZ= " <<umem << " Kb \t Time = " << ucpu << " seconds  ---- \t DeltaM = "<<umem-mem<<" \t Delta T ="<<ucpu - cpu << std::endl;
-	mem = umem;
-	cpu = ucpu;
-    }    
-
-    if (m_dumpMemoryBreakDown)
-    {
-	geoModelStats.close();
-    }    
-
-    return sc;
-}
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckApplyBLines_topOptions.py b/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckApplyBLines_topOptions.py
index c78c41dd1919115b30dcae99bb2e15ec1afe3d07..4dd5dc10ed83106300f21e934bc8d68beaaf82a9 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckApplyBLines_topOptions.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckApplyBLines_topOptions.py
@@ -133,23 +133,22 @@ print GeoModelSvc
 if useAlign:
     from IOVDbSvc.CondDB import conddb
     conddb.dbname = "COMP200"
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = INFO
-    MGM_AlignmentDbTool.DumpALines = False
-    
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
+
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
 MuonDetectorTool = MuonDetectorTool()
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckCSCintALines_topOptions.py b/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckCSCintALines_topOptions.py
index 6fac266d28f83b39385360d75f50e15ca5f20e94..6b7673cca7795c67a65b3697c665c420365309bb 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckCSCintALines_topOptions.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheckCSCintALines_topOptions.py
@@ -84,22 +84,22 @@ if not 'IAcsc' in dir():
 
 if useAlign:
     from IOVDbSvc.CondDB import conddb
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
-
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
+        
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
 MuonDetectorTool = MuonDetectorTool()
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheck_topOptions.py b/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheck_topOptions.py
index 91c66c65026d464f26fa89fd289b7db3406d11b5..a84cf908e5a90703d05c56b07ea68d1d1cad49f7 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheck_topOptions.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/MuonGMCheck_topOptions.py
@@ -103,21 +103,21 @@ print GeoModelSvc
 if useAlign:
     from IOVDbSvc.CondDB import conddb
     conddb.dbname = "COMP200"
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence = AthSequencer("AthCondSeq")
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
 
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocation.py b/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocation.py
index 6246160fc5ed9e2f0c01985bc461e0c0405f7940..3776d3476955e275b2daa4f5776452b502c70ee5 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocation.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocation.py
@@ -55,21 +55,21 @@ ServiceMgr.NTupleSvc.Output = [ "FILE DATAFILE='RelocatedMuonHits.root' OPT='NEW
 
 print "Reading alignment constants from DB"
 from IOVDbSvc.CondDB import conddb
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                      "/MUONALIGN/TGC/SIDEA",
-                                      "/MUONALIGN/TGC/SIDEC"]
-ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel=DEBUG
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSequence = AthSequencer("AthCondSeq")
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                       "/MUONALIGN/TGC/SIDEA",
+                                       "/MUONALIGN/TGC/SIDEC"]
 
 #***************************************************** HERE override MuonSpectrometer tag
 from AtlasGeoModel import SetGeometryVersion
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocationNSW.py b/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocationNSW.py
index 8369b58507d536584908293b7f201f89b7f5572c..3ed0417767cb6fca935143a63b8b309238b5d68e 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocationNSW.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/MuonHitRelocationNSW.py
@@ -53,23 +53,21 @@ ServiceMgr.NTupleSvc.Output = [ "FILE DATAFILE='Relocated.atlasG4.NSWgeantinohit
 
 print "Reading alignment constants from DB"
 from IOVDbSvc.CondDB import conddb
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                      "/MUONALIGN/TGC/SIDEA",
-                                      "/MUONALIGN/TGC/SIDEC"]
-ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel=DEBUG
-
-
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSequence = AthSequencer("AthCondSeq")
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                       "/MUONALIGN/TGC/SIDEA",
+                                       "/MUONALIGN/TGC/SIDEC"]
 
 #***************************************************** HERE setup MuonGMCheck
 from MuonGeoModelTest.MuonGeoModelTestConf import MuonHitRelocation
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/dumpR07.py b/MuonSpectrometer/MuonGeoModelTest/share/dumpR07.py
index 2c58ac62ad52c8f89fade055c653f7f012317d54..dcebbe8f897ff86e741a3ea7ae2634ff6de1f12e 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/dumpR07.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/dumpR07.py
@@ -102,21 +102,21 @@ print GeoModelSvc
 if useAlign:
     from IOVDbSvc.CondDB import conddb
     conddb.dbname = "COMP200"
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
 
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/readPrdFromRdo.py b/MuonSpectrometer/MuonGeoModelTest/share/readPrdFromRdo.py
index a3dcd9a905777d887d692bb898de0d51b7fb2d51..9016257762db12ecc7efee43469c6ac15d38da82 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/readPrdFromRdo.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/readPrdFromRdo.py
@@ -41,18 +41,13 @@ include ("AmdcAth/AmdcAth_jobOptions.py")
 
 ###################### try here the DB stuff
 from IOVDbSvc.CondDB import conddb
-conddb.addFolder("MUONALIGN","/MUONALIGN/MDT/BARREL <tag>HEAD</tag>")
-
-# get the ToolSvc
-from AthenaCommon.AppMgr import ToolSvc
-ToolSvc.OutputLevel = DEBUG
-# add my Tool to the ToolSvc
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-ToolSvc += MuonAlignmentDbTool("MGM_AlignmentDbTool",
-                                ParlineFolder="/MUONALIGN/MDT/BARREL")
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel = VERBOSE
-print MGM_AlignmentDbTool
+conddb.addFolder("MUONALIGN","/MUONALIGN/MDT/BARREL <tag>HEAD</tag>",className='CondAttrListCollection')
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSequence = AthSequencer("AthCondSeq")
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL"]
 
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
 MuonDetectorTool = MuonDetectorTool()
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM.py b/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM.py
index cb70985f9cf8b7e191274fc013d5b4b30a38a891..12265347990d5992ef976e0164d50f330114831b 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM.py
@@ -14,8 +14,7 @@ from AthenaCommon.AthenaCommonFlags import jobproperties
 from AthenaCommon.AthenaCommonFlags import jobproperties,athenaCommonFlags
 # import service manager
 from AthenaCommon.AppMgr import ServiceMgr
-import AthenaCommon.AtlasUnixStandardJob
-
+import AthenaCommon.AtlasUnixGeneratorJob
 
 # Turn off all detector systems except the Muon Spectrometer
 from AthenaCommon.DetFlags import DetFlags
@@ -53,7 +52,7 @@ from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
 ######################################################################## end setup GeoModel
 
-theApp.EvtSel = "NONE"
+theApp.EvtSel = "EventSelector"
 theApp.EvtMax = 1
 # Modify A line parameters
 # GeneralControlAlines = I1 * 100000 + I2 * 10000 + I3 * 1000 + I4 * 100 + I5 * 10 + I6
@@ -80,24 +79,28 @@ print GeoModelSvc
 
 #***************************************************** HERE define alignment data from cond. tags
 if useAlign:
+    from McEventSelector import McEventSelectorConf
+    ServiceMgr+=McEventSelectorConf.McEventSelector('EventSelector',
+                                                    RunNumber = 310809,
+                                                    InitialTimeStamp = 1476741326)
     from IOVDbSvc.CondDB import conddb
     conddb.dbname = "COMP200"
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
-
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
+    MuonAlignmentCondAlg.OutputLevel = DEBUG
 
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_asciiTGC_Alines.py b/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_asciiTGC_Alines.py
index 3b6cbf78f9bb466cf4b98007924ac11e764fad9c..3ccd800606d40fe40cbfe0f664b9845c92a7c09a 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_asciiTGC_Alines.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_asciiTGC_Alines.py
@@ -16,7 +16,7 @@ from AthenaCommon.AthenaCommonFlags import jobproperties
 from AthenaCommon.AthenaCommonFlags import jobproperties,athenaCommonFlags
 # import service manager
 from AthenaCommon.AppMgr import ServiceMgr
-import AthenaCommon.AtlasUnixStandardJob
+import AthenaCommon.AtlasUnixGeneratorJob
 
 
 # Turn off all detector systems except the Muon Spectrometer
@@ -55,7 +55,7 @@ from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
 ######################################################################## end setup GeoModel
 
-theApp.EvtSel = "NONE"
+theApp.EvtSel = "EventSelector"
 theApp.EvtMax = 1
 # Modify A line parameters
 # GeneralControlAlines = I1 * 100000 + I2 * 10000 + I3 * 1000 + I4 * 100 + I5 * 10 + I6
@@ -82,29 +82,33 @@ print GeoModelSvc
 
 #***************************************************** HERE define alignment data from cond. tags
 if useAlign:
+    from McEventSelector import McEventSelectorConf
+    ServiceMgr+=McEventSelectorConf.McEventSelector('EventSelector',
+                                                    RunNumber = 310809,
+                                                    InitialTimeStamp = 1476741326)
     from IOVDbSvc.CondDB import conddb
     conddb.dbname = "COMP200"
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    #conddb.addOverride('/MUONALIGN/TGC/SIDEA','MuonAlignTGCEndCapAAlign-TEST-01')
-    #conddb.addOverride('/MUONALIGN/TGC/SIDEC','MuonAlignTGCEndCapCAlign-TEST-01')
-    conddb.addOverride('/MUONALIGN/TGC/SIDEA','MuonAlignTGCEndCapAAlign-REPRO-2010-03')
-    conddb.addOverride('/MUONALIGN/TGC/SIDEC','MuonAlignTGCEndCapCAlign-REPRO-2010-03')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
-    MGM_AlignmentDbTool.DumpALines = True
-
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+    #conddb.addOverride('/MUONALIGN/TGC/SIDEA','MuonAlignTGCEndCapAAlign-TEST-01',className='CondAttrListCollection')
+    #conddb.addOverride('/MUONALIGN/TGC/SIDEC','MuonAlignTGCEndCapCAlign-TEST-01',className='CondAttrListCollection')
+    conddb.addOverride('/MUONALIGN/TGC/SIDEA','MuonAlignTGCEndCapAAlign-REPRO-2010-03',className='CondAttrListCollection')
+    conddb.addOverride('/MUONALIGN/TGC/SIDEC','MuonAlignTGCEndCapCAlign-REPRO-2010-03',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
+    MuonAlignmentCondAlg.DumpALines = True
+    MuonAlignmentCondAlg.OutputLevel = DEBUG
 
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_testBlines.py b/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_testBlines.py
index 603de0f6c80c6e530306729b08f10a26ae2b7c03..8a6665098f8906a31e4a3777df3ce02274c873b8 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_testBlines.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/runAmdcMGM_testBlines.py
@@ -45,7 +45,7 @@ from AthenaCommon.AthenaCommonFlags import jobproperties
 from AthenaCommon.AthenaCommonFlags import jobproperties,athenaCommonFlags
 # import service manager
 from AthenaCommon.AppMgr import ServiceMgr
-import AthenaCommon.AtlasUnixStandardJob
+import AthenaCommon.AtlasUnixGeneratorJob
 
 ######################################################################## setup GeoModel
 # Turn off all detector systems except the Muon Spectrometer
@@ -84,7 +84,7 @@ from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
 ######################################################################## end setup GeoModel
 
-theApp.EvtSel = "NONE"
+theApp.EvtSel = "EventSelector"
 theApp.EvtMax = 1
 
 # Set output level threshold 
@@ -103,24 +103,29 @@ print GeoModelSvc
 
 #***************************************************** HERE define alignment data from cond. tags
 if useAlign:
+    from McEventSelector import McEventSelectorConf
+    ServiceMgr+=McEventSelectorConf.McEventSelector('EventSelector',
+                                                    RunNumber = 310809,
+                                                    InitialTimeStamp = 1476741326)
     from IOVDbSvc.CondDB import conddb
     conddb.dbname = "COMP200"
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
-    MGM_AlignmentDbTool.DumpALines = False
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
+    MuonAlignmentCondAlg.DumpALines = False
+    MuonAlignmentCondAlg.OutputLevel = DEBUG
 
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/simulGeantinoHits_misal.py b/MuonSpectrometer/MuonGeoModelTest/share/simulGeantinoHits_misal.py
index b88250dbed7feecc4dbca1a3d8096b2bcab4d74e..1dd1d5f8a62d31b600471cffcc6c877619bec8b9 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/simulGeantinoHits_misal.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/simulGeantinoHits_misal.py
@@ -56,21 +56,21 @@ simFlags.RunNumber=222500
 #
 print "Reading alignment constants from DB"
 from IOVDbSvc.CondDB import conddb
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                      "/MUONALIGN/TGC/SIDEA",
-                                      "/MUONALIGN/TGC/SIDEC"]
-ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel=DEBUG
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSequence = AthSequencer("AthCondSeq")
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                       "/MUONALIGN/TGC/SIDEA",
+                                       "/MUONALIGN/TGC/SIDEC"]
 
 from AtlasGeoModel.MuonGM import GeoModelSvc
 #GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.07.01"
@@ -102,5 +102,3 @@ topSeq.G4AtlasAlg.InputTruthCollection = "GEN_EVENT"
 #you can override this for individual modules if necessary
 MessageSvc = Service( "MessageSvc" )
 MessageSvc.OutputLevel = 3
-
-
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/simulSingleMuHits_misal.py b/MuonSpectrometer/MuonGeoModelTest/share/simulSingleMuHits_misal.py
index 8e4bcc6212bd8007b4a61494712c2c21a9057ecd..4a332fd9e90266f530be426fc0f9fe229e034dd6 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/simulSingleMuHits_misal.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/simulSingleMuHits_misal.py
@@ -54,21 +54,21 @@ simFlags.EventFilter.set_On()
 #
 print "Reading alignment constants from DB"
 from IOVDbSvc.CondDB import conddb
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                      "/MUONALIGN/TGC/SIDEA",
-                                      "/MUONALIGN/TGC/SIDEC"]
-ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel=DEBUG
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSequence = AthSequencer("AthCondSeq")
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                       "/MUONALIGN/TGC/SIDEA",
+                                       "/MUONALIGN/TGC/SIDEC"]
 
 from AtlasGeoModel.MuonGM import GeoModelSvc
 #GeoModelSvc.MuonVersionOverride = "MuonSpectrometer-R.01.01.Initial.Light"
diff --git a/MuonSpectrometer/MuonGeoModelTest/share/vp1_config.py b/MuonSpectrometer/MuonGeoModelTest/share/vp1_config.py
index 02314f01b1f341fac95f44492723a3062f1fc20c..de5e6886870e159b74c98e6dc5da65e659c89a1f 100644
--- a/MuonSpectrometer/MuonGeoModelTest/share/vp1_config.py
+++ b/MuonSpectrometer/MuonGeoModelTest/share/vp1_config.py
@@ -85,21 +85,21 @@ print GeoModelSvc
 
 if useAlign:
     from IOVDbSvc.CondDB import conddb
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-    from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-    MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-    MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                          "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                          "/MUONALIGN/TGC/SIDEA",
-                                          "/MUONALIGN/TGC/SIDEC"]
-    ToolSvc += MuonAlignmentDbTool
-    MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-    MGM_AlignmentDbTool.OutputLevel = DEBUG
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+    conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+    
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSequence = AthSequencer("AthCondSeq")
+    from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+    condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+    MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                           "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                           "/MUONALIGN/TGC/SIDEA",
+                                           "/MUONALIGN/TGC/SIDEC"]
 
 #***************************************************** HERE setup MuonDetectorManager
 from MuonGeoModel.MuonGeoModelConf import MuonDetectorTool
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py
index 4a714621315e022cf241c6f39e6698285000a684..493143fcfe37a05e271e95c13f1e2210fd5d68ef 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py
@@ -30,20 +30,22 @@ muonAlignFlags.setDefaults()
 
 import re
 logMuon.info("Reading alignment constants from DB")
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                      "/MUONALIGN/TGC/SIDEA",
-                                      "/MUONALIGN/TGC/SIDEC"]
-ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+condSequence = AthSequencer("AthCondSeq")
+
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+MuonAlignAlg = MuonAlignmentCondAlg()
+condSequence+=MuonAlignAlg
+MuonAlignAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                               "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                               "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                               "/MUONALIGN/TGC/SIDEA",
+                               "/MUONALIGN/TGC/SIDEC"]
 
 from AtlasGeoModel.MuonGM import GeoModelSvc
 MuonDetectorTool = GeoModelSvc.DetectorTools[ "MuonDetectorTool" ]
@@ -51,7 +53,6 @@ MuonDetectorTool = GeoModelSvc.DetectorTools[ "MuonDetectorTool" ]
 # Condition DB is needed only if A-lines or B-lines are requested
 if not (muonAlignFlags.UseAlines=='none' and muonAlignFlags.UseBlines=='none'):
     MuonDetectorTool.UseConditionDb = 1
-    MuonDetectorTool.TheMuonAlignmentTool = MGM_AlignmentDbTool
     # here define to what extent B-lines are enabled
     if muonAlignFlags.UseBlines=='none':
         MuonDetectorTool.EnableMdtDeformations = 0
@@ -62,20 +63,18 @@ if not (muonAlignFlags.UseAlines=='none' and muonAlignFlags.UseBlines=='none'):
     elif muonAlignFlags.UseBlines=='endcaps':
         MuonDetectorTool.EnableMdtDeformations = 3
 
-
 # here define if I-lines (CSC internal alignment) are enabled
 if muonAlignFlags.UseIlines: 
     MuonDetectorTool.EnableCscInternalAlignment = True
     if conddb.dbdata == 'COMP200' and 'HLT' in globalflags.ConditionsTag() :
         logMuon.info("Reading CSC I-Lines from layout - special configuration for COMP200 in HLT setup.")
         MuonDetectorTool.UseIlinesFromGM = True
-        MuonAlignmentDbTool.ILinesFromCondDB = False
     else :
         logMuon.info("Reading CSC I-Lines from conditions database.")
-        conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/CSC/ILINES','/MUONALIGN/CSC/ILINES')
-        MuonAlignmentDbTool.ParlineFolders += ["/MUONALIGN/CSC/ILINES"]
+        conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/CSC/ILINES','/MUONALIGN/CSC/ILINES',className='CondAttrListCollection')
         MuonDetectorTool.UseIlinesFromGM = False
-        MuonAlignmentDbTool.ILinesFromCondDB = True
+        MuonAlignAlg.ParlineFolders += ["/MUONALIGN/CSC/ILINES"]
+        MuonAlignAlg.ILinesFromCondDB = True
 
 # here define if As-Built (MDT chamber alignment) are enabled
 if muonAlignFlags.UseAsBuilt:
@@ -86,14 +85,12 @@ if muonAlignFlags.UseAsBuilt:
     else :
         logMuon.info("Reading As-Built parameters from conditions database")
         MuonDetectorTool.EnableMdtAsBuiltParameters = 1
-        #MuonAlignmentDbTool.AsBuiltFile = "clob_asbuilt_nominal.txt"
-        conddb.addFolder('MUONALIGN_OFL','/MUONALIGN/MDT/ASBUILTPARAMS')
-        MuonAlignmentDbTool.ParlineFolders += ["/MUONALIGN/MDT/ASBUILTPARAMS"]
+        conddb.addFolder('MUONALIGN_OFL','/MUONALIGN/MDT/ASBUILTPARAMS',className='CondAttrListCollection')
+        MuonAlignAlg.ParlineFolders += ["/MUONALIGN/MDT/ASBUILTPARAMS"]
 
 # nuisance parameter used during track fit to account for alignment uncertainty
-condSequence = AthSequencer("AthCondSeq")
 if conddb.dbdata != 'COMP200' and conddb.dbmc != 'COMP200' and \
    'HLT' not in globalflags.ConditionsTag() and not conddb.isOnline :
+
     conddb.addFolder("MUONALIGN_OFL","/MUONALIGN/ERRS",className='CondAttrListCollection')
     condSequence += MuonAlignmentErrorDbAlg("MuonAlignmentErrorDbAlg")
-
diff --git a/Simulation/SimulationJobOptions/share/preInclude.muAlign.py b/Simulation/SimulationJobOptions/share/preInclude.muAlign.py
index 278792f0f7612a7f34c0866eba1a6f3fa2ada1d4..389e421a5215cddce81977cfde232f45034ee1b2 100644
--- a/Simulation/SimulationJobOptions/share/preInclude.muAlign.py
+++ b/Simulation/SimulationJobOptions/share/preInclude.muAlign.py
@@ -1,20 +1,21 @@
 print "Reading alignment constants from DB"
 from IOVDbSvc.CondDB import conddb
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA')
-conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC')
-from MuonCondTool.MuonCondToolConf import MuonAlignmentDbTool
-MuonAlignmentDbTool = MuonAlignmentDbTool("MGM_AlignmentDbTool")
-MuonAlignmentDbTool.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEA",
-                                      "/MUONALIGN/MDT/ENDCAP/SIDEC",
-                                      "/MUONALIGN/TGC/SIDEA",
-                                      "/MUONALIGN/TGC/SIDEC"]
-ToolSvc += MuonAlignmentDbTool
-MGM_AlignmentDbTool = ToolSvc.MGM_AlignmentDbTool
-MGM_AlignmentDbTool.OutputLevel=DEBUG
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/BARREL','/MUONALIGN/MDT/BARREL',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEA','/MUONALIGN/MDT/ENDCAP/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/MDT/ENDCAP/SIDEC','/MUONALIGN/MDT/ENDCAP/SIDEC',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEA','/MUONALIGN/TGC/SIDEA',className='CondAttrListCollection')
+conddb.addFolderSplitOnline('MUONALIGN','/MUONALIGN/Onl/TGC/SIDEC','/MUONALIGN/TGC/SIDEC',className='CondAttrListCollection')
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSequence = AthSequencer("AthCondSeq")
+from MuonCondAlg.MuonCondAlgConf import MuonAlignmentCondAlg
+condSequence+=MuonAlignmentCondAlg('MuonAlignmentCondAlg')
+MuonAlignmentCondAlg.ParlineFolders = ["/MUONALIGN/MDT/BARREL",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEA",
+                                       "/MUONALIGN/MDT/ENDCAP/SIDEC",
+                                       "/MUONALIGN/TGC/SIDEA",
+                                       "/MUONALIGN/TGC/SIDEC"]
+
 from AtlasGeoModel.MuonGM import GeoModelSvc
 MuonDetectorTool = GeoModelSvc.DetectorTools[ "MuonDetectorTool" ]
 MuonDetectorTool.UseConditionDb = 1
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
index 256c41d997047af03aeeab39933c193325d0844e..07457aeccd9ba5f01a5ec66b9a7424eb72c251d7 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -71,6 +71,9 @@ for option in defaultOptions:
 
 
 import re
+from MuonRecExample.MuonAlignFlags import muonAlignFlags
+muonAlignFlags.UseIlines = False
+
 sliceRe = re.compile("^do.*Slice")
 slices = [a for a in dir(opt) if sliceRe.match(a)]
 if opt.doEmptyMenu is True: