Skip to content
Snippets Groups Projects
Commit 61d5e104 authored by Tomoe Kishimoto's avatar Tomoe Kishimoto
Browse files

Removed callback function in TGCcablingServerSvc (ATLASRECTS-4733)

The callback function in the TGCcablingServerSvc is used to swap the
old TGC cabling service (8-fold) and the current TGC cabling service
(12-fold). The callback function has been removed because the old TGC
cabling service will not be used in Run3 releases. RunTier0Tests.py
passed.


Former-commit-id: 5519be83
parent 7bb4d6a9
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ class TGCcablingServerSvc : public AthService, ...@@ -40,7 +40,7 @@ class TGCcablingServerSvc : public AthService,
virtual bool isAtlas(void) const; virtual bool isAtlas(void) const;
virtual bool isConfigured(void) const; virtual bool isConfigured(void) const;
virtual StatusCode compareTags(IOVSVC_CALLBACK_ARGS); virtual StatusCode compareTags() const;
}; };
#endif #endif
......
...@@ -63,23 +63,8 @@ TGCcablingServerSvc::initialize() ...@@ -63,23 +63,8 @@ TGCcablingServerSvc::initialize()
} else { } else {
tagInfoKey = m_tagInfoMgr->tagInfoKey(); tagInfoKey = m_tagInfoMgr->tagInfoKey();
} }
if(m_forcedUse) { // Selected cabling is used without comparison m_tagsCompared = true;
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 );
}
}
ATH_MSG_DEBUG ( "... done!" ); ATH_MSG_DEBUG ( "... done!" );
return sc; return sc;
...@@ -95,10 +80,9 @@ TGCcablingServerSvc::giveCabling(const ITGCcablingSvc*& cabling) const { ...@@ -95,10 +80,9 @@ TGCcablingServerSvc::giveCabling(const ITGCcablingSvc*& cabling) const {
ATH_MSG_DEBUG ( "requesting instance of TGCcabling" ); ATH_MSG_DEBUG ( "requesting instance of TGCcabling" );
if (!this->isConfigured()) { if (!this->isConfigured()) {
ATH_MSG_ERROR("The tagsCompared callback has not yet happened! Taking default configuration ("<< (m_atlas ? "12-fold cabling." : "8-fold cabling") ATH_MSG_ERROR("TGCcablingServerSvc has not been cofigured.");
<<" Move this call to execute() / beginRun() to get rid of this WARNING message (or set the forcedUse property to True)");
} }
cabling = 0; cabling = 0;
if(m_atlas) { if(m_atlas) {
...@@ -115,8 +99,7 @@ TGCcablingServerSvc::isAtlas() const { ...@@ -115,8 +99,7 @@ TGCcablingServerSvc::isAtlas() const {
MsgStream log(msgSvc(), name()); MsgStream log(msgSvc(), name());
if (!this->isConfigured()) { if (!this->isConfigured()) {
ATH_MSG_ERROR("The tagsCompared callback has not yet happened! Taking default configuration ("<< (m_atlas ? "12-fold cabling." : "8-fold cabling") ATH_MSG_ERROR("TGCcablingServerSvc has not been cofigured.");
<<" Move this call to execute() / beginRun() to get rid of this WARNING message (or set the forcedUse property to True)");
} }
return m_atlas; return m_atlas;
} }
...@@ -127,11 +110,10 @@ TGCcablingServerSvc::isConfigured() const { ...@@ -127,11 +110,10 @@ TGCcablingServerSvc::isConfigured() const {
} }
StatusCode StatusCode
TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) TGCcablingServerSvc::compareTags() const {
{
bool tagMatch = true; bool tagMatch = true;
ATH_MSG_INFO ( "compareTags() callback triggered" ); ATH_MSG_DEBUG ( "compareTags() callback triggered" );
// Get TagInfo and retrieve tags // Get TagInfo and retrieve tags
const TagInfo* tagInfo = 0; const TagInfo* tagInfo = 0;
...@@ -146,7 +128,7 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) ...@@ -146,7 +128,7 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS)
} else { } else {
tagInfo->findInputTag("TGC_CablingType", cablingType); tagInfo->findInputTag("TGC_CablingType", cablingType);
ATH_MSG_INFO ATH_MSG_DEBUG
( "TGC_CablingType from TagInfo: " << cablingType ); ( "TGC_CablingType from TagInfo: " << cablingType );
if(cablingType=="") { if(cablingType=="") {
...@@ -164,21 +146,16 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) ...@@ -164,21 +146,16 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS)
if (!tagMatch) { if (!tagMatch) {
std::string cablingName; std::string cablingName;
std::string flagAtlas;
if (m_atlas) { if (m_atlas) {
cablingName = "TGCcabling12 (12-fold)"; cablingName = "TGCcabling12 (12-fold)";
flagAtlas = "True";
m_atlas = false;
} else { } else {
cablingName = "TGCcabling (8-fold)"; cablingName = "TGCcabling (8-fold)";
flagAtlas = "False";
m_atlas = true;
} }
ATH_MSG_INFO ATH_MSG_ERROR
( "TGC_CablingType : " << cablingType << " is mismatched " ( "TGC_CablingType : " << cablingType << " is mismatched "
<< "with TGCcablingServerSvc configuration of "<< cablingName << ". " << "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 ATH_MSG_INFO
( "If you definitely want to use " << cablingName << ", " ( "If you definitely want to use " << cablingName << ", "
...@@ -196,9 +173,6 @@ TGCcablingServerSvc::compareTags(IOVSVC_CALLBACK_ARGS) ...@@ -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; return StatusCode::SUCCESS;
} }
...@@ -27,7 +27,7 @@ class ITGCcablingServerSvc : virtual public IInterface ...@@ -27,7 +27,7 @@ class ITGCcablingServerSvc : virtual public IInterface
virtual bool isAtlas(void) const=0; virtual bool isAtlas(void) const=0;
virtual bool isConfigured(void) const=0; virtual bool isConfigured(void) const=0;
virtual StatusCode compareTags(IOVSVC_CALLBACK_ARGS)=0; virtual StatusCode compareTags() const=0;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment