diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h index 3690479f74e1ab83426c8dc328c3586ca26a8ce3..b3f11916251b8a0346bef58866c7c837eedd8d6e 100644 --- a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h +++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h @@ -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 */ #ifndef TGCcablingServerSvc_H @@ -10,18 +10,11 @@ #include "AthenaBaseComps/AthService.h" #include "TGCcablingInterface/ITGCcablingServerSvc.h" -class ITagInfoMgr; - - class TGCcablingServerSvc : public AthService, virtual public ITGCcablingServerSvc { private: - // mutable bool m_atlas; mutable BooleanProperty m_atlas; - StoreGateSvc* m_pDetStore; // The Transient Detector Store Service - ITagInfoMgr* m_tagInfoMgr; // Tag Info Manager - mutable bool m_tagsCompared; bool m_forcedUse; bool m_useMuonTGC_CablingSvc; @@ -38,9 +31,6 @@ class TGCcablingServerSvc : public AthService, // Interface implementation virtual StatusCode giveCabling( const ITGCcablingSvc*&) const; virtual bool isAtlas(void) const; - virtual bool isConfigured(void) const; - - virtual StatusCode compareTags() const; }; #endif diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx index 76f2ae680be2eefa71ae5c5d5538d5dd9feac97e..8e3830af59f6d152aead3902498b0b44aa662078 100644 --- a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx +++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.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 "GaudiKernel/MsgStream.h" @@ -12,17 +12,11 @@ #include "StoreGate/StoreGate.h" #include "StoreGate/StoreGateSvc.h" -#include "EventInfo/TagInfo.h" -#include "EventInfoMgt/ITagInfoMgr.h" - #include "MuonCablingServers/TGCcablingServerSvc.h" #include "GaudiKernel/MsgStream.h" TGCcablingServerSvc::TGCcablingServerSvc(const std::string& name, ISvcLocator* sl) : -AthService( name, sl ), -m_pDetStore(0), -m_tagInfoMgr(0), -m_tagsCompared(false) +AthService( name, sl ) { declareProperty( "Atlas", m_atlas=true ); declareProperty( "forcedUse", m_forcedUse=false ); @@ -48,26 +42,7 @@ TGCcablingServerSvc::queryInterface(const InterfaceID& riid, void** ppvIF) StatusCode TGCcablingServerSvc::initialize() { - ATH_MSG_DEBUG ( "initializing ..." ); - - ATH_CHECK( AthService::initialize() ); - ATH_CHECK( service("DetectorStore", m_pDetStore ) ); - - // **** **** **** TagInfo **** **** **** - const DataHandle<TagInfo> tagInfoH; - std::string tagInfoKey = ""; - // get the key - StatusCode sc = service("TagInfoMgr", m_tagInfoMgr); - if(sc.isFailure() || m_tagInfoMgr==0) { - ATH_MSG_WARNING ( " Unable to locate TagInfoMgr service" ); - } else { - tagInfoKey = m_tagInfoMgr->tagInfoKey(); - } - - m_tagsCompared = true; - - ATH_MSG_DEBUG ( "... done!" ); - return sc; + return StatusCode::SUCCESS; } StatusCode @@ -79,10 +54,6 @@ StatusCode TGCcablingServerSvc::giveCabling(const ITGCcablingSvc*& cabling) const { ATH_MSG_DEBUG ( "requesting instance of TGCcabling" ); - if (!this->isConfigured()) { - ATH_MSG_ERROR("TGCcablingServerSvc has not been cofigured."); - } - cabling = 0; if(m_atlas) { @@ -96,83 +67,5 @@ TGCcablingServerSvc::giveCabling(const ITGCcablingSvc*& cabling) const { bool TGCcablingServerSvc::isAtlas() const { - MsgStream log(msgSvc(), name()); - - if (!this->isConfigured()) { - ATH_MSG_ERROR("TGCcablingServerSvc has not been cofigured."); - } return m_atlas; } - -bool -TGCcablingServerSvc::isConfigured() const { - return m_tagsCompared; -} - -StatusCode -TGCcablingServerSvc::compareTags() const { - bool tagMatch = true; - - ATH_MSG_DEBUG ( "compareTags() callback triggered" ); - - // Get TagInfo and retrieve tags - const TagInfo* tagInfo = 0; - StatusCode sc= m_pDetStore->retrieve(tagInfo); - - std::string cablingType; - - if (sc.isFailure() || tagInfo==0) { - ATH_MSG_INFO - ( "No TagInfo in DetectorStore while attempting to compare tags" - ); - } else { - tagInfo->findInputTag("TGC_CablingType", cablingType); - - ATH_MSG_DEBUG - ( "TGC_CablingType from TagInfo: " << cablingType ); - - if(cablingType=="") { - // assume it is 8-fold in case the call-back is active - cablingType="TGCcabling8Svc"; - } - - // check cablingType - if (m_atlas) { - tagMatch = (cablingType != "TGCcabling8Svc"); - } else { - tagMatch = (cablingType != "TGCcabling12Svc"); - } - } - - if (!tagMatch) { - std::string cablingName; - if (m_atlas) { - cablingName = "TGCcabling12 (12-fold)"; - } else { - cablingName = "TGCcabling (8-fold)"; - } - - ATH_MSG_ERROR - ( "TGC_CablingType : " << cablingType << " is mismatched " - << "with TGCcablingServerSvc configuration of "<< cablingName << ". " - << "m_atlas flag is " << (m_atlas ? "true" : "false") << "." - ); - ATH_MSG_INFO - ( "If you definitely want to use " << cablingName << ", " - << "please add the following lines in your jobOptions \n\n" - << " from MuonCablingServers.MuonCablingServersConf import TGCcablingServerSvc \n" - << " ServiceMgr += TGCcablingServerSvc() \n" - << " theApp.CreateSvc += [ \"TGCcablingServerSvc\" ] \n" - << " ServiceMgr.TGCcablingServerSvc.Atlas=" << (!m_atlas ? "True" : "False") << " \n" - << " ServiceMgr.TGCcablingServerSvc.forcedUse=True \n" - << " ServiceMgr.TGCcablingServerSvc.useMuonTGC_CablingSvc=True \n" - << " from TGC_CondCabling.TGC_CondCablingConf import TGCCablingDbTool \n" - << " ToolSvc += TGCCablingDbTool() \n" - << " from IOVDbSvc.CondDB import conddb \n" - << " conddb.addFolderSplitMC('TGC','/TGC/CABLING/MAP_SCHEMA','/TGC/CABLING/MAP_SCHEMA') \n" - ); - } - - return StatusCode::SUCCESS; -} - diff --git a/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h b/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h index b83d780cfe38664bb6a8a94f7fb75458bba7df5e..bd20dbc6a7e3d4770d6476fbcaac26b41ab76f96 100644 --- a/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h +++ b/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h @@ -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 */ #ifndef ITGCCABLINGGETTERSVC_H @@ -25,10 +25,6 @@ class ITGCcablingServerSvc : virtual public IInterface // serve the cabling implementation virtual StatusCode giveCabling(const ITGCcablingSvc*&) const=0; virtual bool isAtlas(void) const=0; - virtual bool isConfigured(void) const=0; - - virtual StatusCode compareTags() const=0; - }; #endif diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx index e6cf541215f0aa89fa4c8384d948e403f21f8e87..fac83d2251c0e4afb2a9c4f955963ff25777268a 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx @@ -35,14 +35,9 @@ StatusCode TgcDigitToTgcRDO::initialize() ATH_CHECK( detStore()->retrieve( m_tgcIdHelper, "TGCIDHELPER") ); ATH_CHECK( m_tgc_cabling_server.retrieve() ); - if(m_tgc_cabling_server->isConfigured()) { - ATH_MSG_DEBUG( "standard digitization job: " - << "initialize now the TGC cabling and TGC container." ); - ATH_CHECK( getCabling() ); - } else { - ATH_MSG_DEBUG( "TGCcablingServerSvc not yet configured; postpone the " - << "ITGCcablingSvc and the TgcRdocontainer initialization at first event" ); - } + ATH_MSG_DEBUG( "standard digitization job: " + << "initialize now the TGC cabling and TGC container." ); + ATH_CHECK( getCabling() ); ATH_CHECK( m_rdoContainerKey.initialize() ); ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_rdoContainerKey ); diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx index a8ccf6964b2cdb65575a3c5cd5ab2007c0c9cf9e..6b088497b3361198648d9dead6c54eb36225e176 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx @@ -121,11 +121,6 @@ StatusCode Muon::TGC_RawDataProviderToolCore::getCabling() { ATH_MSG_VERBOSE( " TGCcablingServerSvc retrieved" ); } - if(!TgcCabGet->isConfigured()) { - ATH_MSG_DEBUG( "TGCcablingServer not yet configured!" ); - return StatusCode::FAILURE; - } - sc = TgcCabGet->giveCabling(m_cabling); if(sc.isFailure()) { ATH_MSG_FATAL( "Could not get ITGCcablingSvc from the Server !" ); diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx index 632f8b69e632e7a2b6616814eaadbd2c8c147213..bed052265000c9e27137303f174cc3d4ffaa04aa 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRDO_Decoder.cxx @@ -152,11 +152,6 @@ StatusCode Muon::TgcRDO_Decoder::getCabling() const { return sc; } - if(!TgcCabGet->isConfigured()) { - ATH_MSG_DEBUG( "TGCcablingServer not yet configured!" ); - return StatusCode::FAILURE; - } - sc = TgcCabGet->giveCabling(m_cabling); if(!sc.isSuccess()) { msg(sc.isFailure() ? MSG::FATAL : MSG::ERROR) << "Could not get ITGCcablingSvc from Server!" << endmsg; diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx index baf0a0e273a8864935267a7b63135c2f22152a84..45a89e943e84b6261fbace5bfc61038aec5ac9a0 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRODReadOut.cxx @@ -813,12 +813,6 @@ bool Muon::TgcRODReadOut::setSbLoc(uint16_t subDetectorId, return false; } - // check if TGCcablingServer is properly initialized - if (!TgcCabGet->isConfigured()) { - if(m_log) (*m_log) << MSG::ERROR << " TGCcablingServer not initialized!" << endmsg; - return false; - } - // get Cabling Service sc = TgcCabGet->giveCabling(m_cabling); if(sc.isFailure()){ diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx index 8019421e1680d48607acd3e6b751e52ee038a21b..743e7af23eac67e63c58fa107268babcf4e0da2d 100644 --- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx @@ -3411,11 +3411,6 @@ StatusCode Muon::TgcRdoToPrepDataTool::getCabling() { return sc; } - if(!TgcCabGet->isConfigured()) { - ATH_MSG_DEBUG("TGCcablingServer not yet configured!"); - return StatusCode::FAILURE; - } - sc = TgcCabGet->giveCabling(m_tgcCabling); if(!sc.isSuccess()) { msg(sc.isFailure() ? MSG::FATAL : MSG::ERROR) << "Could not get ITGCcablingSvc from Server!" << endmsg; diff --git a/MuonSpectrometer/MuonRDO/src/TgcRdo.cxx b/MuonSpectrometer/MuonRDO/src/TgcRdo.cxx index e3d3dfe31a9b22b7c0a5d1b2b22ac6537d2df9e4..ed51e01e5fcd8cdd405c84bcc9f9a45d5d28ccf9 100755 --- a/MuonSpectrometer/MuonRDO/src/TgcRdo.cxx +++ b/MuonSpectrometer/MuonRDO/src/TgcRdo.cxx @@ -62,7 +62,7 @@ uint16_t TgcRdo::calculateOnlineId (uint16_t subDetectorId, uint16_t rodId) const ITGCcablingServerSvc* tgcCabGet = 0; StatusCode sc = svcLoc->service("TGCcablingServerSvc", tgcCabGet, true); - if(!sc.isSuccess() || !tgcCabGet || !tgcCabGet->isConfigured()) { + if(!sc.isSuccess() || !tgcCabGet ) { IMessageSvc* msgSvc =0 ; if(!(svcLoc->service("MessageSvc", msgSvc).isSuccess()) || !msgSvc) return 9999; @@ -70,7 +70,6 @@ uint16_t TgcRdo::calculateOnlineId (uint16_t subDetectorId, uint16_t rodId) log << MSG::ERROR << "Could not get TGCcablingServerSvc! " << (!sc.isSuccess() ? "service(\"TGCcablingServerSvc\", tgcCabGet, true) is failed" : "") << (!tgcCabGet ? "TGCcablingServerSvc pointer is NULL" : "") - << (tgcCabGet && !tgcCabGet->isConfigured() ? "TGCcablingServerSvc is NOT configured yet" : "") << endmsg; return 9999; } diff --git a/MuonSpectrometer/MuonRDO/src/TgcRdoIdHash.cxx b/MuonSpectrometer/MuonRDO/src/TgcRdoIdHash.cxx index 2819eddc3b427bd4eceda0a801caf21ca3405edf..f04f8c93cf16b35dd22338663189c9439400c975 100755 --- a/MuonSpectrometer/MuonRDO/src/TgcRdoIdHash.cxx +++ b/MuonSpectrometer/MuonRDO/src/TgcRdoIdHash.cxx @@ -22,7 +22,7 @@ TgcRdoIdHash::TgcRdoIdHash() const ITGCcablingServerSvc* tgcCabGet = 0; StatusCode sc = svcLoc->service("TGCcablingServerSvc", tgcCabGet, true); - if(!sc.isSuccess() || !tgcCabGet || !tgcCabGet->isConfigured()) { + if(!sc.isSuccess() || !tgcCabGet ) { IMessageSvc* msgSvc =0 ; if(!(svcLoc->service("MessageSvc", msgSvc).isSuccess()) || !msgSvc) return; @@ -30,7 +30,6 @@ TgcRdoIdHash::TgcRdoIdHash() log << MSG::ERROR << "Could not get TGCcablingServerSvc! " << (!sc.isSuccess() ? "service(\"TGCcablingServerSvc\", tgcCabGet, true) is failed" : "") << (!tgcCabGet ? "TGCcablingServerSvc pointer is NULL" : "") - << (tgcCabGet && !tgcCabGet->isConfigured() ? "TGCcablingServerSvc is NOT configured yet" : "") << endmsg; return; } diff --git a/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyFindTool.cxx b/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyFindTool.cxx index 1bc027126a65d471c8de6188d5614aea8f9b131c..0a10b82af87c92e31c32529f680f45ae70077d35 100644 --- a/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyFindTool.cxx +++ b/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyFindTool.cxx @@ -1186,11 +1186,6 @@ namespace Trigger { return sc; } - if(!TgcCabGet->isConfigured()) { - ATH_MSG_DEBUG("TGCcablingServer not yet configured!"); - return StatusCode::FAILURE; - } - sc = TgcCabGet->giveCabling(m_tgcCabling); if(!sc.isSuccess()) { msg(sc.isFailure() ? MSG::FATAL : MSG::ERROR) << "Could not get ITGCcablingSvc from Server!" << endmsg; diff --git a/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyValidation.cxx b/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyValidation.cxx index b4a6188b29429a71e86a7c91c720f0222ca60c95..05b65d55d1622a21eeb2b164bda9e14fce62cb8a 100644 --- a/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyValidation.cxx +++ b/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/src/TgcCoinHierarchyValidation.cxx @@ -255,11 +255,6 @@ namespace Trigger { return false; } - if(!TgcCabGet->isConfigured()){ - ATH_MSG_FATAL("TgcCablingServiceSvc failed about isConfigured() in doAnalysisHit()."); - return false; - } - sc = TgcCabGet->giveCabling(m_tgcCabling); if(!sc.isSuccess()){ ATH_MSG_FATAL("TgcCabGet is failed in doAnalysisHit()."); diff --git a/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx b/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx index e29163784c13461a58e1c52b4cb7d25717c8bbb3..bfbc2b4d11d501ab9273e1d0262ecd30a9058988 100644 --- a/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx +++ b/Trigger/TrigT1/TrigT1TGC/src/LVL1TGCTrigger.cxx @@ -1383,11 +1383,6 @@ StatusCode LVL1TGCTrigger::getCabling() return StatusCode::FAILURE; } - if(!TgcCabGet->isConfigured()) { - m_log << MSG::DEBUG << "TGCcablingServer not yet configured!" << endmsg; - return StatusCode::FAILURE; - } - // get Cabling Service sc = TgcCabGet->giveCabling(m_cabling); if (sc.isFailure()){ diff --git a/Trigger/TrigT1/TrigT1TGCRecRoiSvc/src/TGCRecRoiSvc.cxx b/Trigger/TrigT1/TrigT1TGCRecRoiSvc/src/TGCRecRoiSvc.cxx index 7e7bc7f19da922f609c92bafe685836248b9d039..c2b4af26a051c1dd50f2f16ac7586f4ee51d6beb 100755 --- a/Trigger/TrigT1/TrigT1TGCRecRoiSvc/src/TGCRecRoiSvc.cxx +++ b/Trigger/TrigT1/TrigT1TGCRecRoiSvc/src/TGCRecRoiSvc.cxx @@ -544,10 +544,6 @@ void TGCRecRoiSvc::getStripInfo(Amg::Vector3D & s_pos, StatusCode TGCRecRoiSvc::getCabling() const { ServiceHandle<ITGCcablingServerSvc> tgcCabGet ("TGCcablingServerSvc", name()); ATH_CHECK( tgcCabGet.retrieve() ); - if(!tgcCabGet->isConfigured()) { - ATH_MSG_DEBUG( "TGCcablingServer not yet configured!" ); - return StatusCode::FAILURE; - } ATH_CHECK( tgcCabGet->giveCabling(*&m_cabling) ); m_isAtlas = tgcCabGet->isAtlas(); return StatusCode::SUCCESS;