2 #ifndef HEPMC_IO_GENEVENT_H
3 #define HEPMC_IO_GENEVENT_H
17 #include "HepMC/IO_BaseClass.h"
18 #include "HepMC/IO_Exception.h"
19 #include "HepMC/Units.h"
66 IO_GenEvent(
const std::string& filename=
"IO_GenEvent.dat",
67 std::ios::openmode mode=std::ios::out );
87 void print( std::ostream& ostr = std::cout )
const;
108 std::ios::openmode m_mode;
110 std::ostream * m_ostr;
111 std::istream * m_istr;
115 std::string m_error_message;
126 state = (int)m_istr->rdstate();
128 state = (int)m_ostr->rdstate();
146 return m_error_message;
151 #endif // HEPMC_IO_GENEVENT_H
void write_event(const GenEvent *evt)
write this event
IO_GenEvent(const std::string &filename="IO_GenEvent.dat", std::ios::openmode mode=std::ios::out)
constructor requiring a file name and std::ios mode
void clear()
clear the IO stream
const std::string & error_message() const
the read error message string
The GenEvent class is the core of HepMC.
void print(std::ostream &ostr=std::cout) const
write to ostr
IO_GenEvent also deals with HeavyIon and PdfInfo.
all input/output classes inherit from IO_BaseClass
int error_type() const
integer (enum) associated with read error
int rdstate() const
check the state of the IO stream
bool fill_next_event(GenEvent *evt)
get the next event
void write_comment(const std::string comment)
void use_input_units(Units::MomentumUnit, Units::LengthUnit)