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

Merge branch 'AthenaMP_SeekFix' into 'master'

Fix event iteration for AthenaMP.

See merge request atlas/athena!15070
parents 22e0ee4f 452f92a8
No related branches found
No related tags found
No related merge requests found
...@@ -488,6 +488,14 @@ StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const { ...@@ -488,6 +488,14 @@ StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const {
delete (char*)tokenStr; tokenStr = nullptr; delete (char*)tokenStr; tokenStr = nullptr;
return(StatusCode::FAILURE); return(StatusCode::FAILURE);
} }
// Remove any old AttributeList
const DataHandle<AthenaAttributeList> oldAttrList;
if (eventStore()->retrieve(oldAttrList, m_attrListKey.value()).isSuccess()) {
if (!eventStore()->removeDataAndProxy(oldAttrList.cptr()).isSuccess()) {
ATH_MSG_ERROR("Cannot remove old AttributeList from StoreGate.");
return(StatusCode::FAILURE);
}
}
AthenaAttributeList* athAttrList = new AthenaAttributeList(); AthenaAttributeList* athAttrList = new AthenaAttributeList();
if (!eventStore()->record(athAttrList, m_attrListKey.value()).isSuccess()) { if (!eventStore()->record(athAttrList, m_attrListKey.value()).isSuccess()) {
ATH_MSG_ERROR("Cannot record AttributeList to StoreGate."); ATH_MSG_ERROR("Cannot record AttributeList to StoreGate.");
...@@ -645,13 +653,6 @@ StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const { ...@@ -645,13 +653,6 @@ StatusCode EventSelectorAthenaPool::next(IEvtSelector::Context& ctxt) const {
} }
break; break;
} }
const DataHandle<AthenaAttributeList> oldAttrList;
if (eventStore()->retrieve(oldAttrList, m_attrListKey.value()).isSuccess()) {
if (!eventStore()->removeDataAndProxy(oldAttrList.cptr()).isSuccess()) {
ATH_MSG_ERROR("Cannot remove old AttributeList from StoreGate.");
return(StatusCode::FAILURE);
}
}
} else { } else {
if (!m_skipEventSequence.empty() && m_evtCount == m_skipEventSequence.front()) { if (!m_skipEventSequence.empty() && m_evtCount == m_skipEventSequence.front()) {
m_skipEventSequence.erase(m_skipEventSequence.begin()); m_skipEventSequence.erase(m_skipEventSequence.begin());
...@@ -999,6 +1000,14 @@ PoolCollectionConverter* EventSelectorAthenaPool::getCollectionCnv(bool throwInc ...@@ -999,6 +1000,14 @@ PoolCollectionConverter* EventSelectorAthenaPool::getCollectionCnv(bool throwInc
} }
//__________________________________________________________________________ //__________________________________________________________________________
StatusCode EventSelectorAthenaPool::recordAttributeList() const { StatusCode EventSelectorAthenaPool::recordAttributeList() const {
// Remove any old AttributeList
const DataHandle<AthenaAttributeList> oldAttrList;
if (eventStore()->retrieve(oldAttrList, m_attrListKey.value()).isSuccess()) {
if (!eventStore()->removeDataAndProxy(oldAttrList.cptr()).isSuccess()) {
ATH_MSG_ERROR("Cannot remove old AttributeList from StoreGate.");
return(StatusCode::FAILURE);
}
}
// Get access to AttributeList // Get access to AttributeList
ATH_MSG_DEBUG("Get AttributeList from the collection"); ATH_MSG_DEBUG("Get AttributeList from the collection");
// MN: accessing only attribute list, ignoring token list // MN: accessing only attribute list, ignoring token list
......
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