From fecf99a2732a3f6aafc5fbf0f4a05af5bac196f8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 21 Aug 2023 14:41:52 -0400 Subject: [PATCH] HepMC3FileReader.cpp: avoid double call to `HepMC3::Reader::close()` --- DDG4/hepmc/HepMC3FileReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DDG4/hepmc/HepMC3FileReader.cpp b/DDG4/hepmc/HepMC3FileReader.cpp index b94897abe..9e0f36daf 100644 --- a/DDG4/hepmc/HepMC3FileReader.cpp +++ b/DDG4/hepmc/HepMC3FileReader.cpp @@ -133,8 +133,8 @@ HEPMC3FileReader::HEPMC3FileReader(const std::string& nam) m_reader->skip(1); // then we get the run info (shared pointer) auto runInfo = m_reader->run_info(); - // and close the reader - m_reader->close(); + // and deallocate the reader + m_reader.reset(); // so we can open the file again from the start m_reader = HepMC3::deduce_reader(nam); // and set the run info object now