diff --git a/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/MuonTGC_Cabling/MuonTGC_CablingSvc.h b/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/MuonTGC_Cabling/MuonTGC_CablingSvc.h index 28e7b6d63892060506b2e12f6bce56cfbce15aaa..5b4d4912e3bf8909b02bd4221b7ebaf21959fabb 100644 --- a/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/MuonTGC_Cabling/MuonTGC_CablingSvc.h +++ b/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/MuonTGC_Cabling/MuonTGC_CablingSvc.h @@ -334,8 +334,6 @@ class MuonTGC_CablingSvc : public ITGCcablingSvc int & pos, bool middle=false) const; - virtual - StatusCode updateCableASDToPP(IOVSVC_CALLBACK_ARGS_P(I, keys)); ///////////////////////////////////////////////////////////// // channel connection diff --git a/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/MuonTGC_CablingSvc.cxx b/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/MuonTGC_CablingSvc.cxx index 7f4464b333c66db12ebad04f3170ef03327ad8b2..77ef2cf8d3b79483c58e7bffb1d26340daf01487 100644 --- a/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/MuonTGC_CablingSvc.cxx +++ b/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/MuonTGC_CablingSvc.cxx @@ -181,15 +181,10 @@ StatusCode MuonTGC_CablingSvc::initialize(void) return StatusCode::FAILURE; } - const DataHandle<CondAttrListCollection> mapDataClob; - sc = detStore->regFcn(&MuonTGC_CablingSvc::updateCableASDToPP, - this, - mapDataClob, - folderName, - true); + sc = m_cabling->updateCableASDToPP(); if(!sc.isSuccess()) { - ATH_MSG_FATAL("Could not register &updateCableASDToPP against folder " << folderName); - return StatusCode::FAILURE; + ATH_MSG_WARNING("updateCableASDToPP failed"); + return StatusCode::SUCCESS; } return StatusCode::SUCCESS; @@ -1832,21 +1827,3 @@ bool MuonTGC_CablingSvc::getLowPtCoincidenceIDfromOfflineID(const Identifier & o pos, middle); } - -StatusCode MuonTGC_CablingSvc::updateCableASDToPP(IOVSVC_CALLBACK_ARGS_P(I, keys)) { - ATH_MSG_INFO("updateCableASDToPP called"); - - StatusCode sc = m_condDataTool->loadASD2PP_DIFF_12(I, keys); - if(!sc.isSuccess()) { - ATH_MSG_WARNING("loadASD2PP_DIFF_12 failed"); - return StatusCode::SUCCESS; - } - - sc = m_cabling->updateCableASDToPP(); - if(!sc.isSuccess()) { - ATH_MSG_WARNING("updateCableASDToPP failed"); - return StatusCode::SUCCESS; - } - - return StatusCode::SUCCESS; -} diff --git a/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/TGCCableASDToPP.cxx b/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/TGCCableASDToPP.cxx index 41fef937e6c1a5d9ac59b2a97585b253a95ab773..c33aeb2dee6423ba23bbb4a9b4e3afc990340bbb 100644 --- a/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/TGCCableASDToPP.cxx +++ b/MuonSpectrometer/MuonCablings/MuonTGC_Cabling/src/TGCCableASDToPP.cxx @@ -109,6 +109,12 @@ void TGCCableASDToPP::initialize(std::string& filename) StatusCode TGCCableASDToPP::updateDatabase() { if(m_tgcCablingDbTool.retrieve().isFailure()) return StatusCode::FAILURE; + + StatusCode sc = m_tgcCablingDbTool->readASD2PP_DIFF_12FromText(); + if(!sc.isSuccess()) { + return StatusCode::SUCCESS; + } + std::vector<std::string> *tmp_ASD2PP_DIFF_12 = m_tgcCablingDbTool->giveASD2PP_DIFF_12(); if(!tmp_ASD2PP_DIFF_12) return StatusCode::FAILURE; diff --git a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCablingConfig.py b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCablingConfig.py index b71857af95b41ce29a79ef8b96b94239f6bbd031..c4ec7d91b08aac3c0a36a62ac9b01e5447f12d97 100644 --- a/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCablingConfig.py +++ b/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCablingConfig.py @@ -113,6 +113,14 @@ if DetFlags.readRDOBS.TGC_on() or DetFlags.readRDOPool.TGC_on() or DetFlags.read from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC('TGC','/TGC/CABLING/MAP_SCHEMA','/TGC/CABLING/MAP_SCHEMA') + from TGC_CondCabling.TGC_CondCablingConf import TGCCablingDbTool + TGCCablingDbTool = TGCCablingDbTool() + if globalflags.DataSource() == 'geant4': + TGCCablingDbTool.filename_ASD2PP_DIFF_12='ASD2PP_diff_12_OFL.db' + else: + TGCCablingDbTool.filename_ASD2PP_DIFF_12='ASD2PP_diff_12_ONL.db' + ToolSvc+=TGCCablingDbTool + #if globalflags.DataSource() == 'geant4' and not DetFlags.digitize.TGC_on(): #conddb.addFolder("TGC_OFL","/TGC/TRIGGER/CW_EIFI") #conddb.addFolder("TGC_OFL","/TGC/TRIGGER/CW_BW") diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/CMakeLists.txt index ef633c99832bcbbbfdec248bf6c0ba4027d6d59a..3a35556ccbf486a1d61e9a3876c26019849d18f8 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/CMakeLists.txt +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/CMakeLists.txt @@ -27,4 +27,4 @@ atlas_add_component( TGC_CondCabling # Install files from the package: atlas_install_headers( TGC_CondCabling ) - +atlas_install_runtime( share/*.db ) diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h index 28336fc1ace1230c1031bcf801d3dcb87c213047..be4dd8954e3a7fb3524c343b0c0cc53eeb5533a0 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h @@ -38,11 +38,11 @@ class TGCCablingDbTool: public AthAlgTool, public ITGCCablingDbTool virtual StatusCode loadParameters(IOVSVC_CALLBACK_ARGS); /** Load parameters using the folder name */ virtual StatusCode loadASD2PP_DIFF_12(IOVSVC_CALLBACK_ARGS); - - private: /** Load parameters from text database */ virtual StatusCode readASD2PP_DIFF_12FromText(); + private: + /** IIOVSvc member */ IIOVSvc* m_IOVSvc; /** IChronoStatSvc member */ diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/share/ASD2PP_diff_12_OFL.db b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/share/ASD2PP_diff_12_OFL.db new file mode 100644 index 0000000000000000000000000000000000000000..ef718196a0c214c8aa8cacb7440acd3049f04cc7 --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/share/ASD2PP_diff_12_OFL.db @@ -0,0 +1,45 @@ +//---------------------------------------------------------------------- +// ASD2PP_diff.db +//----------- +// Connection information between ASDs and Patch Panels (PPs) +// This file describes diff from ASD2PP.db +// +// Table contents: iii nnnn +// iii = PP type +// nnnn = Number of channels +// +// |- ASD -||-- PP -| +// q r s t uuu x y zz +// q = Side ( 0: A , 1:C ) +// r = Sector ID +// s = Layer ID +// t = Chamber ID +// uuu = Wire-group ID +// x = PP ID +// y = PP input-connector ID +// zz = PP input-channel ID of a connector +//---------------------------------------------------------------------- +// OWNER: Hisaya Kurashige SECTION: Connection +// +// +// Date Who Explanation of Changes +// ----------- ------- ----------------------------------- +// Version 0.00 29-OCT-2008 HK Creation +// Version 0.01 22-JUL-2009 Susumu Update for simulationd; just added +// this message +// +//---------------------------------------------------------------------- +// +EWT 0 +EWD 0 +EST 0 +ESD 0 +FWT 0 +FWD 0 +FST 0 +FSD 0 +EWI 0 +ESI 0 +FWI 0 +FSI 0 +// diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/share/ASD2PP_diff_12_ONL.db b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/share/ASD2PP_diff_12_ONL.db new file mode 100644 index 0000000000000000000000000000000000000000..ab2243ac54000d3df8154e34486d656ceb3b3efd --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/share/ASD2PP_diff_12_ONL.db @@ -0,0 +1,120 @@ +//---------------------------------------------------------------------- +// ASD2PP_diff.db +//----------- +// Connection information between ASDs and Patch Panels (PPs) +// This file describes diff from ASD2PP.db +// +// Table contents: iii nnnn +// iii = PP type +// nnnn = Number of channels +// +// |- ASD -||-- PP -| +// q r s t uuu x y zz +// q = Side ( 0: A , 1:C ) +// r = Sector ID +// s = Layer ID +// t = Chamber ID +// uuu = Wire-group ID +// x = PP ID +// y = PP input-connector ID +// zz = PP input-channel ID of a connector +//---------------------------------------------------------------------- +// OWNER: Hisaya Kurashige SECTION: Connection +// +// +// Date Who Explanation of Changes +// ----------- ------- ----------------------------------- +// Version 0.00 29-OCT-2008 HK Creation +// Version 0.01 22-JUL-2009 Susumu Update for simulationd; just added +// this message +// Version 0.02 22-JUL-2009 Susumu Update for data; just added this +// message +// Version 1.00 9-OCT-2009 HK Layer Swap for Endcap A10 Phi2 +// EWT2 and EWT3 +// Version 1.01 28-OCT-2009 Susumu Fixed Layer ID (3->2) +// Version 1.02 8-SEP-2010 Susumu Fixed PP input-connector ID +// (0->2, 2->3, 3->0) +//-------------------------------------------------------------------- +// +EWT 69 + 0 38 2 1 0 1 2 4 + 0 38 2 1 1 1 2 5 + 0 38 2 1 2 1 2 6 + 0 38 2 1 3 1 2 7 + 0 38 2 1 4 1 2 8 + 0 38 2 1 5 1 2 9 + 0 38 2 1 6 1 2 10 + 0 38 2 1 7 1 2 11 + 0 38 2 1 8 1 2 12 + 0 38 2 1 9 1 2 13 + 0 38 2 1 10 1 2 14 + 0 38 2 1 11 1 2 15 + 0 38 2 1 12 1 2 16 + 0 38 2 1 13 1 2 17 + 0 38 2 1 14 1 2 18 + 0 38 2 1 15 1 2 19 + 0 38 2 1 16 1 2 20 + 0 38 2 1 17 1 2 21 + 0 38 2 1 18 1 2 22 + 0 38 2 1 19 1 2 23 + 0 38 2 1 20 1 2 24 + 0 38 2 1 21 1 2 25 + 0 38 2 1 22 1 2 26 + 0 38 0 1 0 1 3 4 + 0 38 0 1 1 1 3 5 + 0 38 0 1 2 1 3 6 + 0 38 0 1 3 1 3 7 + 0 38 0 1 4 1 3 8 + 0 38 0 1 5 1 3 9 + 0 38 0 1 6 1 3 10 + 0 38 0 1 7 1 3 11 + 0 38 0 1 8 1 3 12 + 0 38 0 1 9 1 3 13 + 0 38 0 1 10 1 3 14 + 0 38 0 1 11 1 3 15 + 0 38 0 1 12 1 3 16 + 0 38 0 1 13 1 3 17 + 0 38 0 1 14 1 3 18 + 0 38 0 1 15 1 3 19 + 0 38 0 1 16 1 3 20 + 0 38 0 1 17 1 3 21 + 0 38 0 1 18 1 3 22 + 0 38 0 1 19 1 3 23 + 0 38 0 1 20 1 3 24 + 0 38 0 1 21 1 3 25 + 0 38 0 1 22 1 3 26 + 0 38 1 1 0 1 0 4 + 0 38 1 1 1 1 0 5 + 0 38 1 1 2 1 0 6 + 0 38 1 1 3 1 0 7 + 0 38 1 1 4 1 0 8 + 0 38 1 1 5 1 0 9 + 0 38 1 1 6 1 0 10 + 0 38 1 1 7 1 0 11 + 0 38 1 1 8 1 0 12 + 0 38 1 1 9 1 0 13 + 0 38 1 1 10 1 0 14 + 0 38 1 1 11 1 0 15 + 0 38 1 1 12 1 0 16 + 0 38 1 1 13 1 0 17 + 0 38 1 1 14 1 0 18 + 0 38 1 1 15 1 0 19 + 0 38 1 1 16 1 0 20 + 0 38 1 1 17 1 0 21 + 0 38 1 1 18 1 0 22 + 0 38 1 1 19 1 0 23 + 0 38 1 1 20 1 0 24 + 0 38 1 1 21 1 0 25 + 0 38 1 1 22 1 0 26 +EWD 0 +EST 0 +ESD 0 +FWT 0 +FWD 0 +FST 0 +FSD 0 +EWI 0 +ESI 0 +FWI 0 +FSI 0 +// diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx index f2fad6259eba168be05f81fdd110f7935a8a89ae..125d8446612e5260b5ce96c5b40cdfce4276329e 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx @@ -30,8 +30,8 @@ TGCCablingDbTool::TGCCablingDbTool(const std::string& type, declareProperty("Folder", m_Folder="/TGC/CABLING/MAP_SCHEMA"); // ASD2PP_diff_12.db is the text database for the TGCcabling12 package - declareProperty("filename_ASD2PP_DIFF_12", m_filename="ASD2PP_diff_12.db"); - declareProperty("readASD2PP_DIFF_12FromText", m_readASD2PP_DIFF_12FromText=false); + declareProperty("filename_ASD2PP_DIFF_12", m_filename="ASD2PP_diff_12_ONL.db"); + declareProperty("readASD2PP_DIFF_12FromText", m_readASD2PP_DIFF_12FromText=true); } @@ -207,7 +207,7 @@ StatusCode TGCCablingDbTool::readASD2PP_DIFF_12FromText() { // Copy database into m_ASD2PP_DIFF_12 while(getline(inASDToPP, buf)){ m_ASD2PP_DIFF_12->push_back(buf); - ATH_MSG_INFO(m_filename.c_str() << " L" << ++nLines << ": " << buf.c_str()); + ATH_MSG_DEBUG(m_filename.c_str() << " L" << ++nLines << ": " << buf.c_str()); } inASDToPP.close(); diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCCablingDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCCablingDbTool.h index b036b7ada14bb8bba4a71e373b4d09a421a1237e..1c9f8cabefb4cf9a8ec4c821abf9789c097ec063 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCCablingDbTool.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCCablingDbTool.h @@ -27,6 +27,8 @@ class ITGCCablingDbTool: virtual public IAlgTool, virtual StatusCode loadASD2PP_DIFF_12(IOVSVC_CALLBACK_ARGS) = 0; + virtual StatusCode readASD2PP_DIFF_12FromText() = 0; + virtual std::vector<std::string>* giveASD2PP_DIFF_12(void) = 0; virtual std::string getFolderName(void) const = 0;