diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx index 4fb6be672dfb76f5491fb2a1f4dfdb0b03a7ba53..1caaa26532ec1c3d439e946b06076bac1cc637c5 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;