Skip to content
Snippets Groups Projects
Commit 45dedae4 authored by Peter Onyisi's avatar Peter Onyisi
Browse files

Fix EventInfo retrieval

parent ca6de4b3
No related branches found
No related tags found
No related merge requests found
......@@ -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 );
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment