diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/CMakeLists.txt b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/CMakeLists.txt index 2f13ba47057756317ed9dca91892869a5cba2404..73cf461d9cb3a72219b4ee741b27ef4cc478d331 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/CMakeLists.txt +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface PRIVATE - Event/EventInfo MuonSpectrometer/MuonIdHelpers ) # External dependencies: @@ -30,12 +29,12 @@ atlas_add_library( MuonCondSvcLib INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface StoreGateLib SGtests MuonIdHelpersLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} EventInfo ) + PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) atlas_add_component( MuonCondSvc src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface EventInfo MuonIdHelpersLib MuonCondSvcLib ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel MuonCondData MuonCondInterface MuonIdHelpersLib MuonCondSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx index eb46aa0571eafad34519383b147d35b98a4a73ab..56f83e201a3315de48e1b58a0a50032b1344556e 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx @@ -10,6 +10,8 @@ //back out again to check. // author lampen@physics.arizona.edu +#include "CscCoolStrSvc.h" + #include <sstream> #include <vector> #include <algorithm>//for transform @@ -22,22 +24,11 @@ #include "CoralBase/AttributeListSpecification.h" #include "MuonIdHelpers/CscIdHelper.h" -// temporary includes to access CLOBs -//#include "CoolKernel/ExtendedAttributeListSpecification.h" -//#include "CoolKernel/PredefinedStorageHints.h" - //Calibration data containers #include "MuonCondData/CscCondDataCollection.h" -//#include "MuonCondData/CscCondDataCollectionBaseReader.h" #include "MuonCondData/CscCondDataContainer.h" #include "StoreGate/DataHandle.h" -#include "EventInfo/TagInfo.h" - -// root class for string manipulation -//#include "TString.h" - -#include "CscCoolStrSvc.h" using namespace std; namespace MuonCalib { @@ -1254,51 +1245,6 @@ namespace MuonCalib { return (int)hash; } - - //------------------------------------------------------------------- - bool CscCoolStrSvc::ignoreBadMultilayer() const - { - static bool haveChecked = false; - static bool ignoreIt = false; - - StoreGateSvc* detStore= 0; - StatusCode sc = serviceLocator()->service("DetectorStore",detStore); - if(sc.isFailure()) - { - m_log << MSG::WARNING << "Failed to retrieve detector store in ignoreBadMultilayer()" << endmsg; - return false; - } - - if(!haveChecked) - { - if(m_debug) m_log << "First time running ignoreBadMultilayer(). Checking geo tag." - << endmsg; - haveChecked = true; - //All geometries before the "ATLAS-GEO-xx-xx-xx" series had a bug where the - //wrong multilayer was set. As long as we are in ATLAS-GEO range, we should print - //a warning message if someone tries to request info from the wrong multilayer - const DataHandle<TagInfo> tagInfo; - if(detStore->retrieve(tagInfo).isFailure()) { - m_log << MSG::WARNING << "Could not retrieve tag info from TDS in ignore bad multilayer..." - << endmsg; - return false; - } - - std::string detdescr = ""; - tagInfo->findTag("GeoAtlas", detdescr); - if(m_debug) m_log << MSG::DEBUG << "DetDescr tag = " << detdescr << endmsg; - if ( detdescr.find ("ATLAS-") != std::string::npos ) - { - //Will print warning messages when bad multilayer requested in getParameter() - ignoreIt = false; - } - else - ignoreIt = true; - } - return ignoreIt; - }//end ignoreBadMultilayer - - //------------------------------------------------------------------- StatusCode CscCoolStrSvc::offlineToOnlineId(const Identifier & id, unsigned int &onlineId) const { diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.h index b4285372a7a83bd56e2e7aa7eefd02aa9edbbda5..201f21be89d09cc2b696a19f2caf894384f30c00 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.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 MUONCONDSVC_CSCCOOLSTRSVC_H @@ -25,11 +25,6 @@ #include "Identifier/Identifier.h" #include "MuonIdHelpers/CscIdHelper.h" -//#include "MuonGeoModel/MuonDetectorManager.h" -// temporary includes to access CLOBs -//#include "CoolKernel/ExtendedAttributeListSpecification.h" -//#include "CoolKernel/PredefinedStorageHints.h" - //Calib conditions data classes #include "MuonCondData/CscCondDataContainer.h" #include "MuonCondData/CscCondDataCollection.h" @@ -178,7 +173,6 @@ namespace MuonCalib { StatusCode cacheVersion2(std::istringstream &, CscCondDataCollectionBase * const); int swapChamberLayerReturnHash(const Identifier & id) const; - bool ignoreBadMultilayer() const; bool getVal( float& val, const CscCondDataCollection<float>& coll, unsigned int index) const; bool getVal( bool& val, const CscCondDataCollection<bool>& coll, unsigned int index) const; diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.icc b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.icc index 86a01452008d792a8d7f34347ee69765fe353f6b..b47132feb5a04a17696f7c209536e8a3eff6d11c 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.icc +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.icc @@ -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 */ @@ -62,18 +62,14 @@ namespace MuonCalib { condData = coll->at(newHash); if(condData) { - if(!ignoreBadMultilayer()) - { - if(m_numFailedRequests < m_maxFailedRequests) - m_log << MSG::WARNING << "Invalid chamber layer requested when retrieveing " - << parName - << ". Tried corresponding channel in valid chamber layer and found good data." - << endmsg; - if(m_numFailedRequests++ == m_maxFailedRequests) m_log << MSG::WARNING - << "Reached maximum number of problematic requests to CscCoolStrSvc. No further warnings will be printed." - << endmsg; - - } + if(m_numFailedRequests < m_maxFailedRequests) + m_log << MSG::WARNING << "Invalid chamber layer requested when retrieveing " + << parName + << ". Tried corresponding channel in valid chamber layer and found good data." + << endmsg; + if(m_numFailedRequests++ == m_maxFailedRequests) + m_log << MSG::WARNING << "Reached maximum number of problematic requests to CscCoolStrSvc. No further warnings will be printed." + << endmsg; } } }//end if "CHANNEL" category