diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/NavTest.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/NavTest.h
index c6c5939587fbf85be0b2616e34ec1ad4285f5d30..388e224aeef1cb4ab41ed1633dcf7dd33b793fae 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/NavTest.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/NavTest.h
@@ -11,14 +11,14 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 class StoreGateSvc;
 
 /////////////////////////////////////////////////////////////////////////////
 
-class NavTest : public Algorithm
+class NavTest : public AthAlgorithm
 {
 public:
   NavTest (const std::string& name, ISvcLocator* pSvcLocator);
@@ -26,9 +26,6 @@ public:
   StatusCode initialize();
   StatusCode execute();
   StatusCode finalize();
-
-private:
-  StoreGateSvc * m_storeGate;
 };
 
 #endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.h
index 38bf174aa09d59e2bc8b20b5749e0cb33e465166..21a4e539bc84a45f86aa88b475ff9bd5a884593e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.h
@@ -11,7 +11,7 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 class StoreGateSvc;
@@ -19,7 +19,7 @@ class StoreGateSvc;
 /////////////////////////////////////////////////////////////////////////////
 
 template <class CONT>
-class ReadConstituent : public Algorithm
+class ReadConstituent : public AthAlgorithm
 {
 public:
   ReadConstituent (const std::string& name, ISvcLocator* pSvcLocator);
@@ -32,7 +32,6 @@ protected:
 
   StatusCode accessNtuple();
 
-  StoreGateSvc * m_storeGate;
   NTuple::Tuple* m_ntuplePtr;
 
   // Container key
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.icc b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.icc
index 60f38604c172f6acc8983824e1d33d383e20d88c..a5bb9a9c0c668a20aa411953e8706b70a6ff5b6c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.icc
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadConstituent.icc
@@ -2,11 +2,9 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AnalysisTest/ReadConstituent.h"
 
 #include "StoreGate/StoreGate.h"
 
-#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/SmartDataPtr.h"
 #include "GaudiKernel/IDataProviderSvc.h"
@@ -19,7 +17,7 @@ static const int MAX_nCon = 128;
 
 template <class CONT> inline
 ReadConstituent<CONT>::ReadConstituent(const std::string& name, ISvcLocator* pSvcLocator)
-  : Algorithm(name, pSvcLocator),
+  : AthAlgorithm(name, pSvcLocator),
     m_ContainerName("")
 {
   // Declare the properties
@@ -33,24 +31,15 @@ ReadConstituent<CONT>::ReadConstituent(const std::string& name, ISvcLocator* pSv
 template <class CONT> inline
 StatusCode ReadConstituent<CONT>::initialize()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::DEBUG << "in initialize()" << endreq;
+  ATH_MSG_DEBUG ("in initialize()");
 
   StatusCode sc;
 
-  // get StoreGate service
-  sc = service("StoreGateSvc",m_storeGate);
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "StoreGate service not found !" << endreq;
-      return StatusCode::FAILURE;
-    }
-
   // access Ntuple
   sc = accessNtuple();
   if (sc.isFailure())
     {
-      log << MSG::ERROR << "accessNtuple has failed !" << endreq;
+      ATH_MSG_ERROR ("accessNtuple has failed !");
       return StatusCode::FAILURE;
     }
 
@@ -59,8 +48,7 @@ StatusCode ReadConstituent<CONT>::initialize()
   
   if (sc.isFailure())
     {
-      log << MSG::ERROR 
-	  << "Could not add items to column wise ntuple" << endreq;
+      ATH_MSG_ERROR ("Could not add items to column wise ntuple");
       return StatusCode::FAILURE;
     }
 
@@ -73,22 +61,21 @@ StatusCode ReadConstituent<CONT>::initialize()
 template <class CONT> inline
 StatusCode ReadConstituent<CONT>::execute()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::DEBUG << "in execute()" << endreq;
+  ATH_MSG_DEBUG ("in execute()");
 
   StatusCode sc;
 
   // Retrieve presistified container
   CONT * pCont;
-  sc =m_storeGate->retrieve(pCont,m_ContainerName);
+  sc =evtStore()->retrieve(pCont,m_ContainerName);
   if (sc.isFailure())
     {
-      log << MSG::FATAL << "Container \""+m_ContainerName+"\" could not be retrieved from StoreGate !" << endreq;
+      ATH_MSG_FATAL ("Container \""+m_ContainerName+"\" could not be retrieved from StoreGate !");
       return StatusCode::FAILURE;
     }
 
  
-  log << MSG::DEBUG << "Container->size() : " << pCont->size() << endreq;
+  ATH_MSG_DEBUG ("Container->size() : " << pCont->size());
 
   m_nCon = 0;
 
@@ -104,7 +91,7 @@ StatusCode ReadConstituent<CONT>::execute()
       ++m_nCon;
     }
 
-  log << MSG::DEBUG << "execute() completed" << endreq;
+  ATH_MSG_DEBUG ("execute() completed");
  
   return StatusCode::SUCCESS;
 }
