6 #ifndef HEPMC3_READERASCII_H
7 #define HEPMC3_READERASCII_H
40 bool skip(
const int)
override;
55 void close()
override;
60 std::string
unescape(
const std::string& s);
bool parse_run_attribute(const char *buf)
Parse run-level attribute.
bool parse_cross_section(GenEvent &evt, const char *buf)
Parse struct GenCrossSection information.
Definition of interface Reader.
ReaderAscii(const std::string &filename)
Constructor.
bool parse_units(GenEvent &evt, const char *buf)
Parse units.
GenEvent I/O parsing for structured text files.
bool parse_tool(const char *buf)
Parse run-level tool information.
bool read_event(GenEvent &evt) override
Load event from file.
std::map< std::string, std::shared_ptr< Attribute > > m_global_attributes
Store attributes global to the run being written/read.
std::ifstream m_file
Input file.
std::map< GenVertexPtr, std::set< int > > m_forward_mothers
Temp storage for outgoing particle ids.
std::pair< int, int > parse_event_information(GenEvent &evt, const char *buf)
Parse event.
bool parse_weight_names(const char *buf)
Parse run-level weight names.
bool parse_attribute(GenEvent &evt, const char *buf)
Parse attribute.
Stores event-related information.
std::istream * m_stream
For ctor when reading from stdin.
bool parse_heavy_ion(GenEvent &evt, const char *buf)
Parse struct GenHeavyIon information.
bool failed() override
Return status of the stream.
std::string unescape(const std::string &s)
Unsecape '\' and ' ' characters in string.
bool skip(const int) override
skip events
std::map< GenParticlePtr, int > m_forward_daughters
Temp storage for prod vertex ids.
bool m_isstream
toggles usage of m_file or m_stream
bool parse_vertex_information(GenEvent &evt, const char *buf)
Parse vertex.
Definition of class GenEvent.
bool parse_particle_information(GenEvent &evt, const char *buf)
Parse particle.
Base class for all I/O readers.
~ReaderAscii()
Destructor.
void close() override
Close file stream.
bool parse_pdf_info(GenEvent &evt, const char *buf)
Parse struct GenPdfInfo information.
bool parse_weight_values(GenEvent &evt, const char *buf)
Parse weight value lines.