6 #ifndef HEPMC_READERASCII_H 7 #define HEPMC_READERASCII_H 17 #include "HepMC/Reader.h" 18 #include "HepMC/GenEvent.h" 45 bool failed() {
return m_isstream ? (bool)m_stream->rdstate() :(bool)
m_file.rdstate(); }
55 shared_ptr<Attribute>
get_global(std::string name);
58 std::string
unescape(
const std::string s);
156 std::istream* m_stream;
bool parse_weight_names(const char *buf)
Parse run-level weight names.
Base class for all I/O readers.
bool failed()
Return status of the stream.
ReaderAscii(const std::string &filename)
Constructor.
bool read_event(GenEvent &evt)
Load event from file.
std::pair< int, int > parse_event_information(GenEvent &evt, const char *buf)
Parse event.
~ReaderAscii()
Destructor.
void close()
Close file stream.
bool parse_cross_section(GenEvent &evt, const char *buf)
Parse struct GenCrossSection information.
Stores event-related information.
std::map< std::string, shared_ptr< Attribute > > m_global_attributes
Store attributes global to the run being written/read.
bool parse_run_attribute(const char *buf)
Parse run-level attribute.
bool parse_vertex_information(GenEvent &evt, const char *buf)
Parse vertex.
bool parse_attribute(GenEvent &evt, const char *buf)
Parse attribute.
bool parse_units(GenEvent &evt, const char *buf)
Parse units.
bool parse_tool(const char *buf)
Parse run-level tool information.
bool parse_weight_values(GenEvent &evt, const char *buf)
Parse weight value lines.
Definition of template class SmartPointer.
bool parse_heavy_ion(GenEvent &evt, const char *buf)
Parse struct GenHeavyIon information.
GenEvent I/O parsing for structured text files.
bool parse_pdf_info(GenEvent &evt, const char *buf)
Parse struct GenPdfInfo information.
bool parse_particle_information(GenEvent &evt, const char *buf)
Parse particle.
std::ifstream m_file
Input file.
shared_ptr< Attribute > get_global(std::string name)
Get global attribute.
std::string unescape(const std::string s)
Unsecape '\' and ' ' characters in string.