From 8e7e93c25509844683119e927f9c1a0b481cd95f Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 18 Oct 2017 05:16:13 +0200
Subject: [PATCH] IOVSvc: Clean up CondInputLoader::initialize().

Local variables should not start with m_.
Use ATH_CHECK where appropriate.
---
 Control/IOVSvc/src/CondInputLoader.cxx | 29 +++++---------------------
 1 file changed, 5 insertions(+), 24 deletions(-)

diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx
index 4fb6be672df..1caaa26532e 100644
--- a/Control/IOVSvc/src/CondInputLoader.cxx
+++ b/Control/IOVSvc/src/CondInputLoader.cxx
@@ -69,36 +69,17 @@ CondInputLoader::initialize()
 {
   ATH_MSG_INFO ("Initializing " << name() << "...");
 
-  if (!m_condSvc.isValid()) {
-    ATH_MSG_ERROR("could not get the CondSvc");
-    return StatusCode::FAILURE;
-  }
-
-  if (!m_condStore.isValid()) {
-    ATH_MSG_ERROR("could not get the ConditionStore");
-    return StatusCode::FAILURE;
-  }
-
+  ATH_CHECK( m_condSvc.retrieve() );
+  ATH_CHECK( m_condStore.retrieve() );
+  ATH_CHECK( m_clidSvc.retrieve() );
 
   // Trigger read of IOV database
   ServiceHandle<IIOVSvc> ivs("IOVSvc",name());
-  if (!ivs.isValid()) {
-    ATH_MSG_FATAL("unable to retrieve IOVSvc");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( ivs.retrieve() );
 
   // Update the SG keys if different from Folder Names
   ServiceHandle<IIOVDbSvc> idb("IOVDbSvc",name());
-  if (!idb.isValid()) {
-    ATH_MSG_FATAL("unable to retrieve IOVDbSvc");
-    return StatusCode::FAILURE;
-  }
-
-  ServiceHandle<IClassIDSvc> m_clidSvc("ClassIDSvc", name());
-  if (!m_clidSvc.isValid()) {
-    ATH_MSG_FATAL("unable to retrieve ClassIDSvc");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK( idb.retrieve() );
 
   std::vector<std::string> keys = idb->getKeyList();
   std::string folderName, tg;
-- 
GitLab