diff --git a/MuonSpectrometer/MuonIdHelpers/src/CscIdHelper.cxx b/MuonSpectrometer/MuonIdHelpers/src/CscIdHelper.cxx index 6c066b9813ab49a8ddef492cf90a7c963e194a2a..1369c91499b7f81aa46f20b6533e7565dad26ea1 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/CscIdHelper.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/CscIdHelper.cxx @@ -53,7 +53,6 @@ int CscIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_CHAMBERLAYER_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'chamberLayer' field " << endmsg; } - status = 1; } field = m_dict->find_field("wireLayer"); @@ -61,7 +60,6 @@ int CscIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_WIRELAYER_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'wireLayer' field " << endmsg; } - status = 1; } field = m_dict->find_field("cscMeasuresPhi"); @@ -69,7 +67,6 @@ int CscIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_MEASURESPHI_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'cscMeasuresPhi' field " << endmsg; } - status = 1; } field = m_dict->find_field("cscStrip"); @@ -77,7 +74,6 @@ int CscIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_CHANNEL_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'cscStrip' field " << endmsg; } - status = 1; } // initialize the multilayer index diff --git a/MuonSpectrometer/MuonIdHelpers/src/MdtIdHelper.cxx b/MuonSpectrometer/MuonIdHelpers/src/MdtIdHelper.cxx index c917eb1afc065cdcd86a9210a67ed01ae4366a3b..86a7023233066dc634facd0bc1602668a945e944 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/MdtIdHelper.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/MdtIdHelper.cxx @@ -207,29 +207,26 @@ int MdtIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { if (m_full_module_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MDT MultiRange ID is empty for modules" << endmsg; } - status = 1; } /// test to see that the detector element multi range is not empty if (m_full_detectorElement_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MDT MultiRange ID is empty for detector elements" << endmsg; } - status = 1; } /// test to see that the tube multi range is not empty if (m_full_channel_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MDT MultiRange ID is empty for channels" << endmsg; } - status = 1; } // Setup the hash tables for MDT if (m_msgSvc) { log << MSG::INFO << "Initializing MDT hash indices ... " << endmsg; } - status = init_hashes(); - status = init_detectorElement_hashes(); - status = init_id_to_hashes(); + init_hashes(); + init_detectorElement_hashes(); + init_id_to_hashes(); // Setup hash tables for finding neighbors diff --git a/MuonSpectrometer/MuonIdHelpers/src/MmIdHelper.cxx b/MuonSpectrometer/MuonIdHelpers/src/MmIdHelper.cxx index 328aec218779ea406ecd7aa6757fd52bdcfa310e..18974a0d69705e4990fcc8eaf5edbea017f7cb6c 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/MmIdHelper.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/MmIdHelper.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "MuonIdHelpers/MmIdHelper.h" @@ -203,26 +203,23 @@ int MmIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { // test to see that the multi range is not empty if (m_full_module_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MicroMegas MultiRange ID is empty for modules" << endmsg; } - status = 1; } // test to see that the detector element multi range is not empty if (m_full_detectorElement_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MicroMegas MultiRange ID is empty for detector elements" << endmsg; } - status = 1; } // test to see that the multi range is not empty if (m_full_channel_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MicroMegas MultiRange ID is empty for channels" << endmsg; } - status = 1; } // Setup the hash tables for MicroMegas if (m_msgSvc) { log << MSG::INFO << "Initializing MicroMegas hash indices ... " << endmsg; } - status = init_hashes(); - status = init_detectorElement_hashes(); // same as module hash - status = init_id_to_hashes(); + init_hashes(); + init_detectorElement_hashes(); // same as module hash + init_id_to_hashes(); /* //comment out this bit to test the identifiers diff --git a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx index 65fdf112607437924d0ca9011353c98cd7885b4d..30032d8bdc00062bc7b749deac8ea3998d7cbfd2 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/MuonIdHelperSvc.cxx @@ -161,7 +161,10 @@ namespace Muon { data.chIndex = MuonStationIndex::BIS; } } - + if (data.chIndex <0){ + ATH_MSG_ERROR("data.chIndex is negative in MuonIdHelperSvc::initialize "); + return StatusCode::FAILURE; + } data.stIndex = MuonStationIndex::toStationIndex(data.chIndex); if (msgLvl(MSG::DEBUG)) { diff --git a/MuonSpectrometer/MuonIdHelpers/src/RpcIdHelper.cxx b/MuonSpectrometer/MuonIdHelpers/src/RpcIdHelper.cxx index 4c8fa8f8a09ef166e45361ab951984687500b59f..b719e891a48fcdac3bad532a85028dc6cc3d7401 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/RpcIdHelper.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/RpcIdHelper.cxx @@ -230,7 +230,6 @@ int RpcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { // test to see that the multi range is not empty if (m_full_module_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "RPC MultiRange ID is empty for modules" << endmsg; } - status = 1; } else { if (m_msgSvc) { log << MSG::DEBUG << " full module range size is " << m_full_module_range.size() << endmsg; } } @@ -238,22 +237,20 @@ int RpcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { /// test to see that the detectorElement multi range is not empty if (m_full_detectorElement_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "MDT MultiRange ID is empty for detector elements" << endmsg; } - status = 1; } // test to see that the multi range is not empty if (m_full_channel_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "RPC MultiRange ID is empty for channels" << endmsg; } - status = 1; } else { if (m_msgSvc) { log << MSG::DEBUG << " full channel range size is " << m_full_channel_range.size() << endmsg; } } // Setup the hash tables for RPC if (m_msgSvc) { log << MSG::INFO << "Initializing RPC hash indices ... " << endmsg; } - status = init_hashes(); - status = init_detectorElement_hashes(); // doubletZ - status = init_id_to_hashes(); + init_hashes(); + init_detectorElement_hashes(); // doubletZ + init_id_to_hashes(); // Setup hash tables for finding neighbors if (m_msgSvc) { log << MSG::INFO << "Initializing RPC hash indices for finding neighbors ... " << endmsg; } diff --git a/MuonSpectrometer/MuonIdHelpers/src/TgcIdHelper.cxx b/MuonSpectrometer/MuonIdHelpers/src/TgcIdHelper.cxx index 1a7d117fd07531534ed60c381d9a9ca569d8a91d..9e0d5a0f2fef9096219b1b2d0da4e46587d1c228 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/TgcIdHelper.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/TgcIdHelper.cxx @@ -42,7 +42,6 @@ int TgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_GASGAP_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'tgcGasGap' field " << endmsg; } - status = 1; } field = m_dict->find_field("isStrip"); @@ -50,7 +49,6 @@ int TgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_ISSTRIP_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'isStrip' field " << endmsg; } - status = 1; } field = m_dict->find_field("channel"); @@ -58,7 +56,6 @@ int TgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_CHANNEL_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find channel' field " << endmsg; } - status = 1; } // reinitialize the module ndex @@ -213,9 +210,9 @@ int TgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { // Setup the hash tables for TGC if (m_msgSvc) { log << MSG::INFO << "Initializing TGC hash indices ... " << endmsg; } - status = init_hashes(); - status = init_detectorElement_hashes(); // same as module hash - status = init_id_to_hashes(); + init_hashes(); + init_detectorElement_hashes(); // same as module hash + init_id_to_hashes(); // Setup hash tables for finding neighbors if (m_msgSvc) { log << MSG::INFO << "Initializing TGC hash indices for finding neighbors ... " << endmsg; } diff --git a/MuonSpectrometer/MuonIdHelpers/src/sTgcIdHelper.cxx b/MuonSpectrometer/MuonIdHelpers/src/sTgcIdHelper.cxx index 67ac0c24f8c7262d5b6039b6e0d93269ca5b9eea..46c2b2ecea2a2bfc118fe0f7788fd61750364297 100644 --- a/MuonSpectrometer/MuonIdHelpers/src/sTgcIdHelper.cxx +++ b/MuonSpectrometer/MuonIdHelpers/src/sTgcIdHelper.cxx @@ -51,7 +51,6 @@ int sTgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_DETECTORELEMENT_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'stgcMultilayer' field " << endmsg; } - status = 1; } field = m_dict->find_field("stgcGasGap"); @@ -59,7 +58,6 @@ int sTgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_GASGAP_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'stgcGasGap' field " << endmsg; } - status = 1; } field = m_dict->find_field("stgcChannelType"); @@ -67,7 +65,6 @@ int sTgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_CHANNELTYPE_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'channelType' field " << endmsg; } - status = 1; } field = m_dict->find_field("stgcChannel"); @@ -75,7 +72,6 @@ int sTgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { m_CHANNEL_INDEX = field->m_index; } else { if (m_msgSvc) { log << MSG::ERROR << "initLevelsFromDict - unable to find 'channel' field " << endmsg; } - status = 1; } // reinitialize the module ndex @@ -213,26 +209,23 @@ int sTgcIdHelper::initialize_from_dictionary(const IdDictMgr& dict_mgr) { // test to see that the multi range is not empty if (m_full_module_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "sTGC MultiRange ID is empty for modules" << endmsg; } - status = 1; } // test to see that the detector element multi range is not empty if (m_full_detectorElement_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "sTGC MultiRange ID is empty for detector elements" << endmsg; } - status = 1; } // test to see that the multi range is not empty if (m_full_channel_range.size() == 0) { if (m_msgSvc) { log << MSG::ERROR << "sTGC MultiRange ID is empty for channels" << endmsg; } - status = 1; } // Setup the hash tables for sTGC if (m_msgSvc) { log << MSG::INFO << "Initializing sTGC hash indices ... " << endmsg; } - status = init_hashes(); - status = init_detectorElement_hashes(); // same as module hash - status = init_id_to_hashes(); + init_hashes(); + init_detectorElement_hashes(); // same as module hash + init_id_to_hashes(); /* //comment out this bit to test the identifiers