From c76150c61c7ff2cb8993dec7fd69237e37b6d410 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Fri, 1 Mar 2019 14:53:54 +0000 Subject: [PATCH] Use xAOD::EventInfo instead of EventInfo in SCT classes --- .../SCT_ConditionsAlgorithms/CMakeLists.txt | 4 +--- .../src/SCT_ConditionsParameterTestAlg.cxx | 18 +++------------- .../src/SCT_ConditionsParameterTestAlg.h | 3 --- .../src/SCT_MonitorConditionsTestAlg.cxx | 20 +++++------------- .../src/SCT_MonitorConditionsTestAlg.h | 9 -------- .../src/SCT_ReadCalibChipDataTestAlg.cxx | 16 +++----------- .../src/SCT_ReadCalibChipDataTestAlg.h | 3 --- .../src/SCT_TdaqEnabledCondAlg.cxx | 17 ++++----------- .../src/SCT_TdaqEnabledCondAlg.h | 3 --- .../python/SCT_TdaqEnabledToolSetup.py | 10 +-------- .../InDetDetDescr/SCT_Cabling/CMakeLists.txt | 5 ++--- .../SCT_RawDataByteStreamCnv/CMakeLists.txt | 3 +-- .../share/InDetRecConditionsAccess.py | 11 ---------- .../SCT_Monitoring/CMakeLists.txt | 3 +-- .../SCT_Monitoring/SCTMotherTrigMonTool.h | 4 ++-- .../src/SCTMotherTrigMonTool.cxx | 21 ++++++++----------- 16 files changed, 32 insertions(+), 118 deletions(-) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index 2628a141270..c38d5779c42 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -20,8 +20,6 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetConditions/SCT_ConditionsData InnerDetector/InDetConditions/SCT_ConditionsTools InnerDetector/InDetDetDescr/SCT_Cabling - Event/EventInfo - Event/xAOD/xAODEventInfo PRIVATE InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry @@ -35,7 +33,7 @@ atlas_add_component( SCT_ConditionsAlgorithms src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry TrkGeometry SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry TrkGeometry SCT_ConditionsToolsLib ) atlas_add_test( TestCalibChipRead SCRIPT athena.py --threads=5 SCT_ConditionsAlgorithms/testCalibChipRead.py diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx index 5857013c413..3c016c33654 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx @@ -18,9 +18,6 @@ // Include Athena stuff #include "Identifier/IdentifierHash.h" -// Include Read Handle -#include "StoreGate/ReadHandle.h" - // Include STL stuff #include <string> #include <iostream> @@ -40,9 +37,6 @@ StatusCode SCT_ConditionsParameterTestAlg::initialize() { // ATH_CHECK(m_conditionsParameterTool.retrieve()); - // Read Handle - ATH_CHECK(m_currentEventKey.initialize()); - return StatusCode::SUCCESS; } // SCT_ConditionsParameterTestAlg::execute() @@ -55,16 +49,10 @@ StatusCode SCT_ConditionsParameterTestAlg::execute(const EventContext& ctx) cons StatusCode sc{StatusCode::SUCCESS, true}; // Get the current event - SG::ReadHandle<xAOD::EventInfo> currentEvent{m_currentEventKey, ctx}; - if (not currentEvent.isValid()) { - ATH_MSG_WARNING("Could not get event info"); - return sc; - } - // ATH_MSG_DEBUG("Current Run.Event,Time: " - << "[" << currentEvent->runNumber() - << "." << currentEvent->eventNumber() - << "," << currentEvent->timeStamp() + << "[" << ctx.eventID().run_number() + << "." << ctx.eventID().event_number() + << "," << ctx.eventID().time_stamp() << "]"); bool paramFilled{false}; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h index 3c3274d108b..147c93c65c0 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.h @@ -13,8 +13,6 @@ // Include Athena stuff #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "SCT_ConditionsTools/ISCT_ConditionsParameterTool.h" -#include "StoreGate/ReadHandleKey.h" -#include "xAODEventInfo/EventInfo.h" // Include Gaudi stuff #include "GaudiKernel/ToolHandle.h" @@ -33,7 +31,6 @@ class SCT_ConditionsParameterTestAlg : public AthReentrantAlgorithm { StatusCode finalize() override; //!< Gaudi finaliser private: - SG::ReadHandleKey<xAOD::EventInfo> m_currentEventKey{this, "EventInfoKey", "EventInfo", "Key of EventInfo"}; ToolHandle<ISCT_ConditionsParameterTool> m_conditionsParameterTool{this, "SCT_ConditionsParameterTool", "SCT_ConditionsParameterTool", "Tool to retrieve SCT conditions parameters"}; }; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx index 4b9b4a2c615..a5784b9b590 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.cxx @@ -16,7 +16,6 @@ //Athena includes #include "Identifier/IdentifierHash.h" #include "InDetIdentifier/SCT_ID.h" -#include "StoreGate/ReadHandle.h" SCT_MonitorConditionsTestAlg::SCT_MonitorConditionsTestAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator), @@ -33,10 +32,7 @@ StatusCode SCT_MonitorConditionsTestAlg::initialize() ATH_MSG_DEBUG("Found SCT_ID Tool"); ATH_CHECK(m_pMonitorConditionsTool.retrieve()); - ATH_MSG_DEBUG("Found SCT_MoniotorConditinosSvc"); - - // Read Handle - ATH_CHECK(m_evtKey.initialize()); + ATH_MSG_DEBUG("Found SCT_MoniotorConditinosTool"); return StatusCode::SUCCESS; @@ -56,16 +52,10 @@ StatusCode SCT_MonitorConditionsTestAlg::execute(const EventContext& ctx) const ATH_MSG_DEBUG(" in execute()"); - SG::ReadHandle<xAOD::EventInfo> evt{m_evtKey, ctx}; - if (not evt.isValid()) { - ATH_MSG_FATAL("could not get event info "); - return StatusCode::FAILURE; - } else { - ATH_MSG_DEBUG("Event: [" << evt->runNumber() - << "," << evt->eventNumber() - << ":" << evt->timeStamp() - << "]"); - } + ATH_MSG_DEBUG("Event: [" << ctx.eventID().run_number() + << "," << ctx.eventID().event_number() + << ":" << ctx.eventID().time_stamp() + << "]"); std::string defectlist; std::string EfficiencyTable; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h index 95542ed9128..c469867f17e 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_MonitorConditionsTestAlg.h @@ -19,11 +19,6 @@ #include "SCT_ConditionsTools/ISCT_MonitorConditionsTool.h" -// Read Handle Key -#include "StoreGate/ReadHandleKey.h" -// Event Info -#include "xAODEventInfo/EventInfo.h" - //Gaudi #include "GaudiKernel/ToolHandle.h" @@ -43,10 +38,6 @@ class SCT_MonitorConditionsTestAlg : public AthReentrantAlgorithm { private: ToolHandle<ISCT_MonitorConditionsTool> m_pMonitorConditionsTool{this, "SCT_MonitorConditionsTool", "SCT_MonitorConditionsTool", "Tool to retrieve noisy strip information"}; const SCT_ID* m_sctId; - - // Parameters to control the db access - SG::ReadHandleKey<xAOD::EventInfo> m_evtKey{this, "EventInfoKey", "EventInfo"}; - }; // end of class #endif // SCT_MonitorConditionsTestAlg_H diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx index 635b18b3789..4e5657f7859 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.cxx @@ -12,7 +12,6 @@ // Include Athena stuff #include "InDetIdentifier/SCT_ID.h" -#include "StoreGate/ReadHandle.h" // Include Gaudi stuff @@ -43,9 +42,6 @@ StatusCode SCT_ReadCalibChipDataTestAlg::initialize() { // Get the SCT_ReadCaliChipDataSvc ATH_CHECK(m_ReadCalibChipDataTool.retrieve()); - // Read Handle - ATH_CHECK(m_currentEventKey.initialize()); - return StatusCode::SUCCESS; } // SCT_ReadCalibChipDataTestAlg::initialize() @@ -96,16 +92,10 @@ StatusCode SCT_ReadCalibChipDataTestAlg::execute(const EventContext& ctx) const // Print where you are ATH_MSG_DEBUG("in execute()"); - // Get the current event - SG::ReadHandle<xAOD::EventInfo> currentEvent{m_currentEventKey, ctx}; - if (not currentEvent.isValid()) { - ATH_MSG_FATAL("Could not get event info"); - return StatusCode::FAILURE; - } ATH_MSG_DEBUG("Current Run.Event,Time: " - << "[" << currentEvent->runNumber() - << "." << currentEvent->eventNumber() - << "," << currentEvent->timeStamp() + << "[" << ctx.eventID().run_number() + << "." << ctx.eventID().event_number() + << "," << ctx.eventID().time_stamp() << "]"); //Test Chip Data ConditionsSummary diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h index 18258542ffd..050f1c2501f 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibChipDataTestAlg.h @@ -16,8 +16,6 @@ #include "Identifier/Identifier.h" #include "SCT_ConditionsTools/ISCT_ReadCalibChipDataTool.h" -#include "StoreGate/ReadHandleKey.h" -#include "xAODEventInfo/EventInfo.h" #include "GaudiKernel/ToolHandle.h" @@ -47,7 +45,6 @@ class SCT_ReadCalibChipDataTestAlg : public AthReentrantAlgorithm //----------Private Attributes----------// const SCT_ID* m_id_sct; //!< ID helper for SCT - SG::ReadHandleKey<xAOD::EventInfo> m_currentEventKey{this, "EventInfoKey", "EventInfo", "EventInfoKey"}; Identifier m_moduleId; //!< Module identifier Identifier m_waferId; //!< Wafer identifier Identifier m_stripId; //!< Strip identifier diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx index 688fd86c97a..8ceee2302db 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.cxx @@ -4,7 +4,6 @@ #include "SCT_TdaqEnabledCondAlg.h" -#include "EventInfo/EventID.h" #include "Identifier/IdentifierHash.h" #include "SCT_Cabling/SCT_OnlineId.h" @@ -38,9 +37,6 @@ StatusCode SCT_TdaqEnabledCondAlg::initialize() return StatusCode::FAILURE; } - // Read Handle - ATH_CHECK( m_eventInfoKey.initialize() ); - return StatusCode::SUCCESS; } @@ -158,15 +154,10 @@ StatusCode SCT_TdaqEnabledCondAlg::finalize() } bool SCT_TdaqEnabledCondAlg::unfilledRun(const EventContext& ctx) const { - SG::ReadHandle<EventInfo> event{m_eventInfoKey, ctx}; - if (event.isValid()) { - const unsigned int runNumber{event->event_ID()->run_number()}; - const bool noDataExpected{runNumber < s_earliestRunForFolder}; - if (noDataExpected) ATH_MSG_INFO("This run occurred before the /TDAQ/EnabledResources/ATLAS/SCT/Robins folder was filled in COOL; assuming the SCT is all ok."); - return noDataExpected; - } - ATH_MSG_WARNING("The event information could not be retrieved in this service"); - return false; //this means the service will attempt to access the folder and fill it, even though the run number is unknown + const unsigned int runNumber{ctx.eventID().run_number()}; + const bool noDataExpected{runNumber < s_earliestRunForFolder}; + if (noDataExpected) ATH_MSG_INFO("This run occurred before the /TDAQ/EnabledResources/ATLAS/SCT/Robins folder was filled in COOL; assuming the SCT is all ok."); + return noDataExpected; } //parse a rod channel name to a rod number, names are of the format 'ROL-SCT-BA-00-210000' diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h index fe44a73c1c2..6822548b0f2 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_TdaqEnabledCondAlg.h @@ -8,11 +8,9 @@ #include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" -#include "EventInfo/EventInfo.h" #include "SCT_Cabling/ISCT_CablingTool.h" #include "SCT_ConditionsData/SCT_TdaqEnabledCondData.h" #include "StoreGate/ReadCondHandleKey.h" -#include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" #include "GaudiKernel/ICondSvc.h" @@ -34,7 +32,6 @@ class SCT_TdaqEnabledCondAlg : public AthReentrantAlgorithm SG::ReadCondHandleKey<CondAttrListCollection> m_readKey{this, "ReadKey", "/TDAQ/Resources/ATLAS/SCT/Robins", "Key of input (raw) conditions folder"}; SG::WriteCondHandleKey<SCT_TdaqEnabledCondData> m_writeKey{this, "WriteKey", "SCT_TdaqEnabledCondData", "Key of output (derived) conditions data"}; - SG::ReadHandleKey<EventInfo> m_eventInfoKey{this, "EventInfoKey", "ByteStreamEventInfo", "Key of non-xAOD EventInfo"}; ServiceHandle<ICondSvc> m_condSvc; ToolHandle<ISCT_CablingTool> m_cablingTool{this, "SCT_CablingTool", "SCT_CablingTool", "Tool to retrieve SCT Cabling"}; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py index b690434d224..d8262e8e037 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_TdaqEnabledToolSetup.py @@ -12,7 +12,6 @@ class SCT_TdaqEnabledToolSetup: self.alg = None self.toolName = "InDetSCT_TdaqEnabledTool" self.tool = None - self.eventInfoKey = "ByteStreamEventInfo" def getFolder(self): return self.folder @@ -60,8 +59,7 @@ class SCT_TdaqEnabledToolSetup: if not hasattr(condSeq, self.algName): from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_TdaqEnabledCondAlg condSeq += SCT_TdaqEnabledCondAlg(name = self.algName, - ReadKey = self.folder, - EventInfoKey = self.eventInfoKey) + ReadKey = self.folder) self.alg = getattr(condSeq, self.algName) def setTool(self): @@ -78,12 +76,6 @@ class SCT_TdaqEnabledToolSetup: def getToolName(self): return self.toolName - def setEventInfoKey(self, eventInfoKey): - self.eventInfoKey = eventInfoKey - - def getEventInfoKey(self): - return self.eventInfoKey - def setup(self): self.setFolders() self.setAlgs() diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt index 68a56b75fb6..3b8a853779c 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/CMakeLists.txt @@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate Database/AthenaPOOL/AthenaPoolUtilities Database/CoraCool - Event/EventInfo InnerDetector/InDetDetDescr/InDetIdentifier Tools/PathResolver ) @@ -29,12 +28,12 @@ atlas_add_library( SCT_CablingLib PUBLIC_HEADERS SCT_Cabling PRIVATE_INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} LINK_LIBRARIES AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaPoolUtilities CoraCool EventInfo InDetIdentifier PathResolver ) + PRIVATE_LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaPoolUtilities CoraCool InDetIdentifier PathResolver ) atlas_add_component( SCT_Cabling src/components/*.cxx INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests AthenaPoolUtilities CoraCool EventInfo InDetIdentifier PathResolver SCT_CablingLib ) + LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps Identifier GaudiKernel StoreGateLib SGtests AthenaPoolUtilities CoraCool InDetIdentifier PathResolver SCT_CablingLib ) atlas_add_test( TestSCT_CablingCfg SCRIPT share/TestSCT_CablingCfg.sh diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt index 8259be5b134..6aeecdbedf1 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/StoreGate DetectorDescription/Identifier - Event/EventInfo Event/xAOD/xAODEventInfo InnerDetector/InDetConditions/SCT_ConditionsData InnerDetector/InDetConditions/SCT_ConditionsTools @@ -33,7 +32,7 @@ atlas_add_component( SCT_RawDataByteStreamCnv src/*.cxx src/components/*.cxx INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps StoreGateLib SGtests Identifier EventInfo xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent) + LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps StoreGateLib SGtests Identifier xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent) # Run tests: atlas_add_test( TestSCTDecode diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py index 9e5e0421e11..e84ea5da786 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py @@ -7,16 +7,6 @@ from AthenaCommon.DetFlags import DetFlags isData = (globalflags.DataSource == 'data') -eventInfoKey = "ByteStreamEventInfo" -if not isData: - eventInfoKey = "McEventInfo" -if globalflags.isOverlay() and isData : - if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on(): - from OverlayCommonAlgs.OverlayFlags import overlayFlags - eventInfoKey = (overlayFlags.dataStore() + '+' + eventInfoKey).replace("StoreGateSvc+","") - else : - eventInfoKey = "McEventInfo" - if not ('conddb' in dir()): IOVDbSvc = Service("IOVDbSvc") from IOVDbSvc.CondDB import conddb @@ -229,7 +219,6 @@ if DetFlags.haveRIO.SCT_on(): 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()): diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt index 9749feb29e3..8aea144471a 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Commission/CommissionEvent Control/AthenaMonitoring Control/StoreGate - Event/EventInfo Event/xAOD/xAODEventInfo GaudiKernel InnerDetector/InDetConditions/InDetConditionsSummaryService @@ -49,7 +48,7 @@ atlas_add_component( SCT_Monitoring src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetReadoutGeometry InDetPrepRawData MagFieldInterfaces ITrackToVertex TrkTrack TrkToolInterfaces CommissionEvent AthenaKernel AthContainers Identifier EventInfo InDetIdentifier InDetRawData InDetRIO_OnTrack LWHists PathResolver TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkRIO_OnTrack TrkSpacePoint TrkTrackSummary ) + LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetReadoutGeometry InDetPrepRawData MagFieldInterfaces ITrackToVertex TrkTrack TrkToolInterfaces CommissionEvent AthenaKernel AthContainers Identifier InDetIdentifier InDetRawData InDetRIO_OnTrack LWHists PathResolver TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkRIO_OnTrack TrkSpacePoint TrkTrackSummary ) # Install files from the package: atlas_install_headers( SCT_Monitoring ) diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h index c0960856bc3..527ad41df5a 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTMotherTrigMonTool.h @@ -19,7 +19,7 @@ #include <bitset> #include "StoreGate/ReadHandleKey.h" -#include "EventInfo/EventInfo.h" +#include "xAODEventInfo/EventInfo.h" //Fwd declarations class IInterface; @@ -63,7 +63,7 @@ protected: private: std::bitset<N_TRIGGER_TYPES> m_firedTriggers; - SG::ReadHandleKey<EventInfo> m_eventInfoKey; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfoKey", "Key of xAOD::EventInfo"}; }; #endif diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx index e831cf46946..78240d503e5 100755 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTMotherTrigMonTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @file SCTMotherTrigMonTool.cxx @@ -12,8 +12,6 @@ // Framework #include "GaudiKernel/IInterface.h" #include "GaudiKernel/StatusCode.h" -#include "EventInfo/EventInfo.h" -#include "EventInfo/TriggerInfo.h" #include "StoreGate/ReadHandle.h" #include "TrigDecisionInterface/ITrigDecisionTool.h" @@ -25,8 +23,7 @@ SCTMotherTrigMonTool::SCTMotherTrigMonTool(const std::string &type, const std::s : ManagedMonitorToolBase(type, name, parent), m_doTrigger(true), m_isStream(false), - m_firedTriggers(0), - m_eventInfoKey(std::string("ByteStreamEventInfo")) { + m_firedTriggers(0) { declareProperty("doTrigger", m_doTrigger); } @@ -45,9 +42,9 @@ SCTMotherTrigMonTool::initialize() { // --------------------------------------------------------- StatusCode SCTMotherTrigMonTool::checkTriggers() { - SG::ReadHandle<EventInfo> evtInfo(m_eventInfoKey); + SG::ReadHandle<xAOD::EventInfo> evtInfo(m_eventInfoKey); if (evtInfo.isValid()) { - m_firedTriggers = evtInfo->trigger_info()->level1TriggerType(); + m_firedTriggers = evtInfo->level1TriggerType(); return StatusCode::SUCCESS; } @@ -76,15 +73,15 @@ SCTMotherTrigMonTool::isCalibrationNoise(const std::string &L1_Item) { bool SCTMotherTrigMonTool::isStream(const std::string &StreamName) { - SG::ReadHandle<EventInfo> evtInfo(m_eventInfoKey); + SG::ReadHandle<xAOD::EventInfo> evtInfo(m_eventInfoKey); if (evtInfo.isValid()) { m_isStream = false; - for (unsigned int i = 0; i < evtInfo->trigger_info()->streamTags().size(); ++i) { - ATH_MSG_DEBUG(" i " << i << " Stream-Name " << evtInfo->trigger_info()->streamTags()[i].name() - << " type " << evtInfo->trigger_info()->streamTags()[i].type()); + for (unsigned int i = 0; i < evtInfo->streamTags().size(); ++i) { + ATH_MSG_DEBUG(" i " << i << " Stream-Name " << evtInfo->streamTags()[i].name() + << " type " << evtInfo->streamTags()[i].type()); - if (evtInfo->trigger_info()->streamTags()[i].name().find(StreamName) != std::string::npos) { + if (evtInfo->streamTags()[i].name().find(StreamName) != std::string::npos) { m_isStream = true; } } -- GitLab