Fix bug in CompassFile where m_nHits is uninitialized for CoMPASS empty (2byte) files

This commit is contained in:
Gordon McCann 2023-01-14 13:16:31 -05:00
parent ccd31cda52
commit c4557c2b26

View File

@ -42,6 +42,7 @@ namespace EventBuilder {
m_eofFlag = false; m_eofFlag = false;
m_hitUsedFlag = true; m_hitUsedFlag = true;
m_filename = filename; m_filename = filename;
m_nHits = 0;
m_file->open(m_filename, std::ios::binary | std::ios::in); m_file->open(m_filename, std::ios::binary | std::ios::in);
m_file->seekg(0, std::ios_base::end); m_file->seekg(0, std::ios_base::end);
m_size = m_file->tellg(); m_size = m_file->tellg();