Skip to content
Snippets Groups Projects
Commit 66a5b9f7 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Fixed the retrieval of Event Info from event store inside AthenaEventLoopMgr::handle()

Fixes ATLASRECTS-4898
parent c1599f09
No related branches found
No related tags found
No related merge requests found
...@@ -1086,21 +1086,6 @@ void AthenaEventLoopMgr::handle(const Incident& inc) ...@@ -1086,21 +1086,6 @@ void AthenaEventLoopMgr::handle(const Incident& inc)
} }
// Construct EventInfo // Construct EventInfo
EventID eventID;
const EventInfo* pEvent=eventStore()->tryConstRetrieve<EventInfo>(); //Try getting EventInfo from old-style object
if (pEvent) {
eventID=*(pEvent->event_ID());
}
else { //Try getting xAOD::EventInfo object
const xAOD::EventInfo* xAODEvent=eventStore()->tryConstRetrieve<xAOD::EventInfo>();
if (xAODEvent==nullptr) {
error() << "Failed to get EventID from input. Tried old-style and xAOD::EventInfo" <<endmsg;
return;
}
eventID=eventIDFromxAOD(xAODEvent);
}
IOpaqueAddress* addr = nullptr; IOpaqueAddress* addr = nullptr;
sc = m_evtSelector->next(*m_evtSelCtxt); sc = m_evtSelector->next(*m_evtSelCtxt);
if(!sc.isSuccess()) { if(!sc.isSuccess()) {
...@@ -1126,6 +1111,20 @@ void AthenaEventLoopMgr::handle(const Incident& inc) ...@@ -1126,6 +1111,20 @@ void AthenaEventLoopMgr::handle(const Incident& inc)
return; return;
} }
EventID eventID;
const EventInfo* pEvent=eventStore()->tryConstRetrieve<EventInfo>(); //Try getting EventInfo from old-style object
if (pEvent) {
eventID=*(pEvent->event_ID());
}
else { //Try getting xAOD::EventInfo object
const xAOD::EventInfo* xAODEvent=eventStore()->tryConstRetrieve<xAOD::EventInfo>();
if (xAODEvent==nullptr) {
error() << "Failed to get EventID from input. Tried old-style and xAOD::EventInfo" <<endmsg;
return;
}
eventID=eventIDFromxAOD(xAODEvent);
}
// Need to make sure we have a valid EventContext in place before // Need to make sure we have a valid EventContext in place before
// doing anything that could fire incidents. // doing anything that could fire incidents.
unsigned int conditionsRun = eventID.run_number(); unsigned int conditionsRun = eventID.run_number();
......
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