diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h index 959b40540ad5675f19ab8e3672a853e086972549..3690479f74e1ab83426c8dc328c3586ca26a8ce3 100644 --- a/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h +++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/MuonCablingServers/TGCcablingServerSvc.h @@ -40,7 +40,7 @@ class TGCcablingServerSvc : public AthService, virtual bool isAtlas(void) const; virtual bool isConfigured(void) const; - virtual StatusCode compareTags(IOVSVC_CALLBACK_ARGS); + virtual StatusCode compareTags() const; }; #endif diff --git a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx index f43ec93337a29cce3d8aa3e81f41830f885793b2..76f2ae680be2eefa71ae5c5d5538d5dd9feac97e 100644 --- a/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx +++ b/MuonSpectrometer/MuonCablings/MuonCablingServers/src/TGCcablingServerSvc.cxx @@ -63,23 +63,8 @@ TGCcablingServerSvc::initialize() } else { tagInfoKey = m_tagInfoMgr->tagInfoKey(); } - - if(m_forcedUse) { // Selected cabling is used without comparison - m_tagsCompared = true; - } else { // The cabling to be used and the cabling in tag info will be compared by compareTags method - if(m_pDetStore->regFcn(&ITGCcablingServerSvc::compareTags, - dynamic_cast<ITGCcablingServerSvc*>(this), - tagInfoH, - tagInfoKey) - != StatusCode::SUCCESS) { - ATH_MSG_WARNING - ( "Cannot register compareTags function for key " << tagInfoKey ); - } else { - ATH_MSG_DEBUG - ( "Registered compareTags callback for key: " << tagInfoKey ); - } - } + m_tagsCompared = true; ATH_MSG_DEBUG ( "... done!" ); return sc; @@ -95,10 +80,9 @@ TGCcablingServerSvc::giveCabling(const ITGCcablingSvc*& cabling) const { ATH_MSG_DEBUG ( "requesting instance of TGCcabling" ); if (!this->isConfigured()) { - ATH_MSG_ERROR("The tagsCompared callback has not yet happened! Taking default configuration ("<< (m_atlas ? "12-fold cabling." : "8-fold cabling") - <<" Move this call to execute() / beginRun() to get rid of this WARNING message (or set the forcedUse property to True)"); + ATH_MSG_ERROR("TGCcablingServerSvc has not been cofigured."); } - + cabling = 0; if(m_atlas) { @@ -115,8 +99,7 @@ TGCcablingServerSvc::isAtlas() const { MsgStream log(msgSvc(), name()); if (!this->isConfigured()) { - ATH_MSG_ERROR("The tagsCompared callback has not yet happened! Taking default configuration ("<< (m_atlas ? "12-fold cabling." : "8-fold cabling") - <<" Move this call to execute() / beginRun() to get rid of this WARNING message (or set the forcedUse property to True)"); + ATH_MSG_ERROR("TGCcablingServerSvc has not been cofigured."); } return m_atlas; } @@ -127,11 +110,10 @@ TGCcablingServerSvc::isConfigured() const { } StatusCode -TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) -{ +TGCcablingServerSvc::compareTags() const { bool tagMatch = true; - ATH_MSG_INFO ( "compareTags() callback triggered" ); + ATH_MSG_DEBUG ( "compareTags() callback triggered" ); // Get TagInfo and retrieve tags const TagInfo* tagInfo = 0; @@ -146,7 +128,7 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) } else { tagInfo->findInputTag("TGC_CablingType", cablingType); - ATH_MSG_INFO + ATH_MSG_DEBUG ( "TGC_CablingType from TagInfo: " << cablingType ); if(cablingType=="") { @@ -164,21 +146,16 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) if (!tagMatch) { std::string cablingName; - std::string flagAtlas; if (m_atlas) { cablingName = "TGCcabling12 (12-fold)"; - flagAtlas = "True"; - m_atlas = false; } else { cablingName = "TGCcabling (8-fold)"; - flagAtlas = "False"; - m_atlas = true; } - ATH_MSG_INFO + ATH_MSG_ERROR ( "TGC_CablingType : " << cablingType << " is mismatched " << "with TGCcablingServerSvc configuration of "<< cablingName << ". " - << "m_atlas flag is flipped to " << (m_atlas ? "true" : "false") << "." + << "m_atlas flag is " << (m_atlas ? "true" : "false") << "." ); ATH_MSG_INFO ( "If you definitely want to use " << cablingName << ", " @@ -196,9 +173,6 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) ); } - ATH_MSG_INFO ( "compareTags() callback determined that the cabling is "<< cablingType ); - - m_tagsCompared=true; return StatusCode::SUCCESS; } diff --git a/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h b/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h index 61db6168b719cf288ead120f7e5ebb71937f4ae9..b83d780cfe38664bb6a8a94f7fb75458bba7df5e 100644 --- a/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h +++ b/MuonSpectrometer/MuonCablings/TGCcablingInterface/TGCcablingInterface/ITGCcablingServerSvc.h @@ -27,7 +27,7 @@ class ITGCcablingServerSvc : virtual public IInterface virtual bool isAtlas(void) const=0; virtual bool isConfigured(void) const=0; - virtual StatusCode compareTags(IOVSVC_CALLBACK_ARGS)=0; + virtual StatusCode compareTags() const=0; };