diff --git a/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx b/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx index 41970aed3bccd4621476bc02341bdd7fd6b3fa74..797b01d8f05936c451dc94ab8823ecec833821e5 100755 --- a/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloIdentifier/CaloDM_ID.h" @@ -545,14 +545,6 @@ void CaloDM_ID::lar_region_id_checks (int pos_neg_z, int dmat, int sampling, int ExpandedIdentifier id(calo_exp()); id << pos_neg_z << dmat << sampling << region ; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloDM_ID::lar_region_id(field values), did not build, " + - strformat ("pos_neg_z: %d , dmat: %d, sampling: %d, region: %d ", - pos_neg_z , dmat, sampling , region); - throw CaloID_Exception(errorMessage , 3); - } - if (!m_full_lar_region_range.match(id)) { std::string errorMessage = "CaloDM_ID::lar_region_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_lar_zone_range; @@ -566,14 +558,6 @@ void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, in ExpandedIdentifier id(calo_exp()); id << pos_neg_z << dmat << sampling << region ; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloDM_ID::tile_region_id(field values), did not build, " + - strformat ("pos_neg_z: %d , dmat: %d, sampling: %d, region: %d ", - pos_neg_z , dmat, sampling , region); - throw CaloID_Exception(errorMessage , 3); - } - if (!m_full_tile_region_range.match(id)) { std::string errorMessage = "CaloDM_ID::tile_region_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_tile_zone_range; @@ -590,14 +574,6 @@ void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, in ExpandedIdentifier id(calo_exp()); id << pos_neg_z << dmat << sampling << region << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloDM_ID::lar_zone_id(field values), did not build, " + - strformat ("pos_neg_z: %d , dmat: %d, sampling: %d, region: %d , eta: %d , phi: %d ", - pos_neg_z , dmat, sampling , region, eta, phi); - throw CaloID_Exception(errorMessage , 4); - } - if (!m_full_lar_zone_range.match(id)) { std::string errorMessage = "CaloDM_ID::lar_zone_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_lar_zone_range; @@ -612,14 +588,6 @@ void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, in ExpandedIdentifier id(calo_exp()); id << pos_neg_z << dmat << sampling << region << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloDM_ID::tile_zone_id(field values), did not build, " + - strformat ("pos_neg_z: %d , dmat: %d, sampling: %d, region: %d , eta: %d , phi: %d ", - pos_neg_z , dmat, sampling , region, eta, phi); - throw CaloID_Exception(errorMessage , 4); - } - if (!m_full_tile_zone_range.match(id)) { std::string errorMessage = "CaloDM_ID::tile_zone_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_tile_zone_range; @@ -643,13 +611,6 @@ void CaloDM_ID::zone_id_checks ( const Identifier& regionId, id << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloDM_ID::zone_id(regionId,field values), values ok but did not build, " + - strformat ("eta: %d , phi: %d ", eta, phi); - throw CaloID_Exception(errorMessage , 4); - } - if(is_lar(regionId)) { if (!m_full_lar_zone_range.match(id)) { std::string errorMessage = "CaloDM_ID::zone_id(regionId) result is not OK: ID, range = " diff --git a/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx b/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx index 2a37a9e3b81bd2681d3c9ce9648e037f93a0c4ec..5b8a65acabbf61b2999bd094ddd1908f4f217689 100755 --- a/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloIdentifier/CaloLVL1_ID.h" @@ -609,14 +609,6 @@ void CaloLVL1_ID::tower_id_checks ( int pos_neg_z, int sampling, int region, ExpandedIdentifier id(calo_exp()); id << pos_neg_z << sampling << region << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloLVL1_ID::tower_id(field values), did not build, " + - strformat("pos_neg_z: %d , sampling: %d, region: %d , eta: %d , phi: %d ", - pos_neg_z, sampling, region, eta, phi); - throw CaloID_Exception(errorMessage , 2); - } - if (!m_full_tower_range.match(id)) { std::string errorMessage = "CaloLVL1_ID::tower_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_tower_range; @@ -640,16 +632,6 @@ void CaloLVL1_ID::tower_id_checks ( const Identifier regionId, id << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - - std::string errorMessage = - "Error in CaloLVL1_ID::tower_id(regionId,field values), values ok but did not build, " + - strformat ("eta: %d , phi: %d ", - eta, phi); - throw CaloID_Exception(errorMessage , 2); - } - - if (!m_full_tower_range.match(id)) { std::string errorMessage = "CaloLVL1_ID::tower_id(regionId,field values) result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_tower_range; @@ -663,14 +645,6 @@ void CaloLVL1_ID::region_id_checks (int pos_neg_z, int sampling, int region)cons ExpandedIdentifier id(calo_exp()); id << pos_neg_z << sampling << region ; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloLVL1_ID::region_id(field values), did not build, " + - strformat ("pos_neg_z: %d , sampling: %d, region: %d ", - pos_neg_z , sampling , region); - throw CaloID_Exception(errorMessage , 2); - } - if (!m_full_region_range.match(id)) { std::string errorMessage = "CaloLVL1_ID::region_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_region_range; @@ -685,14 +659,6 @@ void CaloLVL1_ID::layer_id_checks ( int pos_neg_z, int sampling, int region, ExpandedIdentifier id(calo_exp()); id << pos_neg_z << sampling << region << eta << phi << layer; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloLVL1_ID::layer_id(field values), did not build, " + - strformat ("pos_neg_z: %d , sampling: %d, region: %d , eta: %d , phi: %d , layer: %d ", - pos_neg_z , sampling , region, eta, phi, layer); - throw CaloID_Exception(errorMessage , 2); - } - if (!m_full_layer_range.match(id)) { std::string errorMessage = "CaloLVL1_ID::layer_id(field values) result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_layer_range; @@ -715,13 +681,6 @@ void CaloLVL1_ID::layer_id_checks ( const Identifier towerId, id << layer; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in CaloLVL1_ID::layer_id(towerId,layer), values ok but did not build, " + - strformat ("layer: %d ", layer); - throw CaloID_Exception(errorMessage , 2); - } - if (!m_full_layer_range.match(id)) { std::string errorMessage = "CaloLVL1_ID::layer_id(towerId) result is not OK: ID, range = " + (std::string)id + " , " + (std::string)m_full_layer_range; diff --git a/Calorimeter/CaloIdentifier/src/CaloNeighbours.cxx b/Calorimeter/CaloIdentifier/src/CaloNeighbours.cxx index ca2bd808565314c0175c66d8244a72fef631ccd8..ceed400254e9d1183e9c5861234d089140a6324f 100755 --- a/Calorimeter/CaloIdentifier/src/CaloNeighbours.cxx +++ b/Calorimeter/CaloIdentifier/src/CaloNeighbours.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------- @@ -177,12 +177,15 @@ int CaloNeighbourRegion::getId(ExpandedIdentifier& id, Identifier &rID, const Ra } else if ( m_calo_id->is_tile(id) ) { subCalo = CaloCell_ID::TILE; + ExpandedIdentifier::element_type sampl = 0; + if (id.fields() > TILESAMPL) + sampl = id[TILESAMPL]; rID = m_calo_id->cell_id(subCalo, id[TILESECTION], id[SIDE], id[TILEPHI], id[TILEETA], - id[TILESAMPL]); + sampl); } else { std::cout << "CaloNeighbours::get_id ERROR: " << (std::string)id << " is not in the LAr or Tile calorimeters" << std::endl; diff --git a/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx b/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx index f77b954832a3b3a98eb768f46093da9bb6da7766..f98cb9b666fe0d31dc206ed4c96704108f74fa03 100644 --- a/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloIdentifier/JGTowerBase_ID.h" @@ -583,14 +583,6 @@ void JGTowerBase_ID::tower_id_checks ( int pos_neg, int sampling, int region, id << pos_neg << sampling << region << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in JGTowerBase_ID::tower_id(field values), did not build, " + - strformat("pos_neg: %d , sampling: %d, region: %d , eta: %d , phi: %d ", - pos_neg, sampling, region, eta, phi); - throw CaloID_Exception(errorMessage , 2); - } - if (!m_full_tower_range.match(id)) { std::string errorMessage = "JGTowerBase_ID::tower_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_tower_range; @@ -613,16 +605,6 @@ void JGTowerBase_ID::tower_id_checks ( const Identifier regionId, id << eta << phi; - if( id.last_error () != ExpandedIdentifier::none) { - - std::string errorMessage = - "Error in JGTowerBase_ID::tower_id(regionId,field values), values ok but did not build, " + - strformat ("eta: %d , phi: %d ", - eta, phi); - throw CaloID_Exception(errorMessage , 2); - } - - if (!m_full_tower_range.match(id)) { std::string errorMessage = "JGTowerBase_ID::tower_id(regionId,field values) result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_tower_range; @@ -636,14 +618,6 @@ void JGTowerBase_ID::region_id_checks (int pos_neg, int sampling, int region)con ExpandedIdentifier id(calo_exp()); id << pos_neg << sampling << region ; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in JGTowerBase_ID::region_id(field values), did not build, " + - strformat ("pos_neg: %d , sampling: %d, region: %d ", - pos_neg , sampling , region); - throw CaloID_Exception(errorMessage , 2); - } - if (!m_full_reg_range.match(id)) { std::string errorMessage = "JGTowerBase_ID::region_id() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_reg_range; diff --git a/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx index 8fe249f3b6e268cde1df0af5978b1a6bb1bfc026..13e3c294195e3cc08f4a9801b9f2cd6f461388a4 100644 --- a/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -150,14 +150,6 @@ void LArEM_Base_ID::region_id_checks ( int barrel_ec, int sampling, int region ExpandedIdentifier expId(lar_em_exp()); expId << barrel_ec << sampling << region ; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in LArEM_Base_ID::region_id_checks, " + - strformat ("barrel_ec: %d , sampling: %d, region: %d ", - barrel_ec , sampling , region); - throw LArID_Exception(errorMessage , 5); - } - if (!m_full_region_range.match(expId)) { std::string errorMessage = "LArEM_Base_ID::region_id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -175,14 +167,6 @@ void LArEM_Base_ID::channel_id_checks ( int barrel_ec, int sampling, int regio ExpandedIdentifier expId(lar_em_exp()); expId << barrel_ec << sampling << region << eta << phi << m_slar ; - if( expId.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in LArEM_Base_ID::channel_id_checks(field values), " + - strformat ("barrel_ec: %d , sampling: %d, region: %d , eta: %d , phi: %d ", - barrel_ec , sampling , region, eta, phi); - throw LArID_Exception(errorMessage , 6); - } - if (!m_full_em_range.match(expId)) { std::string errorMessage = "LArEM_Base_ID::channel_id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_em_range; diff --git a/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx index 66a646f496522471ad6e544716bf80bc71d7f3ae..552ad48abcea17206e08b790b44e82d4b797671e 100755 --- a/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloIdentifier/LArFCAL_Base_ID.h" @@ -256,13 +256,6 @@ void LArFCAL_Base_ID::module_id_checks ( int pos_neg, int module ) const ExpandedIdentifier expId(lar_fcal_exp()); expId << pos_neg << module; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in LArFCAL_Base_ID::module_id, " + - strformat ("pos_neg: %d , module: %d", pos_neg , module); - throw LArID_Exception(errorMessage , 9); - } - if (!m_full_module_range.match(expId)) { std::string errorMessage = "LArFCAL_Base_ID::module_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_module_range; @@ -278,14 +271,6 @@ void LArFCAL_Base_ID::channel_id_checks ( int pos_neg, int module, int eta, int ExpandedIdentifier expId(lar_fcal_exp()); expId << pos_neg << module << eta << phi << m_slar ; - if( expId.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in LArFCAL_Base_ID::channel_id, " + - strformat ("pos_neg: %d , module: %d, eta: %d, phi: %d ", - pos_neg , module , eta , phi); - throw LArID_Exception(errorMessage , 10); - } - if (!m_full_channel_range.match(expId)) { std::string errorMessage = "LArFCAL_Base_ID::channel_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_channel_range; diff --git a/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx index b5fc8ab1fc5f1df55b99efa42de41258d77290d5..a33151b60cfc53906af03faa213dd01c001d9882 100755 --- a/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -399,14 +399,6 @@ void LArHEC_Base_ID::region_id_checks ( int pos_neg, int sampling, int region ExpandedIdentifier expId(lar_hec_exp()); expId << pos_neg << sampling << region ; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in LArHEC_Base_ID::region_id, " + - strformat ("pos_neg: %d , sampling: %d, region: %d ", - pos_neg , sampling , region); - throw LArID_Exception(errorMessage , 7); - } - if (!m_full_region_range.match(expId)) { std::string errorMessage = "LArHEC_Base_ID::region_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -424,14 +416,6 @@ void LArHEC_Base_ID::channel_id_checks ( int pos_neg, int sampling, int region ExpandedIdentifier expId(lar_hec_exp()); expId << pos_neg << sampling << region << eta << phi << m_slar ; - if( expId.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in LArHEC_Base_ID::channel_id(field values), " + - strformat ("pos_neg: %d , sampling: %d, region: %d , eta: %d , phi: %d ", - pos_neg , sampling , region, eta, phi); - throw LArID_Exception(errorMessage , 8); - } - if (!m_full_channel_range.match(expId)) { std::string errorMessage = "LArHEC_Base_ID::channel_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_channel_range; @@ -456,16 +440,6 @@ void LArHEC_Base_ID::channel_id_checks ( const Identifier regionId, expId << eta << phi << m_slar; - if ( expId.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in LArHEC_Base_ID::channel_id(region id , field values), " + - strformat ("pos_neg: %d , sampling: %d, region: %d , eta: %d , phi: %d ", - this->pos_neg(regionId) , - this->sampling(regionId), - this->region(regionId), eta, phi); - throw LArID_Exception(errorMessage , 8); - } - if (!m_full_channel_range.match(expId)) { std::string errorMessage = "LArHEC_Base_ID::channel_id(regId) result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_channel_range; diff --git a/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx b/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx index 4336ec1523d940f03141cd8d69e6a55d33b81745..909376d2351dfc3d16a3aeded1d890950505a376 100644 --- a/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloIdentifier/LArMiniFCAL_ID.h" @@ -350,7 +350,7 @@ int LArMiniFCAL_ID::initialize_from_dictionary (const IdDictMgr& dict_mgr) } -void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int module ) const +void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int /*module*/ ) const { // Check that id is within allowed range @@ -359,13 +359,6 @@ void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int module ) const //expId << pos_neg << module; expId << pos_neg << 0; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in LArMiniFCAL_ID::module_id, " + - strformat ("pos_neg: %d , module: %d", pos_neg , module); - throw LArID_Exception(errorMessage , 9); - } - if (!m_full_module_range.match(expId)) { std::string errorMessage = "LArMiniFCAL_ID::module_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_module_range; @@ -373,7 +366,7 @@ void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int module ) const } } -void LArMiniFCAL_ID::channel_id_checks ( int pos_neg, int module, int depth, int eta, int phi) const +void LArMiniFCAL_ID::channel_id_checks ( int pos_neg, int /*module*/, int depth, int eta, int phi) const { // Check that id is within allowed range @@ -382,14 +375,6 @@ void LArMiniFCAL_ID::channel_id_checks ( int pos_neg, int module, int depth, int //expId << pos_neg << module << depth << eta << phi ; expId << pos_neg << 0 << depth << eta << phi ; - if( expId.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in LArMiniFCAL_ID::channel_id, " + - strformat ("pos_neg: %d , module: %d, depth: %d,eta: %d, phi: %d ", - pos_neg , module , depth, eta , phi); - throw LArID_Exception(errorMessage , 10); - } - if (!m_full_channel_range.match(expId)) { std::string errorMessage = "LArMiniFCAL_ID::channel_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_channel_range; diff --git a/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx b/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx index 3fbbfa455c0f1abe61136162bab964fb6a1ecb33..55e8de728064ce75a598f7ba11c7e609e741468c 100755 --- a/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx +++ b/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "CaloIdentifier/TTOnlineID.h" @@ -235,13 +235,6 @@ void TTOnlineID::channel_Id_checks ( int crate, int module, int submodule, int // Fill expanded id ExpandedIdentifier id(calo_exp()); id << detzside_field_value() << crate << module << submodule << channel; - if( id.last_error () != ExpandedIdentifier::none) { - std::string errorMessage = - "Error in TTOnlineID::channel_Id_checks(field values), did not build, " + - strformat ("crate: %d , module: %d, submodule: %d , channel: %d ", - crate , module , submodule, channel); - throw CaloID_Exception(errorMessage , 2); - } if (!m_full_channel_range.match(id)) { std::string errorMessage = "[TTOnlineID]::channnelId() result is not OK: ID, range = " + std::string(id) + " , " + (std::string)m_full_channel_range; @@ -324,13 +317,6 @@ void TTOnlineID::submodule_Id_checks( int crate, int module, int submodule ) con ExpandedIdentifier expId(calo_exp()); expId << detzside_field_value() << crate << module << submodule; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TTOnlineID::submodule_Id_checks, values ok but did not build, "+ - strformat ("crate: %d , module: %d , submodule: %d", - crate , module, submodule); - throw CaloID_Exception(errorMessage , 99); - } if (!m_full_submodule_range.match(expId)) { std::string errorMessage = "TTOnlineID::submodule_Id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_submodule_range; throw CaloID_Exception(errorMessage , 99); @@ -346,12 +332,6 @@ void TTOnlineID::module_Id_checks( int crate, int module ) const ExpandedIdentifier expId(calo_exp()); expId << detzside_field_value() << crate << module; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TTOnlineID::module_Id_checks, values ok but did not build, " + - strformat ("crate: %d , module: %d", crate , module); - throw CaloID_Exception(errorMessage , 99); - } if (!m_full_module_range.match(expId)) { std::string errorMessage = "TTOnlineID::module_Id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_module_range; throw CaloID_Exception(errorMessage , 99); @@ -367,12 +347,6 @@ void TTOnlineID::crate_Id_checks( int crate ) const ExpandedIdentifier expId(calo_exp()); expId << detzside_field_value() << crate; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TTOnlineID::crate_Id_checks, values ok but did not build, " + - strformat ("crate: %d", crate); - throw CaloID_Exception(errorMessage , 99); - } if (!m_full_crate_range.match(expId)) { std::string errorMessage = "TTOnlineID::crate_Id_checks() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_crate_range; throw CaloID_Exception(errorMessage , 99); diff --git a/Calorimeter/CaloIdentifier/src/TileTBID.cxx b/Calorimeter/CaloIdentifier/src/TileTBID.cxx index 69c16637aad6f7a2e7e9e2538f7ddc74c568aac0..8e2399fd62289e0f2501f62a787bedff60c0bd97 100755 --- a/Calorimeter/CaloIdentifier/src/TileTBID.cxx +++ b/Calorimeter/CaloIdentifier/src/TileTBID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /*************************************************************************** @@ -117,14 +117,6 @@ TileTBID::type_id ( int type ) const ExpandedIdentifier expId(tile_exp()); expId << TileTBID::TILE_TESTBEAM << type; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TileTBID::type_id , values ok but did not build, " + - strformat ("testbeam: %d, type: %d ", - TileTBID::TILE_TESTBEAM, type); - throw TileID_Exception(errorMessage , 2); - } - if (!m_full_type_range.match(expId)) { std::string errorMessage = "TileTBID::type_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_type_range; @@ -151,14 +143,6 @@ TileTBID::module_id ( int type, int module ) const ExpandedIdentifier expId(tile_exp()); expId << TileTBID::TILE_TESTBEAM << type << module; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TileTBID::module_id , values ok but did not build, " + - strformat ("testbeam: %d, type: %d, module: %d ", - TileTBID::TILE_TESTBEAM, type, module); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_module_range.match(expId)) { std::string errorMessage = "TileTBID::module_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_type_range; @@ -189,14 +173,6 @@ TileTBID::channel_id ( int type, int module, int channel ) const ExpandedIdentifier expId(tile_exp()); expId << TileTBID::TILE_TESTBEAM << type << module << channel; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TileTBID::channel_id , values ok but did not build, " + - strformat ("testbeam: %d, type: %d, module: %d, channel: %d ", - TileTBID::TILE_TESTBEAM, type, module, channel); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_channel_range.match(expId)) { std::string errorMessage = "TileTBID::channel_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_type_range; @@ -248,13 +224,6 @@ TileTBID::channel_id ( const Identifier & module_id, expId << channel; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in TileTBID::channel_id , values ok but did not build, " + - strformat ("channel: %d ", channel); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_channel_range.match(expId)) { std::string errorMessage = "TileTBID::channel_id() result is not OK: ID, range = " + (std::string)expId + " , " + (std::string)m_full_type_range; diff --git a/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx index 21c78f22449820acfd027b43149cfe53b71e473f..e00dc9071116e62dbefed464c9144c5f15512410 100755 --- a/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx +++ b/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -378,13 +378,6 @@ Tile_Base_ID::tile_det ( int section ) const // Fill expanded id ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) ; - - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::tile_det , values ok but did not build, "+ - strformat("section: %d ", section); - throw TileID_Exception(errorMessage , 1); - } } Identifier result; @@ -425,13 +418,6 @@ Tile_Base_ID::region_id ( int section, int side ) const ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) << side; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::region_id, values ok but did not build, "+ - strformat ("section: %d, side: %d ", section, side); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_region_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::region_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -478,14 +464,6 @@ Tile_Base_ID::module_id ( int section, int side, ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) << side << module; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::module_id, values ok but did not build, "+ - strformat ("section: %d, side: %d, module: %d ", - section, side, module); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_module_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::module_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -533,14 +511,6 @@ Tile_Base_ID::tower_id ( int section, int side, ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) << side << module << tower; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::tower_id, values ok but did not build, "+ - strformat ("section: %d, side: %d, module: %d, tower: %d ", - section, side, module, tower); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_tower_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::tower_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -602,14 +572,6 @@ Tile_Base_ID::cell_id ( int section, int side, ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) << side << module << tower << sample; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::cell_id, values ok but did not build, " + - strformat ("section: %d, side: %d, module: %d, tower: %d, sample: %d ", - section, side, module, tower, sample); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_cell_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::cell_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_cell_range; @@ -684,13 +646,6 @@ Tile_Base_ID::pmt_id ( const Identifier & cell_id, expId << pmt; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::pmt_id, values ok but did not build, " + - strformat ("pmt: %d ", pmt); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_pmt_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::pmt_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -714,14 +669,6 @@ Tile_Base_ID::pmt_id ( int section, int side, ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) << side << module << tower << sample << pmt; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::pmt_id, values ok but did not build, " + - strformat ("section: %d, side: %d, module: %d, tower: %d, sample: %d, pmt: %d ", - section, side, module, tower, sample, pmt); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_pmt_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::pmt_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -786,13 +733,6 @@ Tile_Base_ID::adc_id ( const Identifier & cell_id, expId << pmt << adc; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::adc_id, values ok but did not build, " + - strformat ("pmt: %d, adc: %d ", pmt, adc); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_adc_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::adc_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -840,13 +780,6 @@ Tile_Base_ID::adc_id ( const Identifier & pmt_id, expId << adc; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::adc_id, values ok but did not build, " + - strformat ("adc: %d ", adc); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_adc_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::adc_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range; @@ -870,14 +803,6 @@ Tile_Base_ID::adc_id ( int section, int side, ExpandedIdentifier expId(tile_exp()); expId << encode_section (section) << side << module << tower << sample << pmt << adc; - if( expId.last_error () != ExpandedIdentifier::none ){ - std::string errorMessage = - "Error in Tile_Base_ID::adc_id, values ok but did not build, " + - strformat ("section: %d, side: %d, module: %d, tower: %d, sample: %d, pmt: %d, adc: %d ", - section, side, module, tower, sample, pmt, adc); - throw TileID_Exception(errorMessage , 1); - } - if (!m_full_adc_range.match(expId)) { std::string errorMessage = "Tile_Base_ID::adc_id() result is not OK: ID, range = " + std::string(expId) + " , " + (std::string)m_full_region_range;