From 946bc4f5ee839ebd5d49fb1b08ae8297957a4b6c Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Tue, 8 May 2018 15:46:08 +0000 Subject: [PATCH] Migration from SCT_ConditionsSummaryService to SCT_ConditionsSummaryTool (ATLASRECTS-4370) Former-commit-id: a4c910511295479bc25e975745fcc9a6f03b231b --- .../RegionSelector/src/RegSelSvc.cxx | 71 +++-- .../RegionSelector/src/RegSelSvc.h | 2 +- .../SCT_CalibAlgs/share/skeleton.sct_calib.py | 2 +- .../SCT_ConditionsAlgorithms/CMakeLists.txt | 5 +- .../share/testLinkMasking.py | 2 +- .../src/SCT_RODVetoCondAlg.h | 1 - .../python/SCT_FlaggedConditionToolSetup.py | 2 +- .../python/createLinkMaskingSQLiteFile.py | 2 +- .../src/SCT_ConditionsSummaryTool.h | 2 +- .../src/SCT_FlaggedConditionTool.cxx | 8 + .../src/SCT_MonitorConditionsTool.cxx | 2 +- .../share/InDetRecConditionsAccess.py | 167 ++++++------ .../share/InDetRecLoadTools.py | 9 +- .../share/InDetRecPreProcessingSilicon.py | 6 +- .../python/InDetTrigConditionsAccess.py | 2 +- .../python/InDetTrigConfigConditions.py | 251 ++++++------------ .../python/InDetTrigConfigRecLoadTools.py | 10 +- .../InDetTrigConfigRecLoadToolsLowPt.py | 4 +- .../python/InDetTrigConfigRecNewTracking.py | 2 +- .../python/InDetTrigConfigRecPreProcessing.py | 6 +- .../share/InDetTrigRec_jobOptions.py | 2 +- .../InDetGlobalMonitoring/CMakeLists.txt | 1 - .../SCT_Monitoring/SCTErrMonTool.h | 1 - .../SCT_Monitoring/SCTRatioNoiseMonTool.h | 8 +- .../share/SCTMonitor_topOptions.py | 53 ++-- .../src/SCTRatioNoiseMonTool.cxx | 13 +- .../InDetPrepRawDataFormation/CMakeLists.txt | 2 - .../SCT_Clusterization.h | 6 +- .../src/SCT_Clusterization.cxx | 9 +- .../InDetTestPixelLayerTool.h | 1 - .../InDetTrackHoleSearchTool.h | 6 +- .../src/InDetTrackHoleSearchTool.cxx | 19 +- .../SiClusterizationTool/SCT_ClusteringTool.h | 11 +- .../src/SCT_ClusteringTool.cxx | 9 +- .../src/SCT_ReClustering.cxx | 1 - .../SiClusterizationTool_entries.cxx | 4 - .../SiCombinatorialTrackFinder_xk.h | 4 +- .../SiTools_xk.h | 9 +- .../src/SiCombinatorialTrackFinder_xk.cxx | 19 +- .../InDetTrigPrepRawDataFormat/CMakeLists.txt | 2 +- .../SCT_TrgClusterization.h | 7 +- .../src/SCT_TrgClusterization.cxx | 18 +- .../TrigTrackResidualMonitor.h | 1 - .../python/InDetPhysValDecoration.py | 8 +- .../python/CombinedMuonTrackSummary.py | 2 +- .../python/EMBremCollectionBuilder.py | 12 +- .../SiliconLayerAssociator.h | 4 +- .../src/SiliconLayerAssociator.cxx | 2 - .../python/ISF_FatrasServicesConfig.py | 4 +- .../ISF_FatrasToolsID/HitCreatorSilicon.h | 6 +- .../src/HitCreatorSilicon.cxx | 31 ++- .../python/TrigFastTrackFinder_Config.py | 3 + .../FastTrackSimWrap/DumpSp.h | 4 +- .../TrigFTK/FastTrackSimWrap/src/DumpSp.cxx | 14 +- .../TrigFTKSim/TrigFTKSim/FTKDetectorTool.h | 4 +- .../TrigFTKSim/src/FTKDetectorTool.cxx | 14 +- .../python/TrigInDetRecoTools_ConfigC.py | 10 +- .../TrigOnlineSpacePointTool/CMakeLists.txt | 2 +- .../python/TrigOnlineSpacePointTool_Config.py | 3 +- .../TrigUpgradeTest/python/InDetSetup.py | 39 +-- .../share/Trigger_topOptions_standalone.py | 4 +- .../share/skeleton.BStoTRIGBS.fails.py | 2 +- .../share/skeleton.BStoTRIGBS.py | 2 +- 63 files changed, 439 insertions(+), 493 deletions(-) rename InnerDetector/InDetConditions/{SCT_ConditionsServices => SCT_ConditionsTools}/python/createLinkMaskingSQLiteFile.py (98%) diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx index e8e5b7c5303..cfec3b9bb54 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx @@ -28,9 +28,7 @@ #include "AthenaPoolUtilities/AthenaAttributeList.h" #include "InDetConditionsSummaryService/IInDetConditionsSvc.h" -// #include "PixelConditionsServices/PixelConditionsSummarySvc.h" -// #include "SCT_ConditionsServices/SCT_ConditionsSummarySvc.h" -// #include "TRT_ConditionsServices/TRT_ConditionsSummarySvc.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" //#include <pthread.h> @@ -114,7 +112,7 @@ RegSelSvc::RegSelSvc(const std::string& name, ISvcLocator* sl) declareProperty( "DisableSCTFromConditions", m_disableSCTFromConditions=true, "disable SCT modules based on the conditions summary svc"); declareProperty( "DisableTRTFromConditions", m_disableTRTFromConditions=true, "disable TRT modules based on the conditions summary svc"); declareProperty( "PixConditionsSvc", m_PixConditionsSvc="PixelConditionsSummarySvc", "name of conditions summary svc for the pixels"); - declareProperty( "SCTConditionsSvc", m_SCTConditionsSvc="SCT_ConditionsSummarySvc", "name of conditions summary svc for the SCT"); + declareProperty( "SCTConditionsTool", m_SCTConditionsTool="SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "name of conditions summary tool for the SCT"); declareProperty( "TRTConditionsSvc", m_TRTConditionsSvc="TRT_ConditionsSummarySvc", "name of conditions summary svc for the TRT"); } @@ -335,15 +333,6 @@ void RegSelSvc::disableIDFromConditions(RegSelSiLUT* detector, const std::string if ( detector ) { - // get ConditionsSummarySvc - - ServiceHandle<IInDetConditionsSvc> condsummary(serviceName, name()); - - if ( condsummary.retrieve().isFailure() ) { - ATH_MSG_ERROR( "failed to get " << serviceName ); - return; - } - // get list of all detector elements for this detector std::vector<IdentifierHash> IDList; @@ -369,19 +358,48 @@ void RegSelSvc::disableIDFromConditions(RegSelSiLUT* detector, const std::string std::vector<IdentifierHash>::iterator mitr(IDList.begin()); std::vector<IdentifierHash>::iterator mend(IDList.end()); - while ( mitr!=mend ) { - - if ( condsummary->isActive(*mitr) ) { - EnableList.push_back(*mitr); - active_modules++; + if ( detector==m_newsct ) { + // get ConditionsSummaryTool + ToolHandle<IInDetConditionsTool> condsummary(serviceName, this); + if ( condsummary.retrieve().isFailure() ) { + ATH_MSG_ERROR( "failed to get " << serviceName ); + return; } - else { - DisableList.push_back(*mitr); - disabled_modules++; + + while ( mitr!=mend ) { + if ( condsummary->isActive(*mitr) ) { + EnableList.push_back(*mitr); + active_modules++; + } + else { + DisableList.push_back(*mitr); + disabled_modules++; + } + ATH_MSG_VERBOSE( serviceName << " module 0x" << std::hex << *mitr << std::dec + << " isActive()=" << condsummary->isActive(*mitr) ); + mitr++; + } + } else { + // get ConditionsSummarySvc + ServiceHandle<IInDetConditionsSvc> condsummary(serviceName, name()); + if ( condsummary.retrieve().isFailure() ) { + ATH_MSG_ERROR( "failed to get " << serviceName ); + return; + } + + while ( mitr!=mend ) { + if ( condsummary->isActive(*mitr) ) { + EnableList.push_back(*mitr); + active_modules++; + } + else { + DisableList.push_back(*mitr); + disabled_modules++; + } + ATH_MSG_VERBOSE( serviceName << " module 0x" << std::hex << *mitr << std::dec + << " isActive()=" << condsummary->isActive(*mitr) ); + mitr++; } - ATH_MSG_VERBOSE( serviceName << " module 0x" << std::hex << *mitr << std::dec - << " isActive()=" << condsummary->isActive(*mitr) ); - mitr++; } ATH_MSG_INFO( serviceName << " Number of modules active " << active_modules ); @@ -2237,9 +2255,8 @@ bool RegSelSvc::reinitialiseInternal() { // and now handle all the disabling for the sct ... if ( m_initSCT.value() ) { - // first disable modules from the conditions summary services - // if ( m_disableFromConditions ) disableIDFromConditions(m_newsct, "SCT_ConditionsSummarySvc"); - if ( m_disableFromConditions && m_disableSCTFromConditions ) disableIDFromConditions(m_newsct, m_SCTConditionsSvc); + // first disable modules from the conditions summary tool + if ( m_disableFromConditions && m_disableSCTFromConditions ) disableIDFromConditions(m_newsct, m_SCTConditionsTool); // now *disable* the modules from robs the user has flagged if ( m_deleteRobList.size() ) m_newsct->disableRobList(m_deleteRobList); diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.h b/DetectorDescription/RegionSelector/src/RegSelSvc.h index 05fc35dc552..e34244951b8 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.h +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.h @@ -496,7 +496,7 @@ private: RegSelSiLUT* m_newcsc; StringProperty m_PixConditionsSvc; - StringProperty m_SCTConditionsSvc; + StringProperty m_SCTConditionsTool; StringProperty m_TRTConditionsSvc; BooleanProperty m_initFTK; diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py index 249cd9f1749..49fd279dd11 100644 --- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py +++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/share/skeleton.sct_calib.py @@ -381,7 +381,7 @@ conddb.addFolder("SCT_OFL","<db>COOLOFL_SCT/CONDBR2</db> /SCT/Derived/Monitoring sctDerivedMonitoringFolder = '/SCT/Derived/Monitoring' from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") -from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_MonitorConditionsCondAlg +from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_MonitorConditionsCondAlg condSeq += SCT_MonitorConditionsCondAlg(name = "SCT_MonitorConditionsCondAlg", ReadKey = sctDerivedMonitoringFolder) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index bdaa21edaff..369c884186f 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -21,8 +21,7 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODEventInfo PRIVATE InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetDetDescr/InDetReadoutGeometry - InnerDetector/InDetConditions/SCT_ConditionsServices ) + InnerDetector/InDetDetDescr/InDetReadoutGeometry ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -32,6 +31,6 @@ atlas_add_component( SCT_ConditionsAlgorithms src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry SCT_ConditionsServicesLib SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry SCT_ConditionsToolsLib ) # Install files from the package: diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py index fb3b86862de..8409270159a 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testLinkMasking.py @@ -71,7 +71,7 @@ conddb.addFolderSplitMC("SCT", "/SCT/DAQ/Config/MUR", "/SCT/DAQ/Config/MUR") from SCT_ConditionsTools.SCT_LinkMaskingToolSetup import SCT_LinkMaskingToolSetup sct_LinkMaskingToolSetup = SCT_LinkMaskingToolSetup() sct_LinkMaskingToolSetup.setFolderDb("<dbConnection>sqlite://;schema=LinkMasking.db;dbname=CONDBR2</dbConnection>/purple/pants") -# This folder can be created by SCT_ConditionsServices/python/createLinkMaskingSQLiteFile.py +# This folder can be created by SCT_ConditionsTools/python/createLinkMaskingSQLiteFile.py sct_LinkMaskingToolSetup.setup() from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_LinkMaskingTestAlg diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h index 33721c2a2c9..23b880bdaa7 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_RODVetoCondAlg.h @@ -22,7 +22,6 @@ #include "AthenaBaseComps/AthAlgorithm.h" #include "Identifier/Identifier.h" #include "StoreGate/WriteHandle.h" -#include "SCT_ConditionsServices/ISCT_ConditionsSvc.h" #include "SCT_Cabling/ISCT_CablingSvc.h" #include "SCT_ConditionsData/IdentifierSet.h" diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py index 9c55eae4be8..e17fda14c6b 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_FlaggedConditionToolSetup.py @@ -10,7 +10,7 @@ class SCT_FlaggedConditionToolSetup: def setTool(self): from AthenaCommon.AppMgr import ToolSvc if not hasattr(ToolSvc, self.toolName): - from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_FlaggedConditionTool + from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_FlaggedConditionTool ToolSvc += SCT_FlaggedConditionTool(name = self.toolName) self.tool = getattr(ToolSvc, self.toolName) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/python/createLinkMaskingSQLiteFile.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/createLinkMaskingSQLiteFile.py similarity index 98% rename from InnerDetector/InDetConditions/SCT_ConditionsServices/python/createLinkMaskingSQLiteFile.py rename to InnerDetector/InDetConditions/SCT_ConditionsTools/python/createLinkMaskingSQLiteFile.py index 3966fef155f..94782586c2c 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsServices/python/createLinkMaskingSQLiteFile.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/createLinkMaskingSQLiteFile.py @@ -2,7 +2,7 @@ # Taken from InnerDetector/InDetRecTools/TRT_ElectronPidTools/DatabaseTools/WritePyCoolAll.py # https://twiki.cern.ch/twiki/bin/view/Atlas/ConditionsSimpleExample -# Usage: python ../athena/InnerDetector/InDetConditions/SCT_ConditionsServices/python/createLinkMaskingSQLiteFile.py +# Usage: python ../athena/InnerDetector/InDetConditions/SCT_ConditionsTools/python/createLinkMaskingSQLiteFile.py import sys from PyCool import cool diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConditionsSummaryTool.h b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConditionsSummaryTool.h index f57b15c0d27..0cb9c3ee99e 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConditionsSummaryTool.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ConditionsSummaryTool.h @@ -38,7 +38,7 @@ public: virtual StatusCode finalize() override; //!< Tool finalize //@} - //@name reimplemented from IInDetConditionsSvc + //@name reimplemented from IInDetConditionsTool //@{ virtual bool isActive(const Identifier& elementId, const InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override; virtual bool isActive(const IdentifierHash& elementHash) const override; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_FlaggedConditionTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_FlaggedConditionTool.cxx index 5a8572628a4..d37936efcdb 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_FlaggedConditionTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_FlaggedConditionTool.cxx @@ -28,6 +28,14 @@ StatusCode SCT_FlaggedConditionTool::initialize() { return StatusCode::FAILURE; } + // A dirty fix of a configuration of InDetTrigInDetSCT_FlaggedConditionTool for InDetTrigInDetSCT_ConditionsSummaryTool + if (name().find("InDetTrigInDetSCT_FlaggedConditionTool")!=std::string::npos) { + if (m_badIds.key()=="SCT_FlaggedCondData") { + m_badIds = SG::ReadHandleKey<SCT_FlaggedCondData>("SCT_FlaggedCondData_TRIG"); + ATH_MSG_INFO("Key of SCT_FlaggedCondData is changed to SCT_FlaggedCondData_TRIG in " << name()); + } + } + ATH_CHECK(m_badIds.initialize()); return StatusCode::SUCCESS; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx index 53232b3da74..473d8ba793d 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_MonitorConditionsTool.cxx @@ -6,7 +6,7 @@ * @file SCT_MonitorConditionsTool.cxx * * @brief Implementation file for the SCT_MonitorConditionsTool class - * in package SCT_ConditionsServices + * in package SCT_ConditionsTools * * @author Kazu * @date 5 March 2008 diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index 64064ec73a6..bf5933482a1 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -201,13 +201,13 @@ if DetFlags.haveRIO.pixel_on(): # if DetFlags.haveRIO.SCT_on(): - # Load conditions summary service - from SCT_ConditionsServices.SCT_ConditionsSummarySvcSetup import SCT_ConditionsSummarySvcSetup - sct_ConditionsSummarySvcSetup = SCT_ConditionsSummarySvcSetup() - sct_ConditionsSummarySvcSetup.setup() - InDetSCT_ConditionsSummarySvc = sct_ConditionsSummarySvcSetup.getSvc() + # Load conditions summary tool + from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup + sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetup.setup() + InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): - print InDetSCT_ConditionsSummarySvc + print InDetSCT_ConditionsSummaryTool # Load conditions configuration service and load folders and algorithm for it # Load folders that have to exist for both MC and Data @@ -233,16 +233,6 @@ if DetFlags.haveRIO.SCT_on(): SCTConfigurationFolderPath='' except: pass - from SCT_ConditionsServices.SCT_ConfigurationConditionsSvcSetup import SCT_ConfigurationConditionsSvcSetup - sct_ConfigurationConditionsSvcSetup = SCT_ConfigurationConditionsSvcSetup() - sct_ConfigurationConditionsSvcSetup.setChannelFolder(SCTConfigurationFolderPath+"Chip") - sct_ConfigurationConditionsSvcSetup.setModuleFolder(SCTConfigurationFolderPath+"Module") - sct_ConfigurationConditionsSvcSetup.setMurFolder(SCTConfigurationFolderPath+"MUR") - sct_ConfigurationConditionsSvcSetup.setup() - InDetSCT_ConfigurationConditionsSvc = sct_ConfigurationConditionsSvcSetup.getSvc() - if (InDetFlags.doPrintConfigurables()): - print InDetSCT_ConfigurationConditionsSvc - # The same for tool from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup() sct_ConfigurationConditionsToolSetup.setChannelFolder(SCTConfigurationFolderPath+"Chip") @@ -253,50 +243,42 @@ if DetFlags.haveRIO.SCT_on(): if (InDetFlags.doPrintConfigurables()): print InDetSCT_ConfigurationConditionsTool - # Load calibration conditions service - from SCT_ConditionsServices.SCT_ReadCalibDataSvcSetup import SCT_ReadCalibDataSvcSetup - sct_ReadCalibDataSvcSetup = SCT_ReadCalibDataSvcSetup() - sct_ReadCalibDataSvcSetup.setup() - InDetSCT_ReadCalibDataSvc = sct_ReadCalibDataSvcSetup.getSvc() + # Load calibration conditions tool + from SCT_ConditionsTools.SCT_ReadCalibDataToolSetup import SCT_ReadCalibDataToolSetup + sct_ReadCalibDataToolSetup = SCT_ReadCalibDataToolSetup() + sct_ReadCalibDataToolSetup.setup() + InDetSCT_ReadCalibDataTool = sct_ReadCalibDataToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): - print InDetSCT_ReadCalibDataSvc + print InDetSCT_ReadCalibDataTool - # Load flagged condition service - from SCT_ConditionsServices.SCT_FlaggedConditionSvcSetup import SCT_FlaggedConditionSvcSetup - sct_FlaggedConditionSvcSetup = SCT_FlaggedConditionSvcSetup() - sct_FlaggedConditionSvcSetup.setup() - InDetSCT_FlaggedConditionSvc = sct_FlaggedConditionSvcSetup.getSvc() + # Load flagged condition tool + from SCT_ConditionsTools.SCT_FlaggedConditionToolSetup import SCT_FlaggedConditionToolSetup + sct_FlaggedConditionToolSetup = SCT_FlaggedConditionToolSetup() + sct_FlaggedConditionToolSetup.setup() + InDetSCT_FlaggedConditionTool = sct_FlaggedConditionToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): - print InDetSCT_FlaggedConditionSvc + print InDetSCT_FlaggedConditionTool - # Load conditions Monitoring service + # Load conditions Monitoring tool if not athenaCommonFlags.isOnline(): - from SCT_ConditionsServices.SCT_MonitorConditionsSvcSetup import SCT_MonitorConditionsSvcSetup - sct_MonitorConditionsSvcSetup = SCT_MonitorConditionsSvcSetup() - sct_MonitorConditionsSvcSetup.setOutputLevel(INFO) - sct_MonitorConditionsSvcSetup.setup() - InDetSCT_MonitorConditionsSvc = sct_MonitorConditionsSvcSetup.getSvc() + from SCT_ConditionsTools.SCT_MonitorConditionsToolSetup import SCT_MonitorConditionsToolSetup + sct_MonitorConditionsToolSetup = SCT_MonitorConditionsToolSetup() + sct_MonitorConditionsToolSetup.setOutputLevel(INFO) + sct_MonitorConditionsToolSetup.setup() + InDetSCT_MonitorConditionsTool = sct_MonitorConditionsToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): - print InDetSCT_MonitorConditionsSvc + print InDetSCT_MonitorConditionsTool if InDetFlags.doSCTModuleVeto(): - from SCT_ConditionsServices.SCT_ModuleVetoSvcSetup import SCT_ModuleVetoSvcSetup - sct_ModuleVetoSvcSetup = SCT_ModuleVetoSvcSetup() - sct_ModuleVetoSvcSetup.setup() - InDetSCT_ModuleVetoSvc = sct_ModuleVetoSvcSetup.getSvc() + from SCT_ConditionsTools.SCT_ModuleVetoToolSetup import SCT_ModuleVetoToolSetup + sct_ModuleVetoToolSetup = SCT_ModuleVetoToolSetup() + sct_ModuleVetoToolSetup.setup() + InDetSCT_ModuleVetoTool = sct_ModuleVetoToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): - print InDetSCT_ModuleVetoSvc - - # Load bytestream errors service (use default instance without "InDet") - # @TODO find a better to solution to get the correct service for the current job. - from SCT_ConditionsServices.SCT_ByteStreamErrorsSvcSetup import SCT_ByteStreamErrorsSvcSetup - sct_ByteStreamErrorsSvcSetup = SCT_ByteStreamErrorsSvcSetup() - sct_ByteStreamErrorsSvcSetup.setConfigSvc(InDetSCT_ConfigurationConditionsSvc) - sct_ByteStreamErrorsSvcSetup.setup() - include( 'InDetRecExample/InDetRecCabling.py' ) - if (InDetFlags.doPrintConfigurables()): - print sct_ByteStreamErrorsSvcSetup.getSvc() - # The same for tool + print InDetSCT_ModuleVetoTool + + # Load bytestream errors tool (use default instance without "InDet") + # @TODO find a better to solution to get the correct tool for the current job. from SCT_ConditionsTools.SCT_ByteStreamErrorsToolSetup import SCT_ByteStreamErrorsToolSetup sct_ByteStreamErrorsToolSetup = SCT_ByteStreamErrorsToolSetup() sct_ByteStreamErrorsToolSetup.setConfigTool(InDetSCT_ConfigurationConditionsTool) @@ -306,70 +288,73 @@ if DetFlags.haveRIO.SCT_on(): print sct_ByteStreamErrorsToolSetup.getTool() if InDetFlags.useSctDCS(): - from SCT_ConditionsServices.SCT_DCSConditionsSvcSetup import SCT_DCSConditionsSvcSetup - sct_DCSConditionsSvcSetup = SCT_DCSConditionsSvcSetup() - sct_DCSConditionsSvcSetup.setup() - InDetSCT_DCSConditionsSvc = sct_DCSConditionsSvcSetup.getSvc() + from SCT_ConditionsTools.SCT_DCSConditionsToolSetup import SCT_DCSConditionsToolSetup + sct_DCSConditionsToolSetup = SCT_DCSConditionsToolSetup() + sct_DCSConditionsToolSetup.setup() + InDetSCT_DCSConditionsTool = sct_DCSConditionsToolSetup.getTool() if InDetFlags.useHVForSctDCS(): - sct_DCSConditionsSvcSetup.getStateAlg().UseDefaultHV = True #Hack to use ~20V cut for SCT DCS rather than ChanStat for startup + sct_DCSConditionsToolSetup.getStateAlg().UseDefaultHV = True #Hack to use ~20V cut for SCT DCS rather than ChanStat for startup if (InDetFlags.doPrintConfigurables()): - print InDetSCT_DCSConditionsSvc + print InDetSCT_DCSConditionsTool if (globalflags.DataSource() == 'data'): print "Conditions db instance is ", conddb.dbdata - # Load Tdaq enabled services for data only and add some to summary svc for data only + # Load Tdaq enabled tools for data only and add some to summary tool for data only tdaqFolder = '/TDAQ/EnabledResources/ATLAS/SCT/Robins' if (conddb.dbdata == "CONDBR2"): tdaqFolder = '/TDAQ/Resources/ATLAS/SCT/Robins' - # Load TdaqEnabled service - from SCT_ConditionsServices.SCT_TdaqEnabledSvcSetup import SCT_TdaqEnabledSvcSetup - sct_TdaqEnabledSvcSetup = SCT_TdaqEnabledSvcSetup() - sct_TdaqEnabledSvcSetup.setFolder(tdaqFolder) - sct_TdaqEnabledSvcSetup.setEventInfoKey(eventInfoKey) - sct_TdaqEnabledSvcSetup.setup() - InDetSCT_TdaqEnabledSvc = sct_TdaqEnabledSvcSetup.getSvc() + # Load TdaqEnabled tool + from SCT_ConditionsTools.SCT_TdaqEnabledToolSetup import SCT_TdaqEnabledToolSetup + sct_TdaqEnabledToolSetup = SCT_TdaqEnabledToolSetup() + sct_TdaqEnabledToolSetup.setFolder(tdaqFolder) + sct_TdaqEnabledToolSetup.setEventInfoKey(eventInfoKey) + sct_TdaqEnabledToolSetup.setup() + InDetSCT_TdaqEnabledTool = sct_TdaqEnabledToolSetup.getTool() if (InDetFlags.doPrintConfigurables()): - print InDetSCT_TdaqEnabledSvc + print InDetSCT_TdaqEnabledTool - # Configure summary service - InDetSCT_ConditionsSummarySvc.ConditionsServices= [ sct_ConfigurationConditionsSvcSetup.getSvcName(), - sct_FlaggedConditionSvcSetup.getSvcName(), - sct_ByteStreamErrorsSvcSetup.getSvcName(), - sct_ReadCalibDataSvcSetup.getSvcName(), - sct_TdaqEnabledSvcSetup.getSvcName()] + # Configure summary tool + InDetSCT_ConditionsSummaryTool.ConditionsTools= [ sct_ConfigurationConditionsToolSetup.getTool().getFullName(), + sct_FlaggedConditionToolSetup.getTool().getFullName(), + sct_ByteStreamErrorsToolSetup.getTool().getFullName(), + sct_ReadCalibDataToolSetup.getTool().getFullName(), + sct_TdaqEnabledToolSetup.getTool().getFullName()] if not athenaCommonFlags.isOnline(): - InDetSCT_ConditionsSummarySvc.ConditionsServices += [ sct_MonitorConditionsSvcSetup.getSvcName() ] + InDetSCT_ConditionsSummaryTool.ConditionsTools += [ sct_MonitorConditionsToolSetup.getTool().getFullName() ] if InDetFlags.useSctDCS(): - InDetSCT_ConditionsSummarySvc.ConditionsServices += [ sct_DCSConditionsSvcSetup.getSvcName() ] + InDetSCT_ConditionsSummaryTool.ConditionsTools += [ sct_DCSConditionsToolSetup.getTool().getFullName() ] # switch conditions off for SLHC usage elif InDetFlags.doSLHC(): - InDetSCT_ConditionsSummarySvc.ConditionsServices= [] + InDetSCT_ConditionsSummaryTool.ConditionsTools= [] else : - InDetSCT_ConditionsSummarySvc.ConditionsServices= [ sct_ConfigurationConditionsSvcSetup.getSvcName(), - sct_FlaggedConditionSvcSetup.getSvcName(), - sct_MonitorConditionsSvcSetup.getSvcName(), - sct_ReadCalibDataSvcSetup.getSvcName()] + InDetSCT_ConditionsSummaryTool.ConditionsTools= [ sct_ConfigurationConditionsToolSetup.getTool().getFullName(), + sct_FlaggedConditionToolSetup.getTool().getFullName(), + sct_MonitorConditionsToolSetup.getTool().getFullName(), + sct_ReadCalibDataToolSetup.getTool().getFullName()] if InDetFlags.doSCTModuleVeto(): - InDetSCT_ConditionsSummarySvc.ConditionsServices += [ sct_MonitorConditionsSvcSetup.getSvcName() ] + InDetSCT_ConditionsSummaryTool.ConditionsTools += [ sct_MonitorConditionsToolSetup.getTool().getFullName() ] if (InDetFlags.doPrintConfigurables()): - print InDetSCT_ConditionsSummarySvc - - # Conditions summary service without InDetSCT_FlaggedConditionSvc - sct_ConditionsSummarySvcSetupWithoutFlagged = SCT_ConditionsSummarySvcSetup() - sct_ConditionsSummarySvcSetupWithoutFlagged.setSvcName("InDetSCT_ConditionsSummarySvcWithoutFlagged") - sct_ConditionsSummarySvcSetupWithoutFlagged.setup() - InDetSCT_ConditionsSummarySvcWithoutFlagged = sct_ConditionsSummarySvcSetupWithoutFlagged.getSvc() - condSvcs = InDetSCT_ConditionsSummarySvc.ConditionsServices - if sct_FlaggedConditionSvcSetup.getSvcName() in condSvcs: - condSvcs = [x for x in condSvcs if x != sct_FlaggedConditionSvcSetup.getSvcName()] - InDetSCT_ConditionsSummarySvcWithoutFlagged.ConditionsServices = condSvcs + print InDetSCT_ConditionsSummaryTool + + # Conditions summary tool without InDetSCT_FlaggedConditionTool + sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetupWithoutFlagged.setToolName("InDetSCT_ConditionsSummaryToolWithoutFlagged") + sct_ConditionsSummaryToolSetupWithoutFlagged.setup() + InDetSCT_ConditionsSummaryToolWithoutFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool() + condTools = [] + for condToolHandle in InDetSCT_ConditionsSummaryTool.ConditionsTools: + condTool = condToolHandle.typeAndName + if condTool not in condTools: + if condTool != InDetSCT_FlaggedConditionTool.getFullName(): + condTools.append(condTool) + InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools = condTools # Setup Lorentz angle service. from SiLorentzAngleSvc.SCTLorentzAngleSvcSetup import SCTLorentzAngleSvcSetup diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py index 6cbdc7f580c..a5e645eb9cf 100755 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecLoadTools.py @@ -861,9 +861,9 @@ if InDetFlags.loadSummaryTool(): PixelLayerTool = InDetTestPixelLayerTool) if (DetFlags.haveRIO.SCT_on()): - InDetHoleSearchTool.SctSummarySvc = InDetSCT_ConditionsSummarySvc + InDetHoleSearchTool.SctSummaryTool = InDetSCT_ConditionsSummaryTool else: - InDetHoleSearchTool.SctSummarySvc = None + InDetHoleSearchTool.SctSummaryTool = None if InDetFlags.doCosmics: InDetHoleSearchTool.Cosmics = True @@ -1135,16 +1135,15 @@ if InDetFlags.doPattern(): PixelClusterContainer = InDetKeys.PixelClusters(), SCT_ClusterContainer = InDetKeys.SCT_Clusters(), MagneticFieldMode = "NoField", - SctSummarySvc = None, TrackQualityCut = 9.3 ) ToolSvc += InDetSiComTrackFinderDBM if InDetFlags.doDBMstandalone(): InDetSiComTrackFinder.MagneticFieldMode = "NoField" if (DetFlags.haveRIO.SCT_on()): - InDetSiComTrackFinder.SctSummarySvc = InDetSCT_ConditionsSummarySvc + InDetSiComTrackFinder.SctSummaryTool = InDetSCT_ConditionsSummaryTool else: - InDetSiComTrackFinder.SctSummarySvc = None + InDetSiComTrackFinder.SctSummaryTool = None ToolSvc += InDetSiComTrackFinder if (InDetFlags.doPrintConfigurables()): diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py index 8b999ba3958..32cbc09d689 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py @@ -184,7 +184,7 @@ if InDetFlags.doPRDFormation(): from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetSCT_ClusteringTool", globalPosAlg = InDetClusterMakerTool, - conditionsService = InDetSCT_ConditionsSummarySvcWithoutFlagged) + conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) if InDetFlags.selectSCTIntimeHits(): if InDetFlags.InDet25nsec(): InDetSCT_ClusteringTool.timeBins = "01X" @@ -206,7 +206,7 @@ if InDetFlags.doPRDFormation(): DetectorManagerName = InDetKeys.SCT_Manager(), DataObjectName = InDetKeys.SCT_RDOs(), ClustersName = InDetKeys.SCT_Clusters(), - conditionsService = InDetSCT_ConditionsSummarySvcWithoutFlagged) + conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) if InDetFlags.cutSCTOccupancy(): InDetSCT_Clusterization.maxRDOs = 384 #77 else: @@ -222,7 +222,7 @@ if InDetFlags.doPRDFormation(): DetectorManagerName = InDetKeys.SCT_Manager(), DataObjectName = InDetKeys.SCT_PU_RDOs(), ClustersName = InDetKeys.SCT_PU_Clusters(), - conditionsService = InDetSCT_ConditionsSummarySvcWithoutFlagged) + conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) if InDetFlags.cutSCTOccupancy(): InDetSCT_ClusterizationPU.maxRDOs = 384 #77 else: diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConditionsAccess.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConditionsAccess.py index 844fd20eed7..01b08266143 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConditionsAccess.py @@ -23,7 +23,7 @@ if InDetTrigFlags.useConditionsClasses(): from InDetTrigRecExample.InDetTrigConfigConditions import SCT_ConditionsSetup SCT_ConditionsSetup.config(useDCS=_useDCS, onlineMode=_onlineMode, prefix=_prefix) SCT_ConditionsSetup.lock() - SCT_ConditionsSetup.createSvc() + SCT_ConditionsSetup.createTool() from InDetTrigRecExample.InDetTrigConfigConditions import TRT_ConditionsSetup TRT_ConditionsSetup.config(useDCS=_useDCS, onlineMode=_onlineMode,prefix=_prefix) diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py index d1b7236488d..3dfe6e3e25b 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py @@ -254,8 +254,8 @@ class PixelConditionsServicesSetup: #to be moved to -class SCT_ConditionsServicesSetup: - "Class to simplify setup of SCT_ConditionsSerivces" +class SCT_ConditionsToolsSetup: + "Class to simplify setup of SCT_ConditionsTools" def __init__(self): self._lock = False self.config(useDCS=True, onlineMode=False, prefix='') #default offline settings @@ -288,92 +288,64 @@ class SCT_ConditionsServicesSetup: self._lock = True - def createSvc(self): - self.summarySvc = self.initSummarySvc(self.instanceName('InDetSCT_ConditionsSummarySvc')) - self.flaggedSvc = self.initFlaggedSvc(self.instanceName('InDetSCT_FlaggedConditionSvc')) - self.configSvc = self.initConfigSvc(self.instanceName('InDetSCT_ConfigurationConditionsSvc')) + def createTool(self): + self.summaryTool = self.initSummaryTool(self.instanceName('InDetSCT_ConditionsSummaryTool')) + self.flaggedTool = self.initFlaggedTool(self.instanceName('InDetSCT_FlaggedConditionTool')) self.configTool = self.initConfigTool(self.instanceName('InDetSCT_ConfigurationConditionsTool')) - self.bsErrSvc = self.initBSErrSvc(self.instanceName('InDetSCT_ByteStreamErrorsSvc')) self.bsErrTool = self.initBSErrTool(self.instanceName('InDetSCT_ByteStreamErrorsTool')) - self.calibSvc = self.initCalibSvc(self.instanceName('InDetSCT_ReadCalibDataSvc')) + self.calibTool = self.initCalibTool(self.instanceName('InDetSCT_ReadCalibDataTool')) if not self.onlineMode: - self.monitorSvc = self.initMonitorSvc(self.instanceName('InDetSCT_MonitorConditionsSvc')) + self.monitorTool = self.initMonitorTool(self.instanceName('InDetSCT_MonitorConditionsTool')) - self.dcsSvc = self.initDcsSvc('InDetSCT_DCSConditionsSvc') self.dcsTool = self.initDcsTool('InDetSCT_DCSConditionsTool') self.lorentzSvc = self.initLorentzAngleSvc('SCTLorentzAngleSvc') - self.summarySvcWoFlagged = self.initSummarySvcWithoutFlagged(self.instanceName('InDetSCT_ConditionsSummarySvcWithoutFlagged')) + self.summaryToolWoFlagged = self.initSummaryToolWithoutFlagged(self.instanceName('InDetSCT_ConditionsSummaryToolWithoutFlagged')) pass - def initSummarySvc(self, instanceName): - "Init summary conditions service" - from SCT_ConditionsServices.SCT_ConditionsSummarySvcSetup import SCT_ConditionsSummarySvcSetup - sct_ConditionsSummarySvcSetup = SCT_ConditionsSummarySvcSetup() - sct_ConditionsSummarySvcSetup.setSvcName(instanceName) - sct_ConditionsSummarySvcSetup.setup() - summarySvc = sct_ConditionsSummarySvcSetup.getSvc() - if self._print: print summarySvc - return summarySvc - - def initSummarySvcWithoutFlagged(self, instanceName): - "Init summary conditions service without flaggedConditionSvc" - from SCT_ConditionsServices.SCT_ConditionsSummarySvcSetup import SCT_ConditionsSummarySvcSetup - sct_ConditionsSummarySvcSetupWithoutFlagged = SCT_ConditionsSummarySvcSetup() - sct_ConditionsSummarySvcSetupWithoutFlagged.setSvcName(instanceName) - sct_ConditionsSummarySvcSetupWithoutFlagged.setup() - summarySvcWoFlagged = sct_ConditionsSummarySvcSetupWithoutFlagged.getSvc() - condSvcs = self.summarySvc.ConditionsServices - if self.flaggedSvc.name() in condSvcs: - condSvcs = [x for x in condSvcs if x != self.flaggedSvc.name()] - summarySvcWoFlagged.ConditionsServices = condSvcs - if self._print: print summarySvcWoFlagged - return summarySvcWoFlagged - - def initFlaggedSvc(self, instanceName): - "Init flagged conditions service" - from SCT_ConditionsServices.SCT_FlaggedConditionSvcSetup import SCT_FlaggedConditionSvcSetup - sct_FlaggedConditionSvcSetup = SCT_FlaggedConditionSvcSetup() - sct_FlaggedConditionSvcSetup.setSvcName(instanceName) - sct_FlaggedConditionSvcSetup.setup() - flaggedSvc = sct_FlaggedConditionSvcSetup.getSvc() + def initSummaryTool(self, instanceName): + "Init summary conditions tool" + from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup + sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetup.setToolName(instanceName) + sct_ConditionsSummaryToolSetup.setup() + summaryTool = sct_ConditionsSummaryToolSetup.getTool() + if self._print: print summaryTool + return summaryTool + + def initSummaryToolWithoutFlagged(self, instanceName): + "Init summary conditions tool without flaggedConditionTool" + from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup + sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetupWithoutFlagged.setToolName(instanceName) + sct_ConditionsSummaryToolSetupWithoutFlagged.setup() + summaryToolWoFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool() + condTools = [] + for condToolHandle in self.summaryTool.ConditionsTools: + condTool = condToolHandle.typeAndName + if condTool not in condTools: + if condTool != self.flaggedTool.getFullName(): + condTools.append(condTool) + summaryToolWoFlagged.ConditionsTools = condTools + if self._print: print summaryToolWoFlagged + return summaryToolWoFlagged + + def initFlaggedTool(self, instanceName): + "Init flagged conditions tool" + from SCT_ConditionsTools.SCT_FlaggedConditionToolSetup import SCT_FlaggedConditionToolSetup + sct_FlaggedConditionToolSetup = SCT_FlaggedConditionToolSetup() + sct_FlaggedConditionToolSetup.setToolName(instanceName) + sct_FlaggedConditionToolSetup.setup() + flaggedTool = sct_FlaggedConditionToolSetup.getTool() if self.prefix == "InDetTrig": # SCT_FlaggedCondData_TRIG created by SCT_TrgClusterization is used. - flaggedSvc.SCT_FlaggedCondData = "SCT_FlaggedCondData_TRIG" + flaggedTool.SCT_FlaggedCondData = "SCT_FlaggedCondData_TRIG" # Otherwise, SCT_FlaggedCondData created by SCT_Clusterization - if self._print: print flaggedSvc - if not (instanceName in self.summarySvc.ConditionsServices): - self.summarySvc.ConditionsServices+=[instanceName] - return flaggedSvc - - def initConfigSvc(self, instanceName): - "Init configuration conditions service" - - from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags - from IOVDbSvc.CondDB import conddb - if conddb.dbdata == "COMP200" or InDetTrigFlags.ForceCoraCool(): - sctdaqpath='/SCT/DAQ/Configuration' - else: - sctdaqpath='/SCT/DAQ/Config' - - if InDetTrigFlags.ForceCoolVectorPayload(): - sctdaqpath='/SCT/DAQ/Config' - - from SCT_ConditionsServices.SCT_ConfigurationConditionsSvcSetup import SCT_ConfigurationConditionsSvcSetup - sct_ConfigurationConditionsSvcSetup = SCT_ConfigurationConditionsSvcSetup() - sct_ConfigurationConditionsSvcSetup.setChannelFolder(sctdaqpath+"/Chip") - sct_ConfigurationConditionsSvcSetup.setModuleFolder(sctdaqpath+"/Module") - sct_ConfigurationConditionsSvcSetup.setMurFolder(sctdaqpath+"/MUR") - sct_ConfigurationConditionsSvcSetup.setSvcName(instanceName) - sct_ConfigurationConditionsSvcSetup.setup() - configSvc = sct_ConfigurationConditionsSvcSetup.getSvc() - if self._print: print configSvc - if not (instanceName in self.summarySvc.ConditionsServices): - self.summarySvc.ConditionsServices+=[instanceName] - - if self._print: print self.condDB - return configSvc + if self._print: print flaggedTool + if not (flaggedTool.getFullName() in self.summaryTool.ConditionsTools): + self.summaryTool.ConditionsTools+=[flaggedTool.getFullName()] + return flaggedTool def initConfigTool(self, instanceName): "Init configuration conditions tool" @@ -397,58 +369,22 @@ class SCT_ConditionsServicesSetup: sct_ConfigurationConditionsToolSetup.setup() configTool = sct_ConfigurationConditionsToolSetup.getTool() if self._print: print configTool - #if not (instanceName in self.summaryTool.ConditionsTools): - # self.summaryTool.ConditionsTools+=[instanceName] + if not (configTool.getFullName() in self.summaryTool.ConditionsTools): + self.summaryTool.ConditionsTools+=[configTool.getFullName()] if self._print: print self.condDB return configTool - def initMonitorSvc(self, instanceName): - "Init monitoring conditions service" - from SCT_ConditionsServices.SCT_MonitorConditionsSvcSetup import SCT_MonitorConditionsSvcSetup - sct_MonitorConditionsSvcSetup = SCT_MonitorConditionsSvcSetup() - sct_MonitorConditionsSvcSetup.setSvcName(instanceName) - sct_MonitorConditionsSvcSetup.setup() - monitorSvc = sct_MonitorConditionsSvcSetup.getSvc() - if not (instanceName in self.summarySvc.ConditionsServices): - self.summarySvc.ConditionsServices+=[instanceName] - return monitorSvc - - def initDcsSvc(self, instanceName): - "Init DCS conditions service" - - from SCT_ConditionsServices.SCT_DCSConditionsSvcSetup import SCT_DCSConditionsSvcSetup - sct_DCSConditionsSvcSetup = SCT_DCSConditionsSvcSetup() - sct_DCSConditionsSvcSetup.setSvcName(instanceName) - - dcs_folder="/SCT/DCS" - db_loc = "DCS_OFL" - if (not self.isMC): - dcs_folder="/SCT/HLT/DCS" - db_loc = "SCT" - sct_DCSConditionsSvcSetup.setDbInstance(db_loc) - sct_DCSConditionsSvcSetup.setStateFolder(dcs_folder+"/CHANSTAT") - sct_DCSConditionsSvcSetup.setHVFolder(dcs_folder+"/HV") - sct_DCSConditionsSvcSetup.setTempFolder(dcs_folder+"/MODTEMP") - - readAllDBFolders = True - if (not self.isMC): - readAllDBFolders = False - if self.onlineMode: - readAllDBFolders = False - sct_DCSConditionsSvcSetup.setReadAllDBFolders(readAllDBFolders) - - sct_DCSConditionsSvcSetup.setup() - dcsSvc = sct_DCSConditionsSvcSetup.getSvc() - - if not (instanceName in self.summarySvc.ConditionsServices): - self.summarySvc.ConditionsServices+=[instanceName] - - if self.isMC: - if not self.condDB.folderRequested("/SCT/DCS/MPS/LV"): - self.condDB.addFolder(db_loc,"/SCT/DCS/MPS/LV") - - return dcsSvc + def initMonitorTool(self, instanceName): + "Init monitoring conditions tool" + from SCT_ConditionsTools.SCT_MonitorConditionsToolSetup import SCT_MonitorConditionsToolSetup + sct_MonitorConditionsToolSetup = SCT_MonitorConditionsToolSetup() + sct_MonitorConditionsToolSetup.setToolName(instanceName) + sct_MonitorConditionsToolSetup.setup() + monitorTool = sct_MonitorConditionsToolSetup.getTool() + if not (monitorTool.getFullName() in self.summaryTool.ConditionsTools): + self.summaryTool.ConditionsTools+=[monitorTool.getFullName()] + return monitorTool def initDcsTool(self, instanceName): "Init DCS conditions tool" @@ -477,28 +413,17 @@ class SCT_ConditionsServicesSetup: sct_DCSConditionsToolSetup.setup() dcsTool = sct_DCSConditionsToolSetup.getTool() - # if not (instanceName in self.summaryTool.ConditionsTools): - # self.summaryTool.ConditionsTools+=[instanceName] + returnHVTemp = sct_DCSConditionsToolSetup.getReturnHVTemp() + if ((readAllDBFolders and returnHVTemp) or (not readAllDBFolders and not returnHVTemp)): + if not (dcsTool.getFullName() in self.summaryTool.ConditionsTools): + self.summaryTool.ConditionsTools+=[dcsTool.getFullName()] - # if self.isMC: - # if not self.condDB.folderRequested("/SCT/DCS/MPS/LV"): - # self.condDB.addFolder(db_loc,"/SCT/DCS/MPS/LV") + if self.isMC: + if not self.condDB.folderRequested("/SCT/DCS/MPS/LV"): + self.condDB.addFolder(db_loc,"/SCT/DCS/MPS/LV") return dcsTool - def initBSErrSvc(self, instanceName): - "Init ByteStream errors service" - from SCT_ConditionsServices.SCT_ByteStreamErrorsSvcSetup import SCT_ByteStreamErrorsSvcSetup - sct_ByteStreamErrorsSvcSetup = SCT_ByteStreamErrorsSvcSetup() - sct_ByteStreamErrorsSvcSetup.setSvcName(instanceName) - sct_ByteStreamErrorsSvcSetup.setConfigSvc(self.configSvc) - sct_ByteStreamErrorsSvcSetup.setup() - bsErrSvc =sct_ByteStreamErrorsSvcSetup.getSvc() - if self._print: print bsErrSvc - if not (instanceName in self.summarySvc.ConditionsServices): - self.summarySvc.ConditionsServices+=[instanceName] - return bsErrSvc - def initBSErrTool(self, instanceName): "Init ByteStream errors tool" from SCT_ConditionsTools.SCT_ByteStreamErrorsToolSetup import SCT_ByteStreamErrorsToolSetup @@ -508,22 +433,22 @@ class SCT_ConditionsServicesSetup: sct_ByteStreamErrorsToolSetup.setup() bsErrTool =sct_ByteStreamErrorsToolSetup.getTool() if self._print: print bsErrTool - #if not (instanceName in self.summaryTool.ConditionsTools): - # self.summaryTool.ConditionsTools+=[instanceName] + if not (bsErrTool.getFullName() in self.summaryTool.ConditionsTools): + self.summaryTool.ConditionsTools+=[bsErrTool.getFullName()] return bsErrTool - def initCalibSvc(self, instanceName): - "Init Calibration Data service" + def initCalibTool(self, instanceName): + "Init Calibration Data tool" from AthenaCommon.GlobalFlags import globalflags if (globalflags.DataSource() == 'data'): - from SCT_ConditionsServices.SCT_ReadCalibDataSvcSetup import SCT_ReadCalibDataSvcSetup - sct_ReadCalibDataSvcSetup = SCT_ReadCalibDataSvcSetup() - sct_ReadCalibDataSvcSetup.setSvcName(instanceName) - sct_ReadCalibDataSvcSetup.setup() - calibSvc = sct_ReadCalibDataSvcSetup.getSvc() - if not (instanceName in self.summarySvc.ConditionsServices): - self.summarySvc.ConditionsServices+=[instanceName] - return calibSvc + from SCT_ConditionsTools.SCT_ReadCalibDataToolSetup import SCT_ReadCalibDataToolSetup + sct_ReadCalibDataToolSetup = SCT_ReadCalibDataToolSetup() + sct_ReadCalibDataToolSetup.setToolName(instanceName) + sct_ReadCalibDataToolSetup.setup() + calibTool = sct_ReadCalibDataToolSetup.getTool() + if not (calibTool.getFullName() in self.summaryTool.ConditionsTools): + self.summaryTool.ConditionsTools+=[calibTool.getFullName()] + return calibTool else: return None @@ -565,16 +490,16 @@ class SCT_ConditionsServicesSetup: pass -# Create instance of setup service -#sctConditionsSvc = SCT_ConditionsServicesSetup() +# Create instance of setup tool +#sctConditionsTool = SCT_ConditionsToolsSetup() -# InDetSCT_ConditionsSummarySvc = sctConditionsSvc.summarySvc -# InDetSCT_ConfigurationConditionsSvc = sctConditionsSvc.configSvc -# InDetSCT_FlaggedConditionSvc = sctConditionsSvc.flaggedSvc -# InDetSCT_MonitorConditionsSvc = sctConditionsSvc.monitorSvc -# InDetSCT_ByteStreamErrorsSvc = sctConditionsSvc.bsErrSvc -# InDetSCT_ReadCalibDataSvc = sctConditionsSvc.calibSvc -#if not self.isMC: InDetSCT_DCSConditionsSvc = sctConditionsSvc.dcsSvc +# InDetSCT_ConditionsSummaryTool = sctConditionsTool.summaryTool +# InDetSCT_ConfigurationConditionsTool = sctConditionsTool.configTool +# InDetSCT_FlaggedConditionTool = sctConditionsTool.flaggedTool +# InDetSCT_MonitorConditionsTool = sctConditionsTool.monitorTool +# InDetSCT_ByteStreamErrorsTool = sctConditionsTool.bsErrTool +# InDetSCT_ReadCalibDataTool = sctConditionsTool.calibTool +#if not self.isMC: InDetSCT_DCSConditionsTool = sctConditionsTool.dcsTool class TRTConditionsServicesSetup: @@ -747,5 +672,5 @@ class dummyConditionsSetup: # instances of the conditions classes PixelConditionsSetup = PixelConditionsServicesSetup() -SCT_ConditionsSetup = SCT_ConditionsServicesSetup() +SCT_ConditionsSetup = SCT_ConditionsToolsSetup() TRT_ConditionsSetup = TRTConditionsServicesSetup() diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py index 5da19b2fc50..5ceedc1f2ab 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadTools.py @@ -585,11 +585,11 @@ else: InDetTrigPixelConditionsSummaryTool = None if DetFlags.haveRIO.SCT_on(): - from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConditionsSummarySvc from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup - InDetTrigSCTConditionsSummarySvc = SCT_ConditionsSummarySvc(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummarySvc')) + from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool + InDetTrigSCTConditionsSummaryTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryTool')) else: - InDetTrigSCTConditionsSummarySvc = None + InDetTrigSCTConditionsSummaryTool = None # # ------load association tool from Inner Detector to handle pixel ganged ambiguities @@ -631,7 +631,7 @@ if InDetTrigFlags.loadSummaryTool(): usePixel = DetFlags.haveRIO.pixel_on(), useSCT = DetFlags.haveRIO.SCT_on(), PixelSummaryTool = InDetTrigPixelConditionsSummaryTool, - SctSummarySvc = InDetTrigSCTConditionsSummarySvc, + SctSummaryTool = InDetTrigSCTConditionsSummaryTool, PixelLayerTool=InDetTrigTestPixelLayerTool, ) #Commissioning = InDetTrigFlags.doCommissioning()) #renamed @@ -879,7 +879,7 @@ if InDetTrigFlags.doNewTracking(): PixelClusterContainer = 'PixelTrigClusters', SCT_ClusterContainer = 'SCT_TrigClusters', PixelSummaryTool = InDetTrigPixelConditionsSummaryTool, - SctSummarySvc = InDetTrigSCTConditionsSummarySvc + SctSummaryTool = InDetTrigSCTConditionsSummaryTool ) ToolSvc += InDetTrigSiComTrackFinder #to here diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py index e4c1c7beab9..c9e36341c4a 100644 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecLoadToolsLowPt.py @@ -68,7 +68,7 @@ ToolSvc += InDetTrigSiDetElementsRoadMakerLowPt # Local combinatorial track finding using space point seed and detector element road # from InDetTrigRecExample.InDetTrigConfigRecLoadTools \ - import InDetTrigPixelConditionsSummaryTool, InDetTrigSCTConditionsSummarySvc + import InDetTrigPixelConditionsSummaryTool, InDetTrigSCTConditionsSummaryTool from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk InDetTrigSiComTrackFinderLowPt = \ @@ -82,7 +82,7 @@ InDetTrigSiComTrackFinderLowPt = \ PixelClusterContainer = 'PixelTrigClusters', SCT_ClusterContainer = 'SCT_TrigClusters', PixelSummaryTool = InDetTrigPixelConditionsSummaryTool, - SctSummarySvc = InDetTrigSCTConditionsSummarySvc + SctSummaryTool = InDetTrigSCTConditionsSummaryTool ) ToolSvc += InDetTrigSiComTrackFinderLowPt diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py index b0de2e59eaf..5130343816d 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecNewTracking.py @@ -31,7 +31,7 @@ class SiTrigTrackFinder_EF( InDet__SiTrigSPSeededTrackFinder ): from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, \ InDetTrigPatternPropagator, InDetTrigPatternUpdator, \ - InDetTrigRotCreator, InDetTrigSCTConditionsSummarySvc + InDetTrigRotCreator from AthenaCommon.AppMgr import ToolSvc # configure tools used diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py index f58c8b2029d..db1de369d68 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigRecPreProcessing.py @@ -139,12 +139,15 @@ class SCTClustering_EF( InDet__SCT_TrgClusterization ): from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigClusterMakerTool + from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool + self.conditionsSummaryTool=SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryToolWithoutFlagged')) + # SCT_ClusteringTool (public) from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool InDetTrigSCT_ClusteringTool = \ InDet__SCT_ClusteringTool(name = "InDetTrigSCT_ClusteringTool", globalPosAlg = InDetTrigClusterMakerTool, - conditionsService = "SCT_ConditionsSummarySvc/"+SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummarySvcWithoutFlagged") + conditionsTool = self.conditionsSummaryTool ) if InDetTrigFlags.doSCTIntimeHits(): if InDetTrigFlags.InDet25nsec(): @@ -157,7 +160,6 @@ class SCTClustering_EF( InDet__SCT_TrgClusterization ): self.RawDataProvider = InDetTrigSCTRawDataProvider self.clusteringTool = InDetTrigSCT_ClusteringTool self.SCT_RDOContainerName=EF_SCTRDOKey - self.conditionsSummarySvc="SCT_ConditionsSummarySvc/"+SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummarySvcWithoutFlagged") from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)] diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py index be2c44d2c0d..792a92db60c 100755 --- a/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py +++ b/InnerDetector/InDetExample/InDetTrigRecExample/share/InDetTrigRec_jobOptions.py @@ -70,7 +70,7 @@ RegSelSvc.DisableSCTFromConditions = False from InDetTrigRecExample.InDetTrigConfigConditions import \ SCT_ConditionsSetup, TRT_ConditionsSetup RegSelSvc.PixConditionsSvc = "" #empty as it does not work -RegSelSvc.SCTConditionsSvc = "SCT_ConditionsSummarySvc/"+SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummarySvc") +RegSelSvc.SCTConditionsTool = "SCT_ConditionsSummaryTool/"+SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummaryTool") RegSelSvc.TRTConditionsSvc = "TRT_ConditionsSummarySvc/"+TRT_ConditionsSetup.instanceName("InDetTRTConditionsSummaryService") #this should be our common cabling setup/ diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/CMakeLists.txt index 3c3b84aee38..5b822c2f1b8 100644 --- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/CMakeLists.txt @@ -24,7 +24,6 @@ atlas_depends_on_subdirs( InnerDetector/InDetConditions/InDetBeamSpotService InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/PixelConditionsServices - InnerDetector/InDetConditions/SCT_ConditionsServices InnerDetector/InDetConditions/SCT_ConditionsTools InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h index 22c2ca95096..9d3a669e4c6 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTErrMonTool.h @@ -21,7 +21,6 @@ #include <utility> //for CondDB -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "SCT_ConditionsTools/ISCT_ConfigurationConditionsTool.h" #include "SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h" #include "SCT_Monitoring/SCT_MonitoringNumbers.h" diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h index 29d056de921..7b36072e9bb 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTRatioNoiseMonTool.h @@ -29,8 +29,8 @@ #include "SCT_Monitoring/SCTMotherTrigMonTool.h" #include "SCT_Monitoring/SCT_MonitoringNumbers.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" -#include "GaudiKernel/ServiceHandle.h" -//#include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/ToolHandle.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "StoreGate/ReadHandleKey.h" #include "InDetRawData/SCT_RDO_Container.h" @@ -48,7 +48,6 @@ class TH1F_LW; class TH2F_LW; class StatusCode; class SCT_ID; -class IInDetConditionsSvc; #define DEBUG(x) ATH_MSG_DEBUG(x) #define INFO(x) ATH_MSG_INFO(x) @@ -243,7 +242,8 @@ private: const SCT_ID* m_pSCTHelper; //SCT Detector Manager const InDetDD::SCT_DetectorManager* m_sctmgr; - ServiceHandle<IInDetConditionsSvc> m_pSummarySvc; + ToolHandle<IInDetConditionsTool> m_pSummaryTool{this, "conditionsTol", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions Summary"}; bool m_checkBadModules; bool m_ignore_RDO_cut_online; /// For online monitoring diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py index bfce12fb5cb..374c73dd9ca 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/SCTMonitor_topOptions.py @@ -37,24 +37,35 @@ SCTMonMan.LumiBlock = DQMonFlags.monManLumiBlock() from IOVDbSvc.CondDB import conddb -if not conddb.folderRequested('/SCT/DAQ/Configuration/Chip'): - conddb.addFolder("SCT","/SCT/DAQ/Configuration/Chip") -if not conddb.folderRequested('/SCT/DAQ/Configuration/Module'): - conddb.addFolder("SCT","/SCT/DAQ/Configuration/Module") +SCTConfigurationFolderPath="/SCT/DAQ/Configuration/" +if not conddb.folderRequested(SCTConfigurationFolderPath+"Chip"): + conddb.addFolder("SCT",SCTConfigurationFolderPath+"Chip") +if not conddb.folderRequested(SCTConfigurationFolderPath+"Module"): + conddb.addFolder("SCT",SCTConfigurationFolderPath+"Module") +if not conddb.folderRequested(SCTConfigurationFolderPath+"MUR"): + conddb.addFolder("SCT",SCTConfigurationFolderPath+"MUR") -# Load condtions service -from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConditionsSummarySvc -SCT_MonConditionsSummarySvc = SCT_ConditionsSummarySvc(name = "SCT_MonConditionsSummarySvc")#for new instance change name = pigeon -ServiceMgr += SCT_MonConditionsSummarySvc -# Load conditions configuration service -from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConfigurationConditionsSvc -SCT_MonConfigurationConditionsSvc = SCT_ConfigurationConditionsSvc(name = "SCT_MonConfigurationConditionsSvc") -ServiceMgr += SCT_MonConfigurationConditionsSvc +# Load condtions tool +from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup +sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup() +sct_ConditionsSummaryToolSetup.setToolName("SCT_MonConditionsSummaryTool") +sct_ConditionsSummaryToolSetup.setup() +SCT_MonConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool() -SCT_MonConditionsSummarySvc.ConditionsServices=["SCT_MonConfigurationConditionsSvc"]#,"InDetSCT_FlaggedConditionSvc", "InDetSCT_MonitorConditionsSvc"] -#SCT_MonConditionsSummarySvc.checkStripsInsideModule = False If we have already vetoed against bad wafera or modules, this will improve performance when checking strips. +# Load conditions configuration tool +from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup +sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup() +sct_ConfigurationConditionsToolSetup.setToolName("SCT_MonConfigurationConditionsTool") +sct_ConfigurationConditionsToolSetup.setChannelFolder(SCTConfigurationFolderPath+"Chip") +sct_ConfigurationConditionsToolSetup.setModuleFolder(SCTConfigurationFolderPath+"Module") +sct_ConfigurationConditionsToolSetup.setMurFolder(SCTConfigurationFolderPath+"MUR") +sct_ConfigurationConditionsToolSetup.setup() +SCT_MonConfigurationConditionsTool = sct_ConfigurationConditionsToolSetup.getTool() + +SCT_MonConditionsSummaryTool.ConditionsTools=[SCT_MonConfigurationConditionsTool.getFullName()]#,"InDetSCT_FlaggedConditionSvc", "InDetSCT_MonitorConditionsSvc"] +#SCT_MonConditionsSummaryTool.checkStripsInsideModule = False If we have already vetoed against bad wafera or modules, this will improve performance when checking strips. from SCT_Monitoring.SCT_MonitoringConf import SCTInitialiseTool @@ -121,11 +132,13 @@ SCTHitEffMonTool.OutputLevel = 4 SCTHitEffMonTool.IsCosmic = False SCTHitEffMonTool.UseMasks = False SCTHitEffMonTool.LookAtDatabase = True -## Load flagged condition service -#from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_FlaggedConditionSvc -#InDetSCT_FlaggedConditionSvc = SCT_FlaggedConditionSvc(name = "InDetSCT_FlaggedConditionSvc") -#ServiceMgr += InDetSCT_FlaggedConditionSvc -SCTHitEffMonTool.FlaggedConditionService = ServiceMgr.InDetSCT_FlaggedConditionSvc +## Load flagged condition tool +from SCT_ConditionsTools.SCT_FlaggedConditionToolSetup import SCT_FlaggedConditionToolSetup +sct_FlaggedConditionToolSetup = SCT_FlaggedConditionToolSetup() +sct_FlaggedConditionToolSetup.setup() +InDetSCT_FlaggedConditionTool = sct_FlaggedConditionToolSetup.getTool() + +SCTHitEffMonTool.FlaggedConditionTool = InDetSCT_FlaggedConditionTool SCTHitEffMonTool.ChronoTime = False from InDetTrackHoleSearch.InDetTrackHoleSearchConf import InDet__InDetTrackHoleSearchTool @@ -133,7 +146,7 @@ SCT_MonHoleSearch = InDet__InDetTrackHoleSearchTool(name ="SCT_MonHoleSearch", Extrapolator = InDetExtrapolator, ExtendedListOfHoles = True, Cosmics =InDetFlags.doCosmics(), - SctSummarySvc=InDetSCT_ConditionsSummarySvc) + SctSummaryTool=SCT_MonConditionsSummaryTool) ToolSvc += SCT_MonHoleSearch if (InDetFlags.doPrintConfigurables()): diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx index f5994d8dc4a..45542d80c76 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTRatioNoiseMonTool.cxx @@ -42,7 +42,6 @@ #include "Identifier/Identifier.h" #include "InDetIdentifier/SCT_ID.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "StoreGate/ReadHandle.h" // @@ -232,7 +231,6 @@ SCTRatioNoiseMonTool::SCTRatioNoiseMonTool(const string &type, m_eventInfoKey(std::string("EventInfo")), m_pSCTHelper(nullptr), m_sctmgr(nullptr), - m_pSummarySvc("SCT_ConditionsSummarySvc", name), m_checkBadModules(true), m_ignore_RDO_cut_online(true) { /** sroe 3 Sept 2015: @@ -242,7 +240,6 @@ SCTRatioNoiseMonTool::SCTRatioNoiseMonTool(const string &type, WARNING duplicated property name 'histoPathBase', see https://its.cern.ch/jira/browse/GAUDI-1023 declareProperty("histoPathBase", m_stream = "/stat"); **/ m_stream = "/stat"; - declareProperty("conditionsService", m_pSummarySvc); declareProperty("checkBadModules", m_checkBadModules); declareProperty("CheckRate", m_checkrate = 1000); declareProperty("CheckRecent", m_checkrecent = 1); @@ -284,7 +281,9 @@ SCTRatioNoiseMonTool::bookHistogramsRecurrent() { ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); if (m_checkBadModules) { ATH_MSG_INFO("Clusterization has been asked to look at bad module info"); - ATH_CHECK(m_pSummarySvc.retrieve()); + ATH_CHECK(m_pSummaryTool.retrieve()); + } else { + m_pSummaryTool.disable(); } // get the SCT detector manager ATH_CHECK(detStore()->retrieve(m_sctmgr, "SCT")); @@ -307,7 +306,9 @@ SCTRatioNoiseMonTool::bookHistograms() { ATH_CHECK(detStore()->retrieve(m_pSCTHelper, "SCT_ID")); if (m_checkBadModules) { ATH_MSG_INFO("Clusterization has been asked to look at bad module info"); - ATH_CHECK(m_pSummarySvc.retrieve()); + ATH_CHECK(m_pSummaryTool.retrieve()); + } else { + m_pSummaryTool.disable(); } // get the SCT detector manager ATH_CHECK(detStore()->retrieve(m_sctmgr, "SCT")); @@ -401,7 +402,7 @@ SCTRatioNoiseMonTool::fillHistograms() { int thisPhi = m_pSCTHelper->phi_module(SCT_Identifier); int thisEta = m_pSCTHelper->eta_module(SCT_Identifier); int thisSide = m_pSCTHelper->side(SCT_Identifier); - bool goodModule = (m_checkBadModules and m_pSummarySvc) ? m_pSummarySvc->isGood(rd->identifyHash()) : true; + bool goodModule = (m_checkBadModules and m_pSummaryTool) ? m_pSummaryTool->isGood(rd->identifyHash()) : true; m_modNum = (rd->identifyHash()) / 2; m_goodModules[m_modNum] = goodModule; diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt index 035fe3058d7..f8cd7e45b37 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt @@ -19,8 +19,6 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigEvent/TrigSteeringEvent PRIVATE DetectorDescription/AtlasDetDescr - InnerDetector/InDetConditions/SCT_ConditionsServices - InnerDetector/InDetConditions/SCT_ConditionsServices InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetRecTools/TRT_DriftCircleTool diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h index 833a9ab51c2..4338b08ec66 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h @@ -35,7 +35,7 @@ //tool/service handle template parameters #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" #include "IRegionSelector/IRegSelSvc.h" - +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" class SCT_ID; class SCT_ChannelStatusAlg; @@ -43,7 +43,6 @@ class SiDetectorManager; class ISvcLocator; class StatusCode; -class IInDetConditionsSvc; namespace InDetDD{ class SiDetectorManager; } @@ -97,7 +96,8 @@ private: SG::WriteHandleKey<SCT_FlaggedCondData> m_flaggedCondDataKey; const InDetDD::SiDetectorManager* m_manager; unsigned int m_maxRDOs; - ServiceHandle<IInDetConditionsSvc> m_pSummarySvc; + ToolHandle<IInDetConditionsTool> m_pSummaryTool{this, "conditionsTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}; bool m_checkBadModules; std::set<IdentifierHash> m_flaggedModules; unsigned int m_maxTotalOccupancyPercent; diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx index c965512d76d..e2dbd86e37b 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx @@ -11,7 +11,6 @@ #include "InDetPrepRawDataFormation/SCT_Clusterization.h" #include "InDetPrepRawData/SiClusterContainer.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "InDetRawData/SCT_RDORawData.h" #include "InDetRawData/SCT_RDO_Container.h" #include "InDetReadoutGeometry/SiDetectorManager.h" @@ -40,7 +39,6 @@ namespace InDet{ m_flaggedCondDataKey("SCT_FlaggedCondData"), m_manager(nullptr), m_maxRDOs(384), //(77), - m_pSummarySvc("SCT_ConditionsSummarySvc", name), m_checkBadModules(true), m_flaggedModules(), m_maxTotalOccupancyPercent(10), @@ -50,7 +48,6 @@ namespace InDet{ declareProperty("DataObjectName", m_rdoContainerKey, "SCT RDOs" ); declareProperty("DetectorManagerName",m_managerName); declareProperty("clusteringTool",m_clusteringTool); //inconsistent nomenclature! - declareProperty("conditionsService" , m_pSummarySvc); declareProperty("RoIs", m_roiCollectionKey, "RoIs to read in"); declareProperty("isRoI_Seeded", m_roiSeeded, "Use RoI"); declareProperty("maxRDOs", m_maxRDOs); @@ -71,7 +68,9 @@ namespace InDet{ // later and declare everything to be 'good' if it is NULL) if (m_checkBadModules){ ATH_MSG_INFO( "Clusterization has been asked to look at bad module info" ); - ATH_CHECK(m_pSummarySvc.retrieve()); + ATH_CHECK(m_pSummaryTool.retrieve()); + } else { + m_pSummaryTool.disable(); } m_clusterContainerLinkKey = m_clusterContainerKey.key(); @@ -158,7 +157,7 @@ namespace InDet{ continue; } - bool goodModule = (m_checkBadModules and m_pSummarySvc) ? m_pSummarySvc->isGood(rd->identifyHash()) : true; + bool goodModule = (m_checkBadModules and m_pSummaryTool) ? m_pSummaryTool->isGood(rd->identifyHash()) : true; // Check the RDO is not empty and that the wafer is good according to the conditions if ((not rd->empty()) and goodModule){ // If more than a certain number of RDOs set module to bad diff --git a/InnerDetector/InDetRecTools/InDetTestPixelLayer/InDetTestPixelLayer/InDetTestPixelLayerTool.h b/InnerDetector/InDetRecTools/InDetTestPixelLayer/InDetTestPixelLayer/InDetTestPixelLayerTool.h index b5fa5e83c0c..5bc1d4fb9fe 100644 --- a/InnerDetector/InDetRecTools/InDetTestPixelLayer/InDetTestPixelLayer/InDetTestPixelLayerTool.h +++ b/InnerDetector/InDetRecTools/InDetTestPixelLayer/InDetTestPixelLayer/InDetTestPixelLayerTool.h @@ -22,7 +22,6 @@ namespace Trk { class Track; class IExtrapolator; class TrackParticleBase; class IResidualPullCalculator;} namespace Rec { class TrackParticle; } -class IInDetConditionsSvc; class AtlasDetectorID; class Identifier; class PixelID; diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h index a175ae59fdb..394029bd54b 100644 --- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h +++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h @@ -22,7 +22,6 @@ class AtlasDetectorID; class Identifier; class AtlasID; -class IInDetConditionsSvc; namespace InDet {class IInDetTestPixelLayerTool; } class IGeoModelSvc; @@ -112,8 +111,9 @@ namespace InDet /** Pointer to Extrapolator AlgTool*/ ToolHandle< Trk::IExtrapolator > m_extrapolator; - /** Handles to IConditionsSummaryServices for Pixels and SCT*/ - ServiceHandle <IInDetConditionsSvc> m_sctCondSummarySvc; + /** Handles to IConditionsSummaryTools for Pixels and SCT*/ + ToolHandle <IInDetConditionsTool> m_sctCondSummaryTool{this, "SctSummaryTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions summary"}; ToolHandle <IInDetConditionsTool> m_pixelCondSummaryTool; ToolHandle< IInDetTestPixelLayerTool > m_pixelLayerTool; diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx index 199b0d9777b..1674d2f45a0 100644 --- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx @@ -22,7 +22,6 @@ #include "TrkGeometry/TrackingVolume.h" #include "Identifier/Identifier.h" #include "AtlasDetDescr/AtlasDetectorID.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetRecToolInterfaces/IInDetTestPixelLayerTool.h" #include "TrkVolumes/Volume.h" @@ -37,7 +36,6 @@ InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool(const std::string& t, AthAlgTool(t,n,p), m_atlasId(nullptr), m_extrapolator("Trk::Extrapolator"), - m_sctCondSummarySvc ("SCT_ConditionsSummarySvc",n), m_pixelCondSummaryTool("PixelConditionsSummaryTool",this), m_pixelLayerTool("InDet::InDetTestPixelLayerTool"), m_geoModelSvc("GeoModelSvc", n), @@ -51,7 +49,6 @@ InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool(const std::string& t, declareInterface<ITrackHoleSearchTool>(this); declareProperty("Extrapolator" , m_extrapolator); declareProperty("PixelSummaryTool" , m_pixelCondSummaryTool); - declareProperty("SctSummarySvc" , m_sctCondSummarySvc); declareProperty("PixelLayerTool" , m_pixelLayerTool); declareProperty("GeoModelService" , m_geoModelSvc); declareProperty("ExtendedListOfHoles" , m_extendedListOfHoles = false); @@ -91,7 +88,7 @@ StatusCode InDet::InDetTrackHoleSearchTool::initialize() } if (m_usepix) { - // Get PixelConditionsSummarySvc + // Get PixelConditionsSummaryTool if ( m_pixelCondSummaryTool.retrieve().isFailure() ) { msg(MSG::FATAL) << "Failed to retrieve tool " << m_pixelCondSummaryTool << endmsg; return StatusCode::FAILURE; @@ -109,13 +106,15 @@ StatusCode InDet::InDetTrackHoleSearchTool::initialize() } if (m_usesct) { - // Get SctConditionsSummarySvc - if ( m_sctCondSummarySvc.retrieve().isFailure() ) { - msg(MSG::FATAL) << "Failed to retrieve service " << m_sctCondSummarySvc << endmsg; + // Get SctConditionsSummaryTool + if ( m_sctCondSummaryTool.retrieve().isFailure() ) { + msg(MSG::FATAL) << "Failed to retrieve tool " << m_sctCondSummaryTool << endmsg; return StatusCode::FAILURE; } else { - msg(MSG::INFO) << "Retrieved service " << m_sctCondSummarySvc << endmsg; + msg(MSG::INFO) << "Retrieved tool " << m_sctCondSummaryTool << endmsg; } + } else { + m_sctCondSummaryTool.disable(); } if(m_checkBadSCTChip) { @@ -925,7 +924,7 @@ bool InDet::InDetTrackHoleSearchTool::isSensitive(const Trk::TrackParameters* pa } else if (m_atlasId->is_sct(id)) { if (m_usesct) { ATH_MSG_VERBOSE ("Found element is a SCT module without a hit, see if it might be dead"); - isgood=m_sctCondSummarySvc->isGood(idHash); + isgood=m_sctCondSummaryTool->isGood(idHash); if (isgood) { // this detElement is only cosidered as hole if the extrapolation of // the track plus its error hits the active material @@ -1048,5 +1047,5 @@ bool InDet::InDetTrackHoleSearchTool::isBadSCTChip(const Identifier& waferId, return true; } - return (not m_sctCondSummarySvc->isGood(stripIdentifier, InDetConditions::SCT_CHIP)); + return (not m_sctCondSummaryTool->isGood(stripIdentifier, InDetConditions::SCT_CHIP)); } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h index adf7d8b07f3..4ce4d8f919d 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h @@ -13,20 +13,17 @@ #include <vector> #include <string> //Gaudi -//#include "GaudiKernel/AlgTool.h" -#include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" -//#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/ServiceHandle.h" //Athena +#include "AthenaBaseComps/AthAlgTool.h" #include "Identifier/Identifier.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "SiClusterizationTool/ISCT_ClusteringTool.h" #include "SiClusterizationTool/ClusterMakerTool.h" class SCT_ID; class SCT_ChannelStatusAlg; class StatusCode; -class IInDetConditionsSvc; namespace InDetDD{ class SCT_ModuleSideDesign; @@ -63,8 +60,8 @@ namespace InDet { // mutable MsgStream m_log; int m_errorStrategy; bool m_checkBadChannels; - //ServiceHandle<SCT_ConditionsSummarySvc> m_conditionsSvc; - ServiceHandle<IInDetConditionsSvc> m_conditionsSvc; + ToolHandle<IInDetConditionsTool> m_conditionsTool{this, "conditionsTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions summary"}; ToolHandle< ClusterMakerTool > m_clusterMaker; typedef std::vector<Identifier> IdVec_t; std::string m_timeBinStr; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx index 8d71099617e..8bda16932c6 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx @@ -26,7 +26,6 @@ #include "InDetIdentifier/SCT_ID.h" #include "InDetConditionsSummaryService/InDetHierarchy.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "SiClusterizationTool/SCT_ReClustering.h" #include "GeoPrimitives/GeoPrimitives.h" @@ -55,7 +54,6 @@ namespace InDet{ AthAlgTool(type,name,parent), m_errorStrategy(1), m_checkBadChannels(true), - m_conditionsSvc("SCT_ConditionsSummarySvc",name), m_clusterMaker("InDet::ClusterMakerTool", this), m_timeBinStr(""), m_innermostBarrelX1X(false), @@ -67,7 +65,6 @@ namespace InDet{ declareProperty("globalPosAlg" , m_clusterMaker); declareProperty("errorStrategy", m_errorStrategy); declareProperty("checkBadChannels",m_checkBadChannels); - declareProperty("conditionsService" , m_conditionsSvc); declareProperty("timeBins" , m_timeBinStr); declareProperty("majority01X" , m_majority01X); declareProperty("innermostBarrelX1X" , m_innermostBarrelX1X); @@ -152,7 +149,9 @@ namespace InDet{ if (m_checkBadChannels){ ATH_MSG_INFO("Clustering has been asked to look at bad channel info"); - ATH_CHECK(m_conditionsSvc.retrieve()); + ATH_CHECK(m_conditionsTool.retrieve()); + } else { + m_conditionsTool.disable(); } if (decodeTimeBins().isFailure()) return StatusCode::FAILURE; @@ -541,6 +540,6 @@ namespace InDet{ bool SCT_ClusteringTool::isBad(const Identifier & stripId) const{ - return (not m_conditionsSvc->isGood(stripId, InDetConditions::SCT_STRIP)); + return (not m_conditionsTool->isGood(stripId, InDetConditions::SCT_STRIP)); } } diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx index 67baec18a2a..71429862bca 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ReClustering.cxx @@ -9,7 +9,6 @@ BAD CHANNELS DO NOT BECOME CLUSTERS Later we may want to distinguish between dead and noisy */ -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "SiClusterizationTool/SCT_ReClustering.h" #include "SiClusterizationTool/SCT_ClusteringTool.h" #include "Identifier/Identifier.h" diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/components/SiClusterizationTool_entries.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/components/SiClusterizationTool_entries.cxx index 8b9a64434b9..bc6774cb243 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/components/SiClusterizationTool_entries.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/components/SiClusterizationTool_entries.cxx @@ -1,7 +1,3 @@ -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" -//#include "SCT_ConditionsServices/SCT_ConditionsSummarySvc.h" -//#include "PixelConditionsServices/PixelConditionsSummarySvc.h" - #include "SiClusterizationTool/MergedPixelsTool.h" #include "SiClusterizationTool/SCT_ClusteringTool.h" #include "SiClusterizationTool/SCT_ReClustering.h" diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h index 596d1ca90fb..6a7601c9f39 100755 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h @@ -30,7 +30,6 @@ #include "SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h" class MsgStream ; -class IInDetConditionsSvc; namespace InDet{ @@ -112,7 +111,8 @@ namespace InDet{ /////////////////////////////////////////////////////////////////// ToolHandle<IInDetConditionsTool> m_pixelCondSummaryTool; - ServiceHandle<IInDetConditionsSvc> m_sctCondSummarySvc ; + ToolHandle<IInDetConditionsTool> m_sctCondSummaryTool{this, "SctSummaryTool", + "InDetSCT_ConditionsSummaryTool/SCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions summary"}; ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle; ToolHandle<Trk::IPatternParametersPropagator> m_proptool ; ToolHandle<Trk::IPatternParametersUpdator> m_updatortool; diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h index 94794e50c54..9ffe946c03c 100755 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiTools_xk.h @@ -21,7 +21,6 @@ #include "TrkExInterfaces/IPatternParametersPropagator.h" #include "TrkToolInterfaces/IRIO_OnTrackCreator.h" #include "TrkToolInterfaces/IPRD_AssociationTool.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" namespace InDet{ @@ -52,7 +51,7 @@ namespace InDet{ Trk::IRIO_OnTrackCreator* rioTool () const {return m_riotool ;} Trk::IPRD_AssociationTool* assoTool () const {return m_assoTool ;} IInDetConditionsTool* pixcond () const {return m_pixcond ;} - IInDetConditionsSvc* sctcond () const {return m_sctcond ;} + IInDetConditionsTool* sctcond () const {return m_sctcond ;} const double& xi2max () const {return m_xi2max ;} const double& xi2maxBrem () const {return m_xi2maxBrem ;} const double& xi2maxNoAdd() const {return m_xi2maxNoAdd;} @@ -79,7 +78,7 @@ namespace InDet{ void setTools (const Trk::MagneticFieldProperties&); - void setTools(IInDetConditionsTool*,IInDetConditionsSvc*); + void setTools(IInDetConditionsTool*,IInDetConditionsTool*); void setXi2pTmin(const double&,const double&,const double&,const double&); void setHolesClusters(const int&,const int&,const int&); @@ -101,7 +100,7 @@ namespace InDet{ Trk::IPatternParametersUpdator* m_updatortool; // Updator tool Trk::IRIO_OnTrackCreator* m_riotool ; // RIOonTrack creator IInDetConditionsTool* m_pixcond ; // Condtionos for pixels - IInDetConditionsSvc* m_sctcond ; // Conditions for sct + IInDetConditionsTool* m_sctcond ; // Conditions for sct double m_xi2max ; // Max Xi2 for updator double m_xi2maxBrem ; // Max Xi2 for updator (brem fit) @@ -209,7 +208,7 @@ namespace InDet{ m_fieldtool = MF; } - inline void SiTools_xk::setTools (IInDetConditionsTool* pix,IInDetConditionsSvc* sct) + inline void SiTools_xk::setTools (IInDetConditionsTool* pix,IInDetConditionsTool* sct) { m_pixcond = pix; m_sctcond = sct; diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx index 3ef46f1bd15..56b9a6bf388 100755 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx @@ -24,7 +24,6 @@ #include "TrkMeasurementBase/MeasurementBase.h" #include "TrkToolInterfaces/IPatternParametersUpdator.h" #include "TrkExInterfaces/IPatternParametersPropagator.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" #include "InDetPrepRawData/SiClusterContainer.h" @@ -39,7 +38,6 @@ InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk (const std::string& t,const std::string& n,const IInterface* p) : AthAlgTool(t,n,p) , m_pixelCondSummaryTool("PixelConditionsSummaryTool",this ), - m_sctCondSummarySvc ("SCT_ConditionsSummarySvc" ,n ), m_fieldServiceHandle("AtlasFieldSvc",n) , m_proptool ("Trk::RungeKuttaPropagator/InDetPropagator" ), m_updatortool("Trk::KalmanUpdator_xk/InDetPatternUpdator" ), @@ -75,7 +73,6 @@ InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk declareProperty("usePixel" ,m_usePIX ); declareProperty("useSCT" ,m_useSCT ); declareProperty("PixelSummaryTool" ,m_pixelCondSummaryTool); - declareProperty("SctSummarySvc" ,m_sctCondSummarySvc ); declareProperty("TrackQualityCut" ,m_qualityCut ); declareProperty("MagFieldSvc" , m_fieldServiceHandle ); } @@ -141,17 +138,19 @@ StatusCode InDet::SiCombinatorialTrackFinder_xk::initialize() pixcond = &(*m_pixelCondSummaryTool); } - // Get SctConditionsSummarySvc + // Get SctConditionsSummaryTool // - IInDetConditionsSvc* sctcond = 0; - if(m_useSCT ) { - if ( m_sctCondSummarySvc.retrieve().isFailure() ) { - msg(MSG::FATAL) << "Failed to retrieve tool " << m_sctCondSummarySvc << endmsg; + IInDetConditionsTool* sctcond = nullptr; + if (m_useSCT) { + if ( m_sctCondSummaryTool.retrieve().isFailure() ) { + msg(MSG::FATAL) << "Failed to retrieve tool " << m_sctCondSummaryTool << endmsg; return StatusCode::FAILURE; } else { - msg(MSG::INFO) << "Retrieved tool " << m_sctCondSummarySvc << endmsg; + msg(MSG::INFO) << "Retrieved tool " << m_sctCondSummaryTool << endmsg; } - sctcond = &(*m_sctCondSummarySvc); + sctcond = &(*m_sctCondSummaryTool); + } else { + m_sctCondSummaryTool.disable(); } // get the key -- from StoreGate (DetectorStore) diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt index b2e80178e1d..a5ad17683fd 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/CMakeLists.txt @@ -20,7 +20,7 @@ atlas_depends_on_subdirs( PUBLIC Event/EventContainers InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/PixelConditionsServices - InnerDetector/InDetConditions/SCT_ConditionsServices + InnerDetector/InDetConditions/SCT_ConditionsTools InnerDetector/InDetConditions/TRT_ConditionsServices InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h index e05ae071c45..f25caf66856 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h @@ -34,6 +34,8 @@ #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/ServiceHandle.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" + #include "Identifier/IdentifierHash.h" //typedefs - cannot be declared forward @@ -48,8 +50,6 @@ class TrigTimer; class SCT_ID; class SCT_ChannelStatusAlg; -class IInDetConditionsSvc; - class IROBDataProviderSvc; namespace InDetDD { @@ -126,7 +126,8 @@ namespace InDet { ServiceHandle<IROBDataProviderSvc> m_robDataProvider; //!< ROB Data Provide Service //conditions - ServiceHandle<IInDetConditionsSvc> m_pSummarySvc; + ToolHandle<IInDetConditionsTool> m_pSummaryTool{this, "conditionsSummaryTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}; bool m_checkBadModules; unsigned int m_maxRDOs; std::set<IdentifierHash> m_flaggedModules; diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx index cfc1175d854..1ba3f147cdf 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx @@ -66,7 +66,6 @@ namespace InDet{ m_phiHalfWidth(0.1), m_sctRDOContainerName("SCT_RDOs"), m_robDataProvider("ROBDataProviderSvc", name), - m_pSummarySvc("SCT_ConditionsSummarySvc", name), m_checkBadModules(true), m_maxRDOs(0), m_doTimeOutChecks(true), @@ -88,7 +87,6 @@ namespace InDet{ declareProperty("PhiHalfWidth", m_phiHalfWidth); declareProperty("RawDataProvider", m_rawDataProvider); - declareProperty("conditionsSummarySvc", m_pSummarySvc); declareProperty("checkBadModules", m_checkBadModules); declareProperty("maxRDOs", m_maxRDOs); declareProperty("doTimeOutChecks", m_doTimeOutChecks); @@ -231,11 +229,13 @@ namespace InDet{ if (m_checkBadModules){ - if (m_pSummarySvc.retrieve().isFailure()){ - ATH_MSG_ERROR( "Could not retrieve " << m_pSummarySvc ); + if (m_pSummaryTool.retrieve().isFailure()){ + ATH_MSG_ERROR( "Could not retrieve " << m_pSummaryTool ); } else { - ATH_MSG_INFO( "Using " << m_pSummarySvc << " in clusterization" ); + ATH_MSG_INFO( "Using " << m_pSummaryTool << " in clusterization" ); } + } else { + m_pSummaryTool.disable(); } m_timerSGate = addTimer("SGate"); @@ -446,8 +446,8 @@ namespace InDet{ //optionally check for bad modules bool goodModule=true; - if (m_checkBadModules && m_pSummarySvc){ - goodModule = m_pSummarySvc->isGood(RDO_Collection->identifyHash()); + if (m_checkBadModules && m_pSummaryTool){ + goodModule = m_pSummaryTool->isGood(RDO_Collection->identifyHash()); if (!goodModule) ATH_MSG_DEBUG( "Module not good: " << RDO_Collection->identifyHash() ); } @@ -523,8 +523,8 @@ namespace InDet{ //optionally check for bad modules bool goodModule=true; - if (m_checkBadModules && m_pSummarySvc){ - goodModule = m_pSummarySvc->isGood(rd->identifyHash()); + if (m_checkBadModules && m_pSummaryTool){ + goodModule = m_pSummaryTool->isGood(rd->identifyHash()); if (!goodModule) ATH_MSG_DEBUG( "Module not good: " << rd->identifyHash() ); } diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h index 60fe28acbbe..12fdc7c753f 100644 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackResidualMonitor/InDetTrigTrackResidualMonitor/TrigTrackResidualMonitor.h @@ -47,7 +47,6 @@ class AtlasDetectorID; class Track; -class IInDetConditionsSvc; class PixelID; class SCT_ID; diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py index c4619bf47cb..787e0092607 100644 --- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py +++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/python/InDetPhysValDecoration.py @@ -124,13 +124,13 @@ class InDetHoleSearchTool(object) : # If InDetSCT_ConditionsSummarySvc instance configured by InDetRecConditionsAccess.py is available, use it. # Otherwise, the default SCT_ConditionsSummarySvc instance is used. # @TODO find a better to solution to get the correct service for the current job. - SctSummarySvc = "InDetSCT_ConditionsSummarySvc" - if not hasattr(ServiceMgr, SctSummarySvc): - SctSummarySvc = "SCT_ConditionsSummarySvc" + SctSummaryTool = "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool" + if not hasattr(ToolSvc, SctSummaryTool): + SctSummaryTool = "SCT_ConditionsSummaryTool" super(InDetHoleSearchTool.PhysValMonInDetHoleSearchTool,self).__init__(**_args( kwargs, name = self.__class__.__name__, Extrapolator = ToolSvc.InDetExtrapolator, - SctSummarySvc = SctSummarySvc, + SctSummaryTool = SctSummaryTool, usePixel = True, useSCT = True, # OutputLevel = 1, diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py index fd9d389e836..323073d7e04 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py +++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/CombinedMuonTrackSummary.py @@ -107,7 +107,7 @@ if DetFlags.haveRIO.pixel_on(): if DetFlags.haveRIO.SCT_on(): - ToolSvc.CombinedMuonIDHoleSearch.SctSummarySvc = ServiceMgr.InDetSCT_ConditionsSummarySvc + ToolSvc.CombinedMuonIDHoleSearch.SctSummaryTool = ToolSvc.InDetSCT_ConditionsSummaryTool # check configuration #print ToolSvc.CombinedMuonIDHoleSearch diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index a4350309925..0401e8b4230 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -59,14 +59,14 @@ class egammaBremCollectionBuilder ( egammaAlgsConf.EMBremCollectionBuilder ) : useSCT = DetFlags.haveRIO.SCT_on(), CountDeadModulesAfterLastHit = True) - from AthenaCommon.AppMgr import ServiceMgr if (DetFlags.haveRIO.SCT_on()): - from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConditionsSummarySvc - InDetSCT_ConditionsSummarySvc = SCT_ConditionsSummarySvc(name = "InDetSCT_ConditionsSummarySvc") - ServiceMgr += InDetSCT_ConditionsSummarySvc - GSFBuildHoleSearchTool.SctSummarySvc = ServiceMgr.InDetSCT_ConditionsSummarySvc + from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup + sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetup.setup() + InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool() + GSFBuildHoleSearchTool.SctSummaryTool = InDetSCT_ConditionsSummaryTool else: - GSFBuildHoleSearchTool.SctSummarySvc = None + GSFBuildHoleSearchTool.SctSummaryTool = None ToolSvc += GSFBuildHoleSearchTool # diff --git a/Reconstruction/iPat/iPatTrackFollower/iPatTrackFollower/SiliconLayerAssociator.h b/Reconstruction/iPat/iPatTrackFollower/iPatTrackFollower/SiliconLayerAssociator.h index bc333e79273..863b7a60f4b 100755 --- a/Reconstruction/iPat/iPatTrackFollower/iPatTrackFollower/SiliconLayerAssociator.h +++ b/Reconstruction/iPat/iPatTrackFollower/iPatTrackFollower/SiliconLayerAssociator.h @@ -17,6 +17,7 @@ #include <vector> #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ServiceHandle.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "iPatInterfaces/ISiliconLayerAssociator.h" #include "iPatTrackFollower/LayerAssociation.h" #include "iPatTrackFollower/SiliconClusterMap.h" @@ -70,7 +71,8 @@ private: void makeEndcapStereoAssociations (LayerPrediction* prediction); ServiceHandle<IInDetConditionsSvc> m_pixelConditions; - ServiceHandle<IInDetConditionsSvc> m_sctConditions; + ToolHandle<IInDetConditionsTool> m_sctConditions{this, "SCT_ConditionsTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions Summary"}; association_vector m_associations; const SiliconClusterMap* m_clusterMap; double m_cosPhi; diff --git a/Reconstruction/iPat/iPatTrackFollower/src/SiliconLayerAssociator.cxx b/Reconstruction/iPat/iPatTrackFollower/src/SiliconLayerAssociator.cxx index 58aec75b1f1..9ed91b1fc5c 100755 --- a/Reconstruction/iPat/iPatTrackFollower/src/SiliconLayerAssociator.cxx +++ b/Reconstruction/iPat/iPatTrackFollower/src/SiliconLayerAssociator.cxx @@ -26,7 +26,6 @@ SiliconLayerAssociator::SiliconLayerAssociator(const std::string& type, const IInterface* parent) : AthAlgTool (type, name, parent), m_pixelConditions ("PixelConditionsSummarySvc",name), - m_sctConditions ("SCT_ConditionsSummarySvc",name), m_clusterMap (nullptr), m_cosPhi (0.), m_cosStereo (0.), @@ -39,7 +38,6 @@ SiliconLayerAssociator::SiliconLayerAssociator(const std::string& type, { declareInterface<ISiliconLayerAssociator>(this); declareProperty("PixelConditionsSvc", m_pixelConditions); - declareProperty("SCT_ConditionsSvc", m_sctConditions); } SiliconLayerAssociator::~SiliconLayerAssociator() diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py index 0aa171032c0..70446d182ad 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py @@ -542,7 +542,7 @@ def getFatrasHitCreatorPixel(name="ISF_FatrasHitCreatorPixel", **kwargs): kwargs.setdefault("CollectionName" , hits_collection_name) from FastCaloSimHit.FastCaloSimHitConf import FastHitConvertTool - kwargs.setdefault("UseConditionsSvc", False) + kwargs.setdefault("UseConditionsTool", False) from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorSilicon return iFatras__HitCreatorSilicon(name, **kwargs ) @@ -559,7 +559,7 @@ def getFatrasHitCreatorSCT(name="ISF_FatrasHitCreatorSCT", **kwargs): kwargs.setdefault("RandomStreamName" , ISF_FatrasFlags.RandomStreamName()) kwargs.setdefault("IdHelperName" , 'SCT_ID') kwargs.setdefault("CollectionName" , hits_collection_name) - kwargs.setdefault("UseConditionsSvc", False) + kwargs.setdefault("UseConditionsTool", False) from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorSilicon return iFatras__HitCreatorSilicon(name, **kwargs ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorSilicon.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorSilicon.h index 19e3fac475c..fef281b8c21 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorSilicon.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/ISF_FatrasToolsID/HitCreatorSilicon.h @@ -30,7 +30,7 @@ class PixelID; class SCT_ID; -class IInDetConditionsSvc; +class IInDetConditionsTool; class StoreGateSvc; class TF1; namespace InDet { @@ -111,8 +111,8 @@ namespace iFatras { const SCT_ID* m_sctIdHelper; //!< the SCT ID helper /** ToolHandle to ClusterMaker */ - ServiceHandle<IInDetConditionsSvc> m_condSummarySvc; //!< Handle to Pixel/SCT conditions service - bool m_useConditionsSvc; + ToolHandle<IInDetConditionsTool> m_condSummaryTool; //!< Handle to Pixel/SCT conditions tool + bool m_useConditionsTool; TF1* m_dEdX_function; //!< function to evaluate dEdx double m_siPathToCharge; //!< convert path in silicon to charge diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx index 46140db7745..d3de0c5d65c 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx @@ -35,7 +35,7 @@ #include "InDetRIO_OnTrack/PixelClusterOnTrack.h" #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "InDetSimEvent/SiHit.h" // CLHEP #include "CLHEP/Units/SystemOfUnits.h" @@ -60,8 +60,8 @@ iFatras::HitCreatorSilicon::HitCreatorSilicon(const std::string& t, const std::s m_siIdHelperName("PixelID"), m_pixIdHelper(0), m_sctIdHelper(0), - m_condSummarySvc("PixelConditionsSummarySvc", n), - m_useConditionsSvc(true), + m_condSummaryTool("PixelConditionsSummaryTool", this), + m_useConditionsTool(true), m_siPathToCharge(500.), m_fastEnergyDepositionModel(true) { @@ -75,8 +75,8 @@ iFatras::HitCreatorSilicon::HitCreatorSilicon(const std::string& t, const std::s // For the SiHit creation declareProperty("PathToChargeConversion", m_siPathToCharge); // Tools & Services - declareProperty("UseConditionsSvc", m_useConditionsSvc); - declareProperty("ConditionsSvc", m_condSummarySvc); + declareProperty("UseConditionsTool", m_useConditionsTool); + declareProperty("ConditionsTool", m_condSummaryTool); // Services declareProperty("IncidentService", m_incidentSvc); declareProperty("FastEnergyDepositionModel", m_fastEnergyDepositionModel); @@ -102,11 +102,16 @@ StatusCode iFatras::HitCreatorSilicon::initialize() return StatusCode::FAILURE; } - if ( m_useConditionsSvc && m_condSummarySvc.retrieve().isFailure()){ - ATH_MSG_ERROR( "[ --- ] Could not Retrieve '" << m_condSummarySvc << "'" ); - return StatusCode::FAILURE; - } else - ATH_MSG_VERBOSE( "[ sihit ] Successfully retireved " << m_condSummarySvc ); + if ( m_useConditionsTool ) { + if ( m_condSummaryTool.retrieve().isFailure()) { + ATH_MSG_ERROR( "[ --- ] Could not Retrieve '" << m_condSummaryTool << "'" ); + return StatusCode::FAILURE; + } else { + ATH_MSG_VERBOSE( "[ sihit ] Successfully retireved " << m_condSummaryTool ); + } + } else { + m_condSummaryTool.disable(); + } // Get the Pixel Identifier-helper: if (m_siIdHelperName == "PixelID" && detStore()->retrieve(m_pixIdHelper, m_siIdHelperName).isFailure()) { @@ -406,9 +411,9 @@ void iFatras::HitCreatorSilicon::createSimHit(const ISF::ISFParticle& isp, const Identifier hitId = hitSurface.associatedDetectorElementIdentifier(); IdentifierHash hitIdHash = hitSiDetElement->identifyHash(); // check conditions of the intersection - if ( m_useConditionsSvc ) { - bool isActive = m_condSummarySvc->isActive(hitIdHash, hitId); // active = "element returns data" - bool isGood = isActive ? m_condSummarySvc->isGood(hitIdHash, hitId) : false; // good = "data are reliable" + if ( m_useConditionsTool ) { + bool isActive = m_condSummaryTool->isActive(hitIdHash, hitId); // active = "element returns data" + bool isGood = isActive ? m_condSummaryTool->isGood(hitIdHash, hitId) : false; // good = "data are reliable" if (!isActive) ATH_MSG_VERBOSE("[ sihit ] ID " << hitId << ", hash " << hitIdHash << " is not active. "); else if (!isGood) diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py index ce8b28eb739..0a8cc3960c4 100755 --- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py +++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinder_Config.py @@ -468,6 +468,9 @@ class TrigFastTrackFinderBase(TrigFastTrackFinder): from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiComTrackFinder InDetTrigSiComTrackFinder_FTF = InDetTrigSiComTrackFinder.clone("InDetTrigSiComTrackFinder_FTF") + from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup + from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool + InDetTrigSiComTrackFinder_FTF.SctSummaryTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryTool')) ToolSvc += InDetTrigSiComTrackFinder_FTF diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h index 3fa72bb1465..4358368bb69 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h +++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/DumpSp.h @@ -42,6 +42,7 @@ #include "TrkToolInterfaces/ITruthToTrack.h" #include "TrigDecisionTool/TrigDecisionTool.h" #include "InDetConditionsSummaryService/IInDetConditionsSvc.h" +#include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "TrkTrack/TrackCollection.h" #include "TrkTruthData/TrackTruthCollection.h" #include "TrkTrackSummaryTool/TrackSummaryTool.h" @@ -138,7 +139,8 @@ private: //#ifdef HAVE_VERSION_15 ToolHandle<Trig::TrigDecisionTool> m_trigDecTool; // tool to retrieve trigger decision ServiceHandle<IInDetConditionsSvc> m_pixelCondSummarySvc; // tool to retrieve pixel conditions db - ServiceHandle<IInDetConditionsSvc> m_sctCondSummarySvc; // tool to retrieve SCT conditions db + ToolHandle<IInDetConditionsTool> m_sctCondSummaryTool{this, "SctSummaryTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions Summary"}; // tool to retrieve SCT conditions db //#else // ToolHandle<Trk::TruthToTrack> m_truthToTrack; //!< tool to create track parameters from a gen particle //#endif diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx index 07ca0379629..d1c4e5d5ced 100644 --- a/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx +++ b/Trigger/TrigFTK/FastTrackSimWrap/src/DumpSp.cxx @@ -137,7 +137,6 @@ DumpSp::DumpSp(const string& name, ISvcLocator* pSvcLocator) , m_trkSummaryTool( "Trk::TrackSummaryTool/InDetTrackSummaryTool" ) , m_trigDecTool("Trig::TrigDecisionTool/TrigDecisionTool") , m_pixelCondSummarySvc("PixelConditionsSummarySvc",name) - , m_sctCondSummarySvc("SCT_ConditionsSummarySvc",name) // , m_holeSearchTool( "InDetHoleSearchTool" ) , m_beamCondSvc("BeamCondSvc",name) , m_pixelClustersName( "PixelClusters" ) @@ -193,7 +192,6 @@ DumpSp::DumpSp(const string& name, ISvcLocator* pSvcLocator) //#ifdef HAVE_VERSION_15 declareProperty("TrigDecisionTool", m_trigDecTool ); declareProperty("PixelSummarySvc" , m_pixelCondSummarySvc); - declareProperty("SctSummarySvc" , m_sctCondSummarySvc); declareProperty("DoTrigger" , m_doTrigger); declareProperty("DoData" , m_doData); declareProperty("DoVertex" , m_doVertex); @@ -290,13 +288,15 @@ DumpSp::initialize() } else { ATH_MSG_INFO("Retrieved tool " << m_pixelCondSummarySvc); } - // Get SctConditionsSummarySvc - if ( m_sctCondSummarySvc.retrieve().isFailure() ) { - ATH_MSG_FATAL("Failed to retrieve tool " << m_sctCondSummarySvc); + // Get SctConditionsSummaryTool + if ( m_sctCondSummaryTool.retrieve().isFailure() ) { + ATH_MSG_FATAL("Failed to retrieve tool " << m_sctCondSummaryTool); return StatusCode::FAILURE; } else { - ATH_MSG_INFO("Retrieved tool " << m_sctCondSummarySvc); + ATH_MSG_INFO("Retrieved tool " << m_sctCondSummaryTool); } + } else { + m_sctCondSummaryTool.disable(); } @@ -1458,7 +1458,7 @@ DumpSp::dump_bad_modules() const const InDetDD::SiDetectorElement* sielement( *i ); Identifier id = sielement->identify(); IdentifierHash idhash = sielement->identifyHash(); - const bool is_bad = !(m_sctCondSummarySvc->isGood( idhash )); + const bool is_bad = !(m_sctCondSummaryTool->isGood( idhash )); if( is_bad ) { (*m_oflraw) << "B\t" << 0 << '\t' // 1 pixel 0 sct diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h index 9d7420896da..fbe8a0314c0 100644 --- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h +++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDetectorTool.h @@ -46,7 +46,6 @@ #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/TRT_DetectorManager.h" -#include "InDetConditionsSummaryService/IInDetConditionsSvc.h" #include "InDetConditionsSummaryService/IInDetConditionsTool.h" class AtlasDetectorID; @@ -89,7 +88,8 @@ class FTKDetectorTool : virtual public FTKDetectorToolI, const InDet::SiClusterContainer* m_sctContainer; ToolHandle<IInDetConditionsTool> m_pixelCondSummaryTool; // tool to retrieve pixel conditions db - ServiceHandle<IInDetConditionsSvc> m_sctCondSummarySvc; // tool to retrieve SCT conditions db + ToolHandle<IInDetConditionsTool> m_sctCondSummaryTool{this, "SctSummaryTool", + "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT Conditions Summary"}; // tool to retrieve SCT conditions db const PixelID* m_pixelId; const SCT_ID* m_sctId; diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx index 3ffef756f03..3871dc760dc 100644 --- a/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx +++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKDetectorTool.cxx @@ -29,7 +29,6 @@ FTKDetectorTool::FTKDetectorTool(const std::string &algname,const std::string &n , m_pixelContainer( 0 ) , m_sctContainer( 0 ) , m_pixelCondSummaryTool("PixelConditionsSummaryTool",this) - , m_sctCondSummarySvc("InDetSCT_ConditionsSummarySvc",name) , m_pixelId( 0 ) , m_sctId( 0 ) , m_pixelClustersName( "PixelClusters" ) @@ -53,7 +52,6 @@ FTKDetectorTool::FTKDetectorTool(const std::string &algname,const std::string &n declareProperty("pixelClustersName", m_pixelClustersName); declareProperty("SCT_ClustersName", m_sctClustersName); declareProperty("PixelSummaryTool" , m_pixelCondSummaryTool); - declareProperty("SctSummarySvc" , m_sctCondSummarySvc); declareProperty("FTK_BadModuleMapPath" , m_FTK_BadModuleMapPath ); declareProperty("ATLAS_BadModuleMapPath" , m_ATLAS_BadModuleMapPath ); declareProperty("pmap_path", m_pmap_path); @@ -101,8 +99,8 @@ StatusCode FTKDetectorTool::initialize() m_log << MSG::FATAL << "Failed to retrieve tool " << m_pixelCondSummaryTool << endmsg; return StatusCode::FAILURE; } - if ( m_sctCondSummarySvc.retrieve().isFailure() ) { - m_log << MSG::FATAL << "Failed to retrieve tool " << m_sctCondSummarySvc << endmsg; + if ( m_sctCondSummaryTool.retrieve().isFailure() ) { + m_log << MSG::FATAL << "Failed to retrieve tool " << m_sctCondSummaryTool << endmsg; return StatusCode::FAILURE; } @@ -176,7 +174,7 @@ void FTKDetectorTool::makeBadModuleMap(){ const InDetDD::SiDetectorElement* sielement( *i ); Identifier id = sielement->identify(); IdentifierHash idhash = sielement->identifyHash(); - bool is_bad = !(m_sctCondSummarySvc->isGood( idhash )); + bool is_bad = !(m_sctCondSummaryTool->isGood( idhash )); if(m_dumpAllModules) is_bad =true; if(is_bad){ FTKRawHit tmpmodraw; @@ -248,7 +246,7 @@ void FTKDetectorTool::dumpDeadModuleSummary() const InDetDD::SiDetectorElement* sielement( *i ); Identifier id = sielement->identify(); IdentifierHash idhash = sielement->identifyHash(); - bool is_bad = !(m_sctCondSummarySvc->isGood( idhash )); + bool is_bad = !(m_sctCondSummaryTool->isGood( idhash )); if(m_dumpAllModules) is_bad =true; if(is_bad){ mapfile_ATLAS_BadModuleMap << "B\t" @@ -462,7 +460,7 @@ void FTKDetectorTool::dumpIDMap() const InDetDD::SiDetectorElement* sielement( *i ); Identifier id = sielement->identify(); IdentifierHash idhash = sielement->identifyHash(); - const bool is_bad = !(m_sctCondSummarySvc->isGood( idhash )); + const bool is_bad = !(m_sctCondSummaryTool->isGood( idhash )); mapfile << ftk::SCT << "\t" << (sielement->isStereo() ? 1 : 0) << "\t"; mapfile << m_sctId->barrel_ec(id) << "\t"; @@ -610,7 +608,7 @@ void FTKDetectorTool::dumpModulePositions() { z[1]=sielement->zMax(); phi[0]=sielement->phiMin(); phi[1]=sielement->phiMax(); - isbad=m_sctCondSummarySvc->isGood( idhash ) ? 0 : 1; + isbad=m_sctCondSummaryTool->isGood( idhash ) ? 0 : 1; t->Fill(); } } diff --git a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py index c0e0bdd2730..3b72ff018fc 100644 --- a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py +++ b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigC.py @@ -51,7 +51,7 @@ class FactoryForStrategyC() : print ZvertexMaker_C # SCT and Pixel detector elements road builder - from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPixelConditionsSummaryTool, InDetTrigSCTConditionsSummarySvc + from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPixelConditionsSummaryTool, InDetTrigSCTConditionsSummaryTool from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiDetElementsRoadMaker InDetTrigSiDetElementsRoadMaker_C = InDetTrigSiDetElementsRoadMaker.clone('InDetTrigSiDetElementsRoadMaker_C') InDetTrigSiDetElementsRoadMaker_C.RoadWidth = self.settings[('RoadWidth',instName)] @@ -64,11 +64,11 @@ class FactoryForStrategyC() : else: InDetTrigPixelConditionsSummaryTool = None if DetFlags.haveRIO.SCT_on(): - from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConditionsSummarySvc from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup - InDetTrigSCTConditionsSummarySvc = SCT_ConditionsSummarySvc(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummarySvc')) + from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool + InDetTrigSCTConditionsSummaryTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummaryTool")) else: - InDetTrigSCTConditionsSummarySvc = None + InDetTrigSCTConditionsSummaryTool = None from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, InDetTrigPatternPropagator from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPatternUpdator, InDetTrigRotCreator @@ -83,7 +83,7 @@ class FactoryForStrategyC() : PixelClusterContainer = 'PixelClusterCache', SCT_ClusterContainer = 'SCT_ClusterCache', PixelSummaryTool = InDetTrigPixelConditionsSummaryTool, - SctSummarySvc = InDetTrigSCTConditionsSummarySvc) + SctSummaryTool = InDetTrigSCTConditionsSummaryTool) ToolSvc += TrackFinder_C from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt b/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt index ecc045420d0..c28e58bb8d7 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/CMakeLists.txt @@ -13,7 +13,7 @@ atlas_depends_on_subdirs( PUBLIC Event/ByteStreamData InnerDetector/InDetConditions/InDetByteStreamErrors InnerDetector/InDetConditions/PixelConditionsServices - InnerDetector/InDetConditions/SCT_ConditionsServices + InnerDetector/InDetConditions/SCT_ConditionsTools InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDetDescr/PixelCabling diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py index a16d0821a24..8131e5daddc 100644 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/python/TrigOnlineSpacePointTool_Config.py @@ -35,10 +35,11 @@ class ConfiguredOnlineSpacePointProviderTool(OnlineSpacePointProviderTool) : PixelConditionsSummaryTool = PixelConditionsSummaryTool(PixelConditionsSetup.instanceName('PixelConditionsSummaryTool')) ) + from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup InDetL2TrigSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetL2TrigSCT_ClusteringTool", globalPosAlg = InDetL2TrigClusterMakerTool, - conditionsService = SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummarySvc") + conditionsTool = SCT_ConditionsSummaryTool(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummaryTool')) ) if InDetTrigFlags.doSCTIntimeHits(): diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py index e334bc34468..df3f59c24d0 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py @@ -158,20 +158,27 @@ def makeInDetAlgs(): viewAlgs.append(InDetPixelClusterization) - from SCT_ConditionsServices.SCT_FlaggedConditionSvcSetup import SCT_FlaggedConditionSvcSetup - sct_FlaggedConditionSvcSetup = SCT_FlaggedConditionSvcSetup() - sct_FlaggedConditionSvcSetup.setup() - InDetSCT_FlaggedConditionSvc = sct_FlaggedConditionSvcSetup.getSvc() - - from SCT_ConditionsServices.SCT_ConditionsSummarySvcSetup import SCT_ConditionsSummarySvcSetup - sct_ConditionsSummarySvcSetupWithoutFlagged = SCT_ConditionsSummarySvcSetup() - sct_ConditionsSummarySvcSetupWithoutFlagged.setSvcName("InDetSCT_ConditionsSummarySvcWithoutFlagged") - sct_ConditionsSummarySvcSetupWithoutFlagged.setup() - InDetSCT_ConditionsSummarySvcWithoutFlagged = sct_ConditionsSummarySvcSetupWithoutFlagged.getSvc() - condSvcs = InDetSCT_ConditionsSummarySvcWithoutFlagged.ConditionsServices - if sct_FlaggedConditionSvcSetup.getSvcName() in condSvcs: - condSvcs = [x for x in condSvcs if x != sct_FlaggedConditionSvcSetup.getSvcName()] - InDetSCT_ConditionsSummarySvcWithoutFlagged.ConditionsServices = condSvcs + from SCT_ConditionsTools.SCT_FlaggedConditionToolSetup import SCT_FlaggedConditionToolSetup + sct_FlaggedConditionToolSetup = SCT_FlaggedConditionToolSetup() + sct_FlaggedConditionToolSetup.setup() + InDetSCT_FlaggedConditionTool = sct_FlaggedConditionToolSetup.getTool() + + from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup + sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetup.setToolName("InDetSCT_ConditionsSummaryTool") + sct_ConditionsSummaryToolSetup.setup() + InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool() + condTools = [] + for condToolHandle in InDetSCT_ConditionsSummaryTool.ConditionsTools: + condTool = condToolHandle.typeAndName + if condTool not in condTools: + if condTool != InDetSCT_FlaggedConditionTool.getFullName(): + condTools.append(condTool) + sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup() + sct_ConditionsSummaryToolSetupWithoutFlagged.setToolName("InDetSCT_ConditionsSummaryToolWithoutFlagged") + sct_ConditionsSummaryToolSetupWithoutFlagged.setup() + InDetSCT_ConditionsSummaryToolWithoutFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool() + InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools = condTools # # --- SCT_ClusteringTool (public) @@ -179,7 +186,7 @@ def makeInDetAlgs(): from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetSCT_ClusteringTool", globalPosAlg = InDetClusterMakerTool, - conditionsService = InDetSCT_ConditionsSummarySvcWithoutFlagged) + conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) # # --- SCT_Clusterization algorithm # @@ -191,7 +198,7 @@ def makeInDetAlgs(): DetectorManagerName = InDetKeys.SCT_Manager(), DataObjectName = InDetKeys.SCT_RDOs(), ClustersName = "SCT_TrigClusters", - conditionsService = InDetSCT_ConditionsSummarySvcWithoutFlagged) + conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) InDetSCT_Clusterization.isRoI_Seeded = True InDetSCT_Clusterization.RoIs = "EMViewRoIs" InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.SCT_ClusterKey diff --git a/Trigger/TriggerRelease/share/Trigger_topOptions_standalone.py b/Trigger/TriggerRelease/share/Trigger_topOptions_standalone.py index 9ba7e048eae..dc18679f9ff 100755 --- a/Trigger/TriggerRelease/share/Trigger_topOptions_standalone.py +++ b/Trigger/TriggerRelease/share/Trigger_topOptions_standalone.py @@ -106,9 +106,9 @@ if TriggerFlags.doID(): PixelConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') PixelConditionsSetup.lock() PixelConditionsSetup.createSvc() - SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') + SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='InDetTrig') SCT_ConditionsSetup.lock() - SCT_ConditionsSetup.createSvc() + SCT_ConditionsSetup.createTool() TRT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') TRT_ConditionsSetup.lock() TRT_ConditionsSetup.createSvc() diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py index ea53c9a07c0..94ebf564e3e 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.fails.py @@ -216,7 +216,7 @@ PixelConditionsSetup.createSvc() SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') #SCT_ConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') SCT_ConditionsSetup.lock() -SCT_ConditionsSetup.createSvc() +SCT_ConditionsSetup.createTool() TRT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') #TRT_ConditionsSetup.config(useDCS=False, onlineMode=False, prefix='') diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py index 3a5d0d87e3d..101888fb5b3 100644 --- a/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py +++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/skeleton.BStoTRIGBS.py @@ -182,7 +182,7 @@ PixelConditionsSetup.lock() PixelConditionsSetup.createSvc() SCT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') SCT_ConditionsSetup.lock() -SCT_ConditionsSetup.createSvc() +SCT_ConditionsSetup.createTool() TRT_ConditionsSetup.config(useDCS=False, onlineMode=True, prefix='') TRT_ConditionsSetup.lock() TRT_ConditionsSetup.createSvc() -- GitLab