From 15984d4b275753360cafadaafb328c52e352cc50 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 28 Jul 2020 11:03:19 -0500 Subject: [PATCH] changes to HDF5 reader for compatibility with HighFive master --- .../LHEInterface/interface/LH5Reader.h | 7 ++++--- .../LHEInterface/src/LH5Reader.cc | 18 +++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/GeneratorInterface/LHEInterface/interface/LH5Reader.h b/GeneratorInterface/LHEInterface/interface/LH5Reader.h index 8a5408064c632..facc73f4cbecc 100644 --- a/GeneratorInterface/LHEInterface/interface/LH5Reader.h +++ b/GeneratorInterface/LHEInterface/interface/LH5Reader.h @@ -18,9 +18,11 @@ namespace lhef { H5Handler(const std::string &fileNameIn); virtual ~H5Handler() {} void readBlock(); - void init(int, int); - int npLO, npNLO; + void counter(int, int); + std::unique_ptr h5file; + bool indexStatus; HighFive::Group _index, _particle, _event, _init, _procInfo; + int npLO, npNLO; unsigned int long _eventsRead; lheh5::Events2 _events2; lheh5::Events _events1; @@ -29,7 +31,6 @@ namespace lhef { std::pair > getEventProperties(); private: - std::unique_ptr h5file; unsigned int long _eventsTotal; int _eventsInBlock; int _formatType; diff --git a/GeneratorInterface/LHEInterface/src/LH5Reader.cc b/GeneratorInterface/LHEInterface/src/LH5Reader.cc index 35dc435b16cff..2ae36fe78eca6 100644 --- a/GeneratorInterface/LHEInterface/src/LH5Reader.cc +++ b/GeneratorInterface/LHEInterface/src/LH5Reader.cc @@ -65,14 +65,15 @@ namespace lhef { ~StringSource() override {} }; - H5Handler::H5Handler(const std::string &fileNameIn) - : h5file(new HighFive::File(fileNameIn)), - indexStatus(h5file->exist("/index")), - _index(h5file->getGroup(indexStatus ? "index" : "event")), - _particle(h5file->getGroup("particle")), - _event(h5file->getGroup("event")), - _init(h5file->getGroup("init")), - _procInfo(h5file->getGroup("procInfo")) { + H5Handler::H5Handler(const std::string &fileNameIn) : + h5file( new HighFive::File(fileNameIn) ), + indexStatus( h5file->exist("/index") ), + _index( h5file->getGroup( indexStatus ? "index" : "event") ), + _particle( h5file->getGroup("particle") ), + _event( h5file->getGroup("event") ), + _init( h5file->getGroup("init") ), + _procInfo( h5file->getGroup("procInfo") ) + { hid_t dspace; _formatType = 1; @@ -81,7 +82,6 @@ namespace lhef { _formatType = 2; } else { _index = h5file->getGroup("event"); - dspace = H5Dget_space(h5file->getDataSet("event/start").getId()); _formatType = 1; }