File indexing completed on 2025-01-18 10:01:14
0001
0002
0003
0004
0005
0006 #ifndef HEPMC3_READERHEPEVT_H
0007 #define HEPMC3_READERHEPEVT_H
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <set>
0020 #include <string>
0021 #include <fstream>
0022 #include <istream>
0023 #include "HepMC3/Reader.h"
0024 #include "HepMC3/GenEvent.h"
0025 #include "HepMC3/GenRunInfo.h"
0026 #include "HepMC3/Data/GenEventData.h"
0027 #include "HepMC3/HEPEVT_Wrapper_Template.h"
0028
0029 namespace HepMC3
0030 {
0031
0032 class ReaderHEPEVT : public Reader
0033 {
0034
0035
0036
0037 public:
0038
0039 ReaderHEPEVT(const std::string &filename);
0040
0041 ReaderHEPEVT(std::istream &);
0042
0043 ReaderHEPEVT(std::shared_ptr<std::istream> s_stream);
0044
0045
0046
0047 public:
0048
0049
0050
0051 virtual bool read_hepevt_event_header();
0052
0053
0054
0055
0056 virtual bool read_hepevt_particle(int i);
0057
0058
0059 bool skip(const int) override;
0060
0061
0062
0063 bool read_event(GenEvent &evt) override;
0064
0065
0066
0067 void close() override;
0068
0069
0070 bool failed() override;
0071
0072 char* hepevtbuffer = nullptr;
0073 private:
0074 std::ifstream m_file;
0075 std::shared_ptr<std::istream> m_shared_stream = nullptr;
0076 std::istream* m_stream = nullptr;
0077 bool m_isstream;
0078 HEPEVT_Wrapper_Template<100000> m_hepevt_interface;
0079 };
0080
0081 }
0082
0083 #endif