6#ifndef HEPMC3_READERASCII_H
7#define HEPMC3_READERASCII_H
22#include <unordered_map>
39 ReaderAscii(std::shared_ptr<std::istream> s_stream);
44 bool skip(
const int)
override;
55 void close()
override;
60 static std::string
unescape(
const std::string& s);
155 std::unordered_map<int, std::pair< std::set<int>, std::set<int> > >
m_io_implicit;
Definition of struct GenEventData.
Definition of class GenEvent.
Definition of interface Reader.
Stores event-related information.
bool parse_weight_values(const char *buf)
Parse weight value lines.
bool parse_tool(const char *buf)
Parse run-level tool information.
bool m_isstream
toggles usage of m_file or m_stream
std::map< int, std::pair< std::set< int >, std::set< int > > > m_io_explicit
Temp storage for sets of incoming/outgoing ids for explicit vertices.
std::pair< int, int > parse_event_information(const char *buf)
Parse event.
bool read_event(GenEvent &evt) override
Load event from file.
static std::string unescape(const std::string &s)
Unsecape '\' and ' ' characters in string.
bool failed() override
Return status of the stream.
bool skip(const int) override
skip events
std::ifstream m_file
Input file.
bool parse_pdf_info(const char *buf)
Parse struct GenPdfInfo information.
std::set< int > m_io_explicit_ids
Temp storage to keep the order of explicit vertices.
void close() override
Close file stream.
bool parse_heavy_ion(const char *buf)
Parse struct GenHeavyIon information.
std::vector< int > m_io_implicit_ids
Temp storage to keep the order of implicit vertices.
bool parse_vertex_information(const char *buf)
Parse vertex.
GenEventData m_data
To hold event information.
bool parse_attribute(const char *buf)
Parse attribute.
~ReaderAscii()
Destructor.
bool parse_weight_names(const char *buf)
Parse run-level weight names.
bool parse_cross_section(const char *buf)
Parse struct GenCrossSection information.
bool parse_units(const char *buf)
Parse units.
ReaderAscii(const std::string &filename)
Constructor.
std::istream * m_stream
For ctor when reading from stream.
std::shared_ptr< std::istream > m_shared_stream
For ctor when reading from temp. stream.
std::unordered_map< int, std::pair< std::set< int >, std::set< int > > > m_io_implicit
Temp storage for sets of incoming/outgoing ids for implicit vertices.
bool parse_particle_information(const char *buf)
Parse particle.
bool parse_run_attribute(const char *buf)
Parse run-level attribute.
Stores serializable event information.