diff --git a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx index 544677bed44ec78365973639d4c6f02cb1359d81..4a563e57e10ae32929a0c59aad4a628fa2a2f102 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.cxx @@ -160,6 +160,9 @@ LArNoiseCorrelationMon::initialize() /** Retrieve pedestals container*/ ATH_CHECK(m_keyPedestal.initialize()); + /** Configure event info */ + ATH_CHECK(m_eventInfoKey.initialize()); + /** get the trigger list from the 'm_triggerChainProp'*/ m_triggers.clear(); if(m_isCalibrationRun) { @@ -236,8 +239,12 @@ LArNoiseCorrelationMon::fillHistograms() bool passTrig = m_isCalibrationRun; if(!m_isCalibrationRun) { /**EventID is a part of EventInfo, search event informations:*/ - const xAOD::EventInfo* thisEvent; - ATH_CHECK(evtStore()->retrieve(thisEvent)); + SG::ReadHandle<xAOD::EventInfo> thisEvent{m_eventInfoKey}; + + if (!thisEvent.isValid()) { + ATH_MSG_ERROR("xAOD::EventInfo retrieval failed"); + return StatusCode::FAILURE; + } m_evtId = thisEvent->eventNumber(); ATH_MSG_DEBUG("Event nb " << m_evtId ); diff --git a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h index 5c0681a450e0cfd380c0843a03228b35c44dd8d2..cec7901843e1fd864d117feea5fc8398bcd8d4f5 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h +++ b/LArCalorimeter/LArMonTools/src/LArNoiseCorrelationMon.h @@ -19,6 +19,7 @@ #include "LArElecCalib/ILArPedestal.h" #include "LArRecConditions/ILArBadChannelMasker.h" #include "StoreGate/ReadCondHandleKey.h" +#include "StoreGate/ReadHandleKey.h" #include "LArCabling/LArOnOffIdMapping.h" @@ -69,6 +70,9 @@ protected: /** Handle to pedestal */ SG::ReadCondHandleKey<ILArPedestal> m_keyPedestal{this,"LArPedestalKey","LArPedestal","SG key of LArPedestal CDO"}; + + /** Handle to event info */ + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"}; private: