File indexing completed on 2025-01-18 10:01:14
0001
0002
0003
0004
0005
0006 #ifndef HEPMC3_READERLHEF_H
0007 #define HEPMC3_READERLHEF_H
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "HepMC3/Reader.h"
0020 #include "HepMC3/GenEvent.h"
0021 #include <deque>
0022 #include <string>
0023 #include <fstream>
0024 #include <istream>
0025 #include "HepMC3/LHEFAttributes.h"
0026 #include "HepMC3/GenEvent.h"
0027 #include "HepMC3/GenParticle.h"
0028 #include "HepMC3/GenVertex.h"
0029 #include <iomanip>
0030
0031
0032 namespace HepMC3
0033 {
0034 class ReaderLHEF : public Reader
0035 {
0036 public:
0037
0038 ReaderLHEF(std::istream &);
0039
0040 ReaderLHEF(const std::string& filename);
0041
0042 ReaderLHEF(std::shared_ptr<std::istream> s_stream);
0043
0044 bool skip(const int) override;
0045
0046 bool read_event(GenEvent& ev) override;
0047
0048 void close() override;
0049
0050 bool failed() override;
0051
0052 ~ReaderLHEF() ;
0053 private:
0054 void init();
0055 std::shared_ptr<std::istream> m_shared_stream = nullptr;
0056 std::shared_ptr<LHEF::Reader> m_reader = nullptr;
0057 std::shared_ptr<HEPRUPAttribute> m_hepr = nullptr;
0058 int m_neve = 0;
0059 bool m_failed = false;
0060 std::deque<GenEvent> m_storage;
0061 };
0062 }
0063 #endif