Skip to content

Commit

Permalink
Check also in case the FirstEventEntry is negative
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 8, 2024
1 parent 29e3307 commit 48cf053
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions k4FWCore/components/IOSvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ StatusCode IOSvc::initialize() {
m_entries = m_reader->getEntries(podio::Category::Event);
}

if (m_entries && m_firstEventEntry >= m_entries) {
error() << "First event entry is larger than the number of entries in the file" << endmsg;
if ((m_entries && m_firstEventEntry >= m_entries) || m_firstEventEntry < 0) {
error() << "First event entry is larger than the number of entries in the file or negative" << endmsg;
return StatusCode::FAILURE;
}

Expand Down

0 comments on commit 48cf053

Please sign in to comment.