@@ -122,8 +109,6 @@ StatusCode ReadConstituent<CONT>::finalize()
 template <class CONT> inline
 StatusCode ReadConstituent<CONT>::accessNtuple()
 {
-  MsgStream log(messageService(), name());
-
   m_NtupleLocID = "/NTUPLES" + m_NtupleLocID ;
 
   //try to access it  
@@ -132,12 +117,11 @@ StatusCode ReadConstituent<CONT>::accessNtuple()
   if (static_cast<int>(nt))
     {
       m_ntuplePtr=nt;
-      log << MSG::INFO << "Ntuple " << m_NtupleLocID 
-	  << " reaccessed! " << endreq;
+      ATH_MSG_INFO ("Ntuple " << m_NtupleLocID << " reaccessed! ");
     } 
   else
     {
-      log << MSG::FATAL << "Cannot reaccess " << m_NtupleLocID << endreq;
+      ATH_MSG_FATAL ("Cannot reaccess " << m_NtupleLocID);
       return StatusCode::FAILURE;
     }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h
index 862f32348efa8933fed0a9cdc7d71259024842b1..85d48b54e62b854a2f3c784d8b2feecb13c1693c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadINav4MomAssocs.h
@@ -18,15 +18,12 @@
 // HepMC / CLHEP includes
 
 // FrameWork includes
-#include "GaudiKernel/Algorithm.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
 
 // DataModel includes
 #include "DataModel/ClassName.h"
 
-// Forward declaration
-class StoreGateSvc;
-
-class ReadINav4MomAssocs : public Algorithm
+class ReadINav4MomAssocs : public AthAlgorithm
 { 
 
   /////////////////////////////////////////////////////////////////// 
@@ -74,10 +71,6 @@ class ReadINav4MomAssocs : public Algorithm
   /// Default constructor: 
   ReadINav4MomAssocs();
 
-  /** Pointer to StoreGate
-   */
-  StoreGateSvc *m_storeGate;
-
   // Containers
   
   /** Input location of INav4MomAssocs container
@@ -95,32 +88,19 @@ class ReadINav4MomAssocs : public Algorithm
 template <typename ASSOCS>
 StatusCode ReadINav4MomAssocs::readAssocs( const std::string assocsName ) const
 {
-  StatusCode sc = StatusCode::SUCCESS;
-  MsgStream log( msgSvc(), name() );
-
-
   const ASSOCS * assocs = 0;
-  if ( m_storeGate->retrieve( assocs, assocsName ).isFailure() ||
-       0 == assocs ) {
-
-    log << MSG::ERROR
-	<< "Could not retrieve " << ClassName<ASSOCS>::name() << " at : "
-	<< assocsName
-	<< endreq;
-    return sc;
-  }
+  ATH_CHECK( evtStore()->retrieve( assocs, assocsName ) );
 
   typename ASSOCS::object_iterator objEnd = assocs->endObject();
   for ( typename ASSOCS::object_iterator objItr = assocs->beginObject();
 	objItr != objEnd;
 	++objItr ) {
-    log << MSG::INFO
-	<< "--> e= " << (*objItr)->e()
-	<< "\tnAssocs= " << assocs->getNumberOfAssociations(objItr)
-	<< endreq;
+    ATH_MSG_INFO
+      ( "--> e= " << (*objItr)->e()
+	<< "\tnAssocs= " << assocs->getNumberOfAssociations(objItr) ) ;
   }
 
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 #endif //> ANALYSISTEST_READINAV4MOMASSOCS_H
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.h
index 3587f996d5ab38ff26b7d93ec5edc9a9ef5e965c..2bd0edd2d075b804e37cb59c154e93ce7a2bd34e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.h
@@ -11,7 +11,7 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 class StoreGateSvc;
@@ -19,7 +19,7 @@ class StoreGateSvc;
 /////////////////////////////////////////////////////////////////////////////
 
 template <class PARTICLE>
-class ReadParticle : public Algorithm
+class ReadParticle : public AthAlgorithm
 {
 public:
   ReadParticle (const std::string& name, ISvcLocator* pSvcLocator);
@@ -32,7 +32,6 @@ protected:
 
   StatusCode accessNtuple();
 
-  StoreGateSvc * m_storeGate;
   NTuple::Tuple* m_ntuplePtr;
 
   // Container key
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.icc b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.icc
index f7dadbb48ccfc9a454d00b57492af87336a3d6a9..d495a5d2e508faeed58b6f2174cdf6e1570ae4c5 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.icc
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadParticle.icc
@@ -2,9 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "StoreGate/StoreGate.h"
-
-#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/SmartDataPtr.h"
 #include "GaudiKernel/IDataProviderSvc.h"
@@ -17,7 +14,7 @@ static const int MAX_nParticle = 128;
 
 template <class PARTICLE> inline
 ReadParticle<PARTICLE>::ReadParticle(const std::string& name, ISvcLocator* pSvcLocator)
-  : Algorithm(name, pSvcLocator),
+  : AthAlgorithm(name, pSvcLocator),
     m_ContainerName("")
 {
   // Declare the properties
@@ -31,38 +28,14 @@ ReadParticle<PARTICLE>::ReadParticle(const std::string& name, ISvcLocator* pSvcL
 template <class PARTICLE> inline
 StatusCode ReadParticle<PARTICLE>::initialize()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::DEBUG << "in initialize()" << endreq;
-
-  StatusCode sc;
-
-  // get StoreGate service
-  sc = service("StoreGateSvc",m_storeGate);
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "StoreGate service not found !" << endreq;
-      return StatusCode::FAILURE;
-    }
+  ATH_MSG_DEBUG ( "in initialize()" ) ;
 
-  // access Ntuple
-  sc = accessNtuple();
-  if (sc.isFailure())
-    {
-      log << MSG::ERROR << "accessNtuple has failed !" << endreq;
-      return StatusCode::FAILURE;
-    }
+  ATH_CHECK( accessNtuple() );
 
   // add items
-  sc = m_ntuplePtr -> addItem (m_prefix+"/nParticle", m_nParticle, 0, MAX_nParticle);
-  sc = m_ntuplePtr -> addItem (m_prefix+"/pt",        m_nParticle,  m_pt);
+  ATH_CHECK( m_ntuplePtr -> addItem (m_prefix+"/nParticle", m_nParticle, 0, MAX_nParticle) );
+  ATH_CHECK( m_ntuplePtr -> addItem (m_prefix+"/pt",        m_nParticle,  m_pt) );
   
-  if (sc.isFailure())
-    {
-      log << MSG::ERROR 
-	  << "Could not add items to column wise ntuple" << endreq;
-      return StatusCode::FAILURE;
-    }
-
   return StatusCode::SUCCESS;
 }
 
@@ -71,22 +44,13 @@ StatusCode ReadParticle<PARTICLE>::initialize()
 template <class PARTICLE> inline
 StatusCode ReadParticle<PARTICLE>::execute()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::DEBUG << "in execute()" << endreq;
-
-  StatusCode sc;
+  ATH_MSG_DEBUG ( "in execute()" ) ;
 
   // Retrieve presistified container
-  const PARTICLE * pCont;
-  sc =m_storeGate->retrieve(pCont,m_ContainerName);
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "Container \""+m_ContainerName+"\" could not be retrieved from StoreGate !" << endreq;
-      return StatusCode::FAILURE;
-    }
-
+  const PARTICLE * pCont = nullptr;
+  ATH_CHECK( evtStore()->retrieve(pCont,m_ContainerName) );
  
-  log << MSG::DEBUG << "Container->size() : " << pCont->size() << endreq;
+  ATH_MSG_DEBUG ( "Container->size() : " << pCont->size() ) ;
 
   m_nParticle = 0;
 
@@ -100,16 +64,14 @@ StatusCode ReadParticle<PARTICLE>::execute()
       // fill IParticle attributes
       m_pt      [m_nParticle] = (*itP)->pt();
 
-      log << MSG::DEBUG
-	  << MSG::dec
-	  << "#" << m_nParticle
-	  << " pt:"       << m_pt[m_nParticle]
-	  << endreq;
+      ATH_MSG_DEBUG ( MSG::dec
+                      << "#" << m_nParticle
+                      << " pt:"       << m_pt[m_nParticle] ) ;
       
       ++m_nParticle;
     }
 
- log << MSG::DEBUG << "execute() completed" << endreq;
+  ATH_MSG_DEBUG ( "execute() completed" ) ;
  
  return StatusCode::SUCCESS;
 }
@@ -127,8 +89,6 @@ StatusCode ReadParticle<PARTICLE>::finalize()
 template <class PARTICLE> inline
 StatusCode ReadParticle<PARTICLE>::accessNtuple()
 {
-  MsgStream log(messageService(), name());
-
   m_NtupleLocID = "/NTUPLES" + m_NtupleLocID ;
 
   //try to access it  
@@ -137,12 +97,12 @@ StatusCode ReadParticle<PARTICLE>::accessNtuple()
   if (static_cast<int>(nt))
     {
       m_ntuplePtr=nt;
-      log << MSG::INFO << "Ntuple " << m_NtupleLocID 
-	  << " reaccessed! " << endreq;
+      ATH_MSG_INFO ( "Ntuple " << m_NtupleLocID 
+                     << " reaccessed! " ) ;
     } 
   else
     {
-      log << MSG::FATAL << "Cannot reaccess " << m_NtupleLocID << endreq;
+      ATH_MSG_FATAL ( "Cannot reaccess " << m_NtupleLocID ) ;
       return StatusCode::FAILURE;
     }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrackParticle.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrackParticle.h
index 55361508e1b306e047d43e30e150ecab5cb53de5..70198295c20e81190263ac92dd3dcdee63c573d8 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrackParticle.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrackParticle.h
@@ -11,7 +11,6 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 #include "AnalysisTest/ReadConstituent.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrigger.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrigger.h
index 3a570d923cb462976ea0559fd3c523b6fa514886..15af4cf1dce6d56d074c29316bbdbc1ea05acdb2 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrigger.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadTrigger.h
@@ -11,14 +11,14 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 class StoreGateSvc;
 
 /////////////////////////////////////////////////////////////////////////////
 
-class ReadTrigger : public Algorithm
+class ReadTrigger : public AthAlgorithm
 {
 public:
   ReadTrigger (const std::string& name, ISvcLocator* pSvcLocator);
@@ -26,9 +26,6 @@ public:
   StatusCode initialize();
   StatusCode execute();
   StatusCode finalize();
-
-private:
-  StoreGateSvc * m_storeGate;
 };
 
 #endif
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadVxContainer.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadVxContainer.h
index 521c5c14d6ff045f022f6feb2655c852ff3f76ff..e6bd3f30f2f1bf91a09bc6020217ea5597eb9241 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadVxContainer.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/ReadVxContainer.h
@@ -11,7 +11,6 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 #include "AnalysisTest/ReadConstituent.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/Readegamma.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/Readegamma.h
index 9908490e8b49ce24287c1508e6f8ece2e310f57c..44b734cd491ece8f598d6881be66258bf5c45785 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/Readegamma.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/Readegamma.h
@@ -11,7 +11,6 @@
   @author Tadashi Maeno
 */
 
-#include "GaudiKernel/Algorithm.h"
 #include "GaudiKernel/NTuple.h"
 
 #include "AnalysisTest/ReadConstituent.h"
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h
index 13a7c66429ae51fee7470c55c3834aba42128c91..2e1aba44a1cd088f1742abd0938bb5278ce27263 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/AnalysisTest/WriteINav4MomAssocs.h
@@ -19,7 +19,7 @@
 // HepMC / CLHEP includes
 
 // FrameWork includes
-#include "GaudiKernel/Algorithm.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
 
 // DataModel includes
 #include "DataModel/ClassName.h"
@@ -27,10 +27,7 @@
 // NqvFourMom includes
 #include "NavFourMom/INavigable4MomentumCollection.h"
 
-// Forward declaration
-class StoreGateSvc;
-
-class WriteINav4MomAssocs : public Algorithm
+class WriteINav4MomAssocs : public AthAlgorithm
 { 
 
   /////////////////////////////////////////////////////////////////// 
@@ -81,9 +78,6 @@ class WriteINav4MomAssocs : public Algorithm
   /// Default constructor: 
   WriteINav4MomAssocs();
 
-  /// Pointer to StoreGate
-  StoreGateSvc *m_storeGate;
-
   // Containers
   
   /** Input location for ParticleJet container
@@ -111,16 +105,12 @@ template < typename INCOLL, typename OUTCOLL >
 StatusCode WriteINav4MomAssocs::symLink( const std::string& collName ) const
 {
   const INCOLL * inColl = 0;
-  if ( m_storeGate->retrieve( inColl, collName ).isFailure() ) {
-    MsgStream log( msgSvc(), name() );
-    log << MSG::ERROR
-	<< "Could not retrieve input coll [" << ClassName<INCOLL>::name() <<"]"
-	<< " from : " << collName << endreq;
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK ( evtStore()->retrieve( inColl, collName ) );
 
   const OUTCOLL * outColl = 0;
-  return m_storeGate->symLink( inColl, outColl );
+  ATH_CHECK ( evtStore()->symLink( inColl, outColl ) );
+
+  return StatusCode::SUCCESS;
 }
 
 #endif //> ANALYSISTEST_WRITEINAV4MOMASSOCS_H
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..95808060cece70d90939b82aa00dd6b9990f4d39
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/CMakeLists.txt
@@ -0,0 +1,48 @@
+################################################################################
+# Package: AnalysisTest
+################################################################################
+
+# Declare the package name:
+atlas_subdir( AnalysisTest )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          Control/DataModel
+                          Control/StoreGate
+                          Event/NavFourMom
+                          GaudiKernel
+                          PhysicsAnalysis/TruthParticleID/McParticleEvent
+                          Reconstruction/MuonIdentification/muonEvent
+                          Reconstruction/Particle
+                          Reconstruction/egamma/egammaEvent
+                          Reconstruction/tauEvent
+                          Tracking/TrkEvent/VxVertex
+                          PRIVATE
+                          AtlasTest/TestTools
+                          Control/AthenaBaseComps
+                          Event/EventKernel
+                          Event/FourMom
+                          Generators/GeneratorObjects
+                          PhysicsAnalysis/AnalysisCommon/AnalysisAssociation
+                          PhysicsAnalysis/AnalysisCommon/AnalysisUtils
+                          PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent
+                          PhysicsAnalysis/TruthParticleID/McParticleUtils
+                          Reconstruction/Jet/JetEvent
+                          TestPolicy )
+
+# External dependencies:
+find_package( CLHEP )
+find_package( CppUnit )
+find_package( HepMC )
+
+# Component(s) in the package:
+atlas_add_component( AnalysisTest
+                     src/*.cxx
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CPPUNIT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${HEPMC_LIBRARIES} ${CLHEP_LIBRARIES} ${CPPUNIT_LIBRARIES} DataModel StoreGateLib SGtests NavFourMom GaudiKernel McParticleEvent muonEvent Particle egammaEvent tauEvent VxVertex TestTools AthenaBaseComps EventKernel FourMom GeneratorObjects AnalysisAssociation AnalysisUtilsLib AnalysisTriggerEvent McParticleUtils JetEvent )
+
+# Install files from the package:
+atlas_install_headers( AnalysisTest )
+atlas_install_joboptions( share/*.py )
+
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/cmt/requirements b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/cmt/requirements
index d626a3e01e59f116f16d7e52d11f17ce8de270da..b7883770dbbdb1f152f63d2737f5f40d6d4d0b27 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/cmt/requirements
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/cmt/requirements
@@ -9,6 +9,7 @@ use TestTools             *                       AtlasTest
 
 use StoreGate             StoreGate-*             Control
 use DataModel             DataModel-*             Control
+use AthenaBaseComps       AthenaBaseComps-*       Control
 
 use NavFourMom            NavFourMom-*            Event
 
@@ -24,6 +25,7 @@ use McParticleEvent       McParticleEvent-*       PhysicsAnalysis/TruthParticleI
 private
 use AtlasCLHEP            *   External
 use AtlasHepMC            *   External
+use AthenaBaseComps       AthenaBaseComps-* Control
 
 use EventKernel           *   Event
 use FourMom               *   Event
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/NavTest.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/NavTest.cxx
index 7c5c444d243066fc3cedd2ee9d6dc474bc91fef1..fcac5bc5f8b5c4a6a789188cee8e0eabd3483d23 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/NavTest.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/NavTest.cxx
@@ -4,35 +4,20 @@
 
 #include "AnalysisTest/NavTest.h"
 
-#include "StoreGate/StoreGate.h"
-#include "GaudiKernel/MsgStream.h"
-
 #include "egammaEvent/ElectronContainer.h"
 #include "GeneratorObjects/McEventCollection.h"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 NavTest::NavTest(const std::string& name, ISvcLocator* pSvcLocator)
-  : Algorithm(name, pSvcLocator)
+  : AthAlgorithm(name, pSvcLocator)
 {}
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 StatusCode NavTest::initialize()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO << "in initialize()" << endreq;
-
-  StatusCode sc;
-
-  // get StoreGate service
-  sc = service("StoreGateSvc",m_storeGate);
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "StoreGate service not found !" << endreq;
-      return StatusCode::FAILURE;
-    }
-
+  ATH_MSG_INFO ( "in initialize()" ) ;
   return StatusCode::SUCCESS;
 }
 
@@ -40,64 +25,48 @@ StatusCode NavTest::initialize()
 
 StatusCode NavTest::execute()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO << "in execute()" << endreq;
-
-  StatusCode sc;
+  ATH_MSG_INFO ( "in execute()" ) ;
 
   // Retrieve Electron from AOD
-  const ElectronContainer * eCont;
-  sc =m_storeGate->retrieve(eCont, "ElectronCollection");
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "Electron could not be retrieved from StoreGate !" << endreq;
-      return StatusCode::FAILURE;
-    }
+  const ElectronContainer * eCont = nullptr;
+  ATH_CHECK( evtStore()->retrieve(eCont, "ElectronCollection") );
 
-  log << MSG::INFO << " --- " << endreq;
-  log << MSG::INFO << "Electron Size : " << eCont->size() << endreq;
+  ATH_MSG_INFO ( " --- " ) ;
+  ATH_MSG_INFO ( "Electron Size : " << eCont->size() ) ;
 
   // loop over all Electron
-  ElectronContainer::const_iterator itE  = eCont->begin();
-  ElectronContainer::const_iterator itEe = eCont->end();
-  for (; itE != itEe; ++itE)
+  for (const Analysis::Electron* ele : *eCont)
     {
-      log << MSG::INFO << "Electron pT : " << (*itE)->pt() << endreq;
+      ATH_MSG_INFO ( "Electron pT : " << ele->pt() ) ;
 
       // get TrackParticle via ElementLink
-      const Rec::TrackParticle *track = (*itE)->trackParticle();
+      const Rec::TrackParticle *track = ele->trackParticle();
       if (track == 0)
-	log << MSG::INFO << "No Track" << endreq;	
+	ATH_MSG_INFO ( "No Track" ) ;	
       else
-	log << MSG::INFO << "Track charge : " << track->charge() << endreq;		
+	ATH_MSG_INFO ( "Track charge : " << track->charge() ) ;		
 
       // get LAr cluster from ESD via ElementLink of egamma
-      const CaloCluster *cls = (*itE)->cluster();
+      const CaloCluster *cls = ele->cluster();
       if (cls == 0)
 	{
-	  log << MSG::INFO << "Null LArCluster" << endreq;
+	  ATH_MSG_INFO ( "Null LArCluster" ) ;
 	  continue;
 	}
-      log << MSG::INFO << "LArCluster eta0 : " << cls->eta0() << endreq;
+      ATH_MSG_INFO ( "LArCluster eta0 : " << cls->eta0() ) ;
     }
 
   // Retrieve G4Truth directly from ESD
-  const McEventCollection * g4Cont;
-  sc =m_storeGate->retrieve(g4Cont, "G4Truth");
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "G4Truth could not be retrieved from StoreGate !" << endreq;
-      return StatusCode::FAILURE;
-    }
+  const McEventCollection * g4Cont = nullptr;
+  ATH_CHECK( evtStore()->retrieve(g4Cont, "G4Truth") );
 
-  log << MSG::INFO << " --- " << endreq;
-  log << MSG::INFO << "G4Truth Size : " << g4Cont->size() << endreq;
+  ATH_MSG_INFO ( " --- " ) ;
+  ATH_MSG_INFO ( "G4Truth Size : " << g4Cont->size() ) ;
 
   // loop over all McEvent
-  McEventCollection::const_iterator itG  = g4Cont->begin();
-  McEventCollection::const_iterator itGe = g4Cont->end();
-  for (; itG != itGe; ++itG)
-    log << MSG::INFO << "Size of particles : " << (*itG)->particles_size() << endreq;
+  for (const HepMC::GenEvent* ev : *g4Cont) {
+    ATH_MSG_INFO ( "Size of particles : " << ev->particles_size() ) ;
+  }
 
  return StatusCode::SUCCESS;
 }
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadINav4MomAssocs.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadINav4MomAssocs.cxx
index 782954a248ecae4fd668a310799cfddf533dda5b..3245dfa39f716f1021f6b1d2db044e91d718ae01 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadINav4MomAssocs.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadINav4MomAssocs.cxx
@@ -12,12 +12,8 @@
 // STL includes
 
 // FrameWork includes
-#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/Property.h"
 
-// StoreGate
-#include "StoreGate/StoreGateSvc.h"
-
 // NavFourMom includes
 #include "NavFourMom/INav4MomAssocs.h"
 
@@ -31,9 +27,8 @@
 /// Constructors
 ////////////////
 ReadINav4MomAssocs::ReadINav4MomAssocs( const std::string& name, 
-			      ISvcLocator* pSvcLocator ) : 
-  Algorithm( name, pSvcLocator ),
-  m_storeGate  ( 0 )
+                                        ISvcLocator* pSvcLocator ) : 
+  AthAlgorithm( name, pSvcLocator )
 {
   //
   // Property declaration
@@ -46,55 +41,27 @@ ReadINav4MomAssocs::ReadINav4MomAssocs( const std::string& name,
 ///////////////
 ReadINav4MomAssocs::~ReadINav4MomAssocs()
 { 
-  MsgStream log( msgSvc(), name() );
-  log << MSG::DEBUG << "Calling destructor" << endreq;
+  ATH_MSG_DEBUG ( "Calling destructor" ) ;
 }
 
 /// Athena Algorithm's Hooks
 ////////////////////////////
 StatusCode ReadINav4MomAssocs::initialize()
 {
-  MsgStream log( msgSvc(), name() );
-
-  log << MSG::INFO 
-      << "Initializing " << name() << "..." 
-      << endreq;
-
-  // Get pointer to StoreGateSvc and cache it :
-  if ( !service( "StoreGateSvc", m_storeGate ).isSuccess() ) {
-    log << MSG::ERROR 	
-	<< "Unable to retrieve pointer to StoreGateSvc"
-	<< endreq;
-    return StatusCode::FAILURE;
-  }
-  
+  ATH_MSG_INFO ( "Initializing " << name() << "..." ) ;
   return StatusCode::SUCCESS;
 }
 
 StatusCode ReadINav4MomAssocs::finalize()
 {
-  MsgStream log( msgSvc(), name() );
-  log << MSG::INFO 
-      << "Finalizing " << name() << "..." 
-      << endreq;
-
+  ATH_MSG_INFO ( "Finalizing " << name() << "..." ) ;
   return StatusCode::SUCCESS;
 }
 
 StatusCode ReadINav4MomAssocs::execute()
 {  
-  MsgStream log( msgSvc(), name() );
-
-  log << MSG::DEBUG << "Executing " << name() << "..." 
-      << endreq;
-
-  if ( !readAssocs<INav4MomAssocs>( m_inavAssocsName ).isSuccess() ) {
-    log << MSG::ERROR
-	<< "Could not perform reading test of INav4MomAssocs !!"
-	<< endreq;
-    return StatusCode::FAILURE;
-  }
-
+  ATH_MSG_DEBUG ( "Executing " << name() << "..." ) ;
+  ATH_CHECK( readAssocs<INav4MomAssocs>( m_inavAssocsName ) );
   return StatusCode::SUCCESS;
 }
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadTrigger.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadTrigger.cxx
index ac9b925068c0c650d00428cbb32a9d74558fdfa4..78e1e6a3f2e41eb3490fa7a1cc43c9e7e93374a7 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadTrigger.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/ReadTrigger.cxx
@@ -4,34 +4,19 @@
 
 #include "AnalysisTest/ReadTrigger.h"
 
-#include "StoreGate/StoreGate.h"
-#include "GaudiKernel/MsgStream.h"
 #include "AnalysisTriggerEvent/CTP_Decision.h"
 #include "AnalysisTriggerEvent/LVL1_ROI.h"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 ReadTrigger::ReadTrigger(const std::string& name, ISvcLocator* pSvcLocator)
-  : Algorithm(name, pSvcLocator)
+  : AthAlgorithm(name, pSvcLocator)
 {}
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 StatusCode ReadTrigger::initialize()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::DEBUG << "in initialize()" << endreq;
-
-  StatusCode sc;
-
-  // get StoreGate service
-  sc = service("StoreGateSvc",m_storeGate);
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "StoreGate service not found !" << endreq;
-      return StatusCode::FAILURE;
-    }
-
   return StatusCode::SUCCESS;
 }
 
@@ -39,79 +24,54 @@ StatusCode ReadTrigger::initialize()
 
 StatusCode ReadTrigger::execute()
 {
-  MsgStream log(msgSvc(), name());
-  log << MSG::DEBUG << "in execute()" << endreq;
-
-  StatusCode sc;
+  ATH_MSG_DEBUG ("in execute()");
 
   // Retrieve CTP
-  const CTP_Decision * ctpDecision;
-  sc =m_storeGate->retrieve(ctpDecision);
-  if (sc.isFailure())
+  const CTP_Decision * ctpDecision = 0;
+  ATH_CHECK( evtStore()->retrieve(ctpDecision) );
+
+  ATH_MSG_DEBUG ("word0 : " << MSG::hex << ctpDecision->getWord0());
+  ATH_MSG_DEBUG ("word1 : " << MSG::hex << ctpDecision->getWord1());
+  ATH_MSG_DEBUG ("word2 : " << MSG::hex << ctpDecision->getWord2());
+  ATH_MSG_DEBUG ("word3 : " << MSG::hex << ctpDecision->getWord3());
+  ATH_MSG_DEBUG ("word4 : " << MSG::hex << ctpDecision->getWord4());
+  ATH_MSG_DEBUG ("word5 : " << MSG::hex << ctpDecision->getWord5());
+  ATH_MSG_DEBUG ("word6 : " << MSG::hex << ctpDecision->getWord6());
+  ATH_MSG_DEBUG ("word7 : " << MSG::hex << ctpDecision->getWord7());
+
+  for (const auto& item : ctpDecision->getItems())
     {
-      log << MSG::FATAL << "CTP_Decision could not be retrieved from StoreGate !" << endreq;
-      return StatusCode::FAILURE;
-    }
-
-  log << MSG::DEBUG << "word0 : " << MSG::hex << ctpDecision->getWord0() << endreq;
-  log << MSG::DEBUG << "word1 : " << MSG::hex << ctpDecision->getWord1() << endreq;
-  log << MSG::DEBUG << "word2 : " << MSG::hex << ctpDecision->getWord2() << endreq;
-  log << MSG::DEBUG << "word3 : " << MSG::hex << ctpDecision->getWord3() << endreq;
-  log << MSG::DEBUG << "word4 : " << MSG::hex << ctpDecision->getWord4() << endreq;
-  log << MSG::DEBUG << "word5 : " << MSG::hex << ctpDecision->getWord5() << endreq;
-  log << MSG::DEBUG << "word6 : " << MSG::hex << ctpDecision->getWord6() << endreq;
-  log << MSG::DEBUG << "word7 : " << MSG::hex << ctpDecision->getWord7() << MSG::dec << endreq;
-
-  CTP_Decision::items_type::const_iterator itCTP  = (ctpDecision->getItems()).begin();
-  CTP_Decision::items_type::const_iterator itCTPe = (ctpDecision->getItems()).end();
-  for (; itCTP != itCTPe; ++itCTP)
-    {
-      log << MSG::DEBUG << "item : " << *itCTP << endreq;
+      ATH_MSG_DEBUG ("item : " << item);
     }
 
   // Retrieve LVL1 ROI
-  const LVL1_ROI * roi;
-  sc =m_storeGate->retrieve(roi);
-  if (sc.isFailure())
-    {
-      log << MSG::FATAL << "LVL1_ROI could not be retrieved from StoreGate !" << endreq;
-      return StatusCode::FAILURE;
-    }
+  const LVL1_ROI* roi = 0;
+  ATH_CHECK( evtStore()->retrieve(roi) );
 
-  LVL1_ROI::muons_type::const_iterator itMU  = (roi->getMuonROIs()).begin();
-  LVL1_ROI::muons_type::const_iterator itMUe = (roi->getMuonROIs()).end();
-  for (; itMU != itMUe; ++itMU)
+  for (const auto& item : roi->getMuonROIs())
     {
-      log << MSG::DEBUG << "Mu : " << itMU->getEta() << " " << itMU->getPhi() << endreq;
+      ATH_MSG_DEBUG ("Mu : " << item.getEta() << " " << item.getPhi());
     }
 
-  LVL1_ROI::emtaus_type::const_iterator itEM  = (roi->getEmTauROIs()).begin();
-  LVL1_ROI::emtaus_type::const_iterator itEMe = (roi->getEmTauROIs()).end();
-  for (; itEM != itEMe; ++itEM)
+  for (const auto& item : roi->getEmTauROIs())
     {
-      log << MSG::DEBUG << "EmTau : " << itEM->getEta() << " " << itEM->getPhi() << endreq;
+      ATH_MSG_DEBUG ("EmTau : " << item.getEta() << " " << item.getPhi());
     }
 
-  LVL1_ROI::jets_type::const_iterator itJET  = (roi->getJetROIs()).begin();
-  LVL1_ROI::jets_type::const_iterator itJETe = (roi->getJetROIs()).end();
-  for (; itJET != itJETe; ++itJET)
+  for (const auto& item : roi->getJetROIs())
     {
-      log << MSG::DEBUG << "Jet : " << itJET->getEta() << " " << itJET->getPhi() << endreq;
+      ATH_MSG_DEBUG ("Jet : " << item.getEta() << " " << item.getPhi());
     }
  
-  LVL1_ROI::jetets_type::const_iterator itJetET  = (roi->getJetEtROIs()).begin();
-  LVL1_ROI::jetets_type::const_iterator itJetETe = (roi->getJetEtROIs()).end();
-  for (; itJetET != itJetETe; ++itJetET)
+  for (const auto& item : roi->getJetEtROIs())
     {
-      log << MSG::DEBUG << "JetET : " << MSG::hex << itJetET->getROIWord() << MSG::dec << endreq;
+      ATH_MSG_DEBUG ("JetET : " << MSG::hex << item.getROIWord() << MSG::dec);
     }
  
-  LVL1_ROI::energysums_type::const_iterator itES  = (roi->getEnergySumROIs()).begin();
-  LVL1_ROI::energysums_type::const_iterator itESe = (roi->getEnergySumROIs()).end();
-  for (; itES != itESe; ++itES)
+  for (const auto& item : roi->getEnergySumROIs())
     {
-      log << MSG::DEBUG << "EnergySum : " << itES->getEnergyX() << " "
-	  << itES->getEnergyY() << " " << itES->getEnergyT() << endreq;
+      ATH_MSG_DEBUG ("EnergySum : " << item.getEnergyX() << " "
+                     << item.getEnergyY() << " " << item.getEnergyT());
     }
  
  return StatusCode::SUCCESS;
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/Readegamma.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/Readegamma.cxx
index 6e44da250a16abbed0174ab06df33f827e88b668..a9af7be23b98792b7ee34906ace6f5a8087b6c76 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/Readegamma.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/Readegamma.cxx
@@ -13,19 +13,17 @@ StatusCode Readegamma::userInit()
 
 StatusCode Readegamma::userExec(const egamma *val)
 {
-  MsgStream log(msgSvc(), name());
-
   m_e [m_nCon] = val->e();
 
   // get LAr cluster
   const CaloCluster *cls = val->cluster();
   if (cls == 0)
     {
-      log << MSG::INFO << "Null LArCluster" << endreq;
+      ATH_MSG_INFO ( "Null LArCluster" ) ;
     }
   else
     {
-      log << MSG::INFO << "LArCluster eta0: " << cls->eta0() << endreq;
+      ATH_MSG_INFO ( "LArCluster eta0: " << cls->eta0() ) ;
     }
 
   // get TrackParticle
@@ -33,11 +31,11 @@ StatusCode Readegamma::userExec(const egamma *val)
   tp = val->trackParticle();
   if (tp == 0)
     {
-      log << MSG::INFO << "Null TrackParticle" << endreq;
+      ATH_MSG_INFO ( "Null TrackParticle" ) ;
     }
   else
     {
-      log << MSG::INFO << "TrackParticle charge: " << tp->charge() << endreq;
+      ATH_MSG_INFO ( "TrackParticle charge: " << tp->charge() ) ;
     }
 
   return StatusCode::SUCCESS;
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/WriteINav4MomAssocs.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/WriteINav4MomAssocs.cxx
index 57c1ee04e2f3fcdceefc1ffadd00fc80a792f115..8605acd0481d5fcfc937bc1273d71b2129d9ad85 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/WriteINav4MomAssocs.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/src/WriteINav4MomAssocs.cxx
@@ -12,7 +12,6 @@
 // STL includes
 
 // FrameWork includes
-#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/Property.h"
 
 // StoreGate
@@ -38,8 +37,7 @@
 ////////////////
 WriteINav4MomAssocs::WriteINav4MomAssocs( const std::string& name, 
 					  ISvcLocator* pSvcLocator ) : 
-  Algorithm( name, pSvcLocator ),
-  m_storeGate  ( 0 )
+  AthAlgorithm( name, pSvcLocator )
 {
   //
   // Property declaration
@@ -54,85 +52,36 @@ WriteINav4MomAssocs::WriteINav4MomAssocs( const std::string& name,
 ///////////////
 WriteINav4MomAssocs::~WriteINav4MomAssocs()
 { 
-  MsgStream log( msgSvc(), name() );
-  log << MSG::DEBUG << "Calling destructor" << endreq;
+  ATH_MSG_DEBUG ( "Calling destructor" ) ;
 }
 
 /// Athena Algorithm's Hooks
 ////////////////////////////
 StatusCode WriteINav4MomAssocs::initialize()
 {
-  StatusCode sc;
-  MsgStream log( msgSvc(), name() );
-
-  log << MSG::INFO 
-      << "Initializing " << name() << "..." 
-      << endreq;
-
-  // Get pointer to StoreGateSvc and cache it :
-  sc = service( "StoreGateSvc", m_storeGate );
-  if ( sc.isFailure() ) {
-    log << MSG::ERROR 	
-	<< "Unable to retrieve pointer to StoreGateSvc"
-	<< endreq;
-    return sc;
-  }
-  
-  return sc;
+  ATH_MSG_INFO ( "Initializing " << name() << "..." ) ;
+  return StatusCode::SUCCESS;
 }
 
 StatusCode WriteINav4MomAssocs::finalize()
 {
-  MsgStream log( msgSvc(), name() );
-  log << MSG::INFO 
-      << "Finalizing " << name() << "..." 
-      << endreq;
-
+  ATH_MSG_INFO ( "Finalizing " << name() << "..." ) ;
   return StatusCode::SUCCESS;
 }
 
 StatusCode WriteINav4MomAssocs::execute()
 {  
-  MsgStream log( msgSvc(), name() );
-
-  log << MSG::DEBUG << "Executing " << name() << "..." 
-      << endreq;
-
-  if ( this->symLink<ElectronContainer,INavigable4MomentumCollection>(m_electronsName).isFailure() ) {
-    log << MSG::ERROR
-	<< "Could not symLink " << m_electronsName << " to INav4Moms !"
-	<< endreq;
-    return StatusCode::FAILURE;
-  }
+  ATH_MSG_DEBUG ( "Executing " << name() << "..." ) ;
 
-  if ( this->symLink<JetCollection,INavigable4MomentumCollection>(m_jetsName).isFailure() ) {
-    log << MSG::ERROR
-	<< "Could not symLink " << m_jetsName << " to INav4Moms !"
-	<< endreq;
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( (this->symLink<ElectronContainer,INavigable4MomentumCollection>(m_electronsName)) );
+  
+  ATH_CHECK( (this->symLink<JetCollection,INavigable4MomentumCollection>(m_jetsName)) );
 
   const INavigable4MomentumCollection * jets = 0;
-  if ( m_storeGate->retrieve( jets, m_jetsName ).isFailure() ||
-       0 == jets ) {
-
-    log << MSG::ERROR
-	<< "Could not retrieve INavigable4MomentumCollection at : "
-	<< m_jetsName
-	<< endreq;
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( evtStore()->retrieve( jets, m_jetsName ) );
 
   const INavigable4MomentumCollection * electrons = 0;
-  if ( m_storeGate->retrieve( electrons, m_electronsName ).isFailure() ||
-       0 == electrons ) {
-
-    log << MSG::ERROR
-	<< "Could not retrieve INavigable4MomentumCollection at : "
-	<< m_electronsName
-	<< endreq;
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( evtStore()->retrieve( electrons, m_electronsName ) );
 
   return buildAssocs( jets, electrons );
 }
@@ -156,54 +105,28 @@ StatusCode
 WriteINav4MomAssocs::buildAssocs( const INavigable4MomentumCollection * coll1,
 				  const INavigable4MomentumCollection * coll2 ) const
 {
-  MsgStream log( msgSvc(), name() );
-  log << MSG::DEBUG << "in buildINav4MomAssocs..." << endreq;
+  ATH_MSG_DEBUG ( "in buildINav4MomAssocs..." ) ;
 
   INav4MomAssocs * assocs = new INav4MomAssocs;
-  if ( m_storeGate->record( assocs, m_inavAssocsOutputName ).isFailure() ) {
-    log << MSG::ERROR
-	<< "Could not record INav4MomAssocs at : " << m_inavAssocsOutputName
-	<< endreq;
-    return StatusCode::SUCCESS;
-  }
-  if ( m_storeGate->setConst( assocs ).isFailure() ) {
-    log << MSG::ERROR
-	<< "Could not setConst INav4MomAssocs at : " << m_inavAssocsOutputName
-	<< endreq;
-    return StatusCode::SUCCESS;
-  }
-
-  INavigable4MomentumCollection::const_iterator end1 = coll1->end();
-  INavigable4MomentumCollection::const_iterator end2 = coll2->end();
-
-  for ( INavigable4MomentumCollection::const_iterator itr1 = coll1->begin();
-	itr1 != end1;
-	++itr1 ) {
-    for ( INavigable4MomentumCollection::const_iterator itr2 = coll2->begin();
-	  itr2 != end2;
-	  ++itr2 ) {
-      assocs->addAssociation( coll1, *itr1, coll2, *itr2 );
-      if ( log.level() <= MSG::DEBUG ) {
-	log << MSG::DEBUG
-	    << "Assoc: [jet-ele] ene= " 
-	    << (*itr1)->e() / CLHEP::GeV
-	    << "\t"
-	    << (*itr2)->e() / CLHEP::GeV
-	    << endreq;
-      }
+  ATH_CHECK( evtStore()->record( assocs, m_inavAssocsOutputName ) );
+  ATH_CHECK( evtStore()->setConst( assocs ) );
+
+  for (const INavigable4Momentum* m1 : *coll1) {
+    for (const INavigable4Momentum* m2 : *coll2) {
+      assocs->addAssociation( coll1, m1, coll2, m2 );
+      ATH_MSG_DEBUG ( "Assoc: [jet-ele] ene= " 
+                      << m1->e() / CLHEP::GeV
+                      << "\t"
+                      << m2->e() / CLHEP::GeV ) ;
     }//> end loop over electrons
   }//> end loop over jets
 
-  log << MSG::DEBUG << "Print content of association map: [INav4MomAssocs]" 
-      << endreq;
   INav4MomAssocs::object_iterator objEnd = assocs->endObject();
   for ( INav4MomAssocs::object_iterator objItr = assocs->beginObject();
 	objItr != objEnd;
 	++objItr ) {
-    log << MSG::INFO
-	<< "--> e= " << (*objItr)->e() / CLHEP::GeV
-	<< "\tnAssocs= " << assocs->getNumberOfAssociations(objItr)
-	<< endreq;
+    ATH_MSG_INFO ( "--> e= " << (*objItr)->e() / CLHEP::GeV
+                   << "\tnAssocs= " << assocs->getNumberOfAssociations(objItr) ) ;
   }
 
   return StatusCode::SUCCESS;