6 #ifndef HEPMC3_WRITERASCII_H 7 #define HEPMC3_WRITERASCII_H 31 shared_ptr<GenRunInfo> run = shared_ptr<GenRunInfo>());
35 shared_ptr<GenRunInfo> run = shared_ptr<GenRunInfo>());
81 std::string
escape(
const std::string& s)
const;
Definition of class GenRunInfo.
void write_string(const std::string &str)
Inline function for writing strings.
void forced_flush()
Inline function forcing flush to the output stream.
int m_precision
Output precision.
std::ostream * m_stream
Output stream.
void set_buffer_size(const size_t &size)
Set buffer size (in bytes)
char * m_cursor
Cursor inside stream buffer.
void allocate_buffer()
Attempts to allocate buffer of the chosen size.
WriterAscii(const std::string &filename, shared_ptr< GenRunInfo > run=shared_ptr< GenRunInfo >())
Constructor.
bool failed()
Return status of the stream.
void write_particle(ConstGenParticlePtr p, int second_field)
Write particle.
unsigned long m_buffer_size
Buffer size.
void set_precision(const int &prec)
Set output precision.
Stores event-related information.
char * m_buffer
Stream buffer.
void write_vertex(ConstGenVertexPtr v)
Write vertex.
Definition of interface Writer.
int precision() const
Return output precision.
~WriterAscii()
Destructor.
void close()
Close file stream.
void write_run_info()
Write the GenRunInfo object to file.
Base class for all I/O writers.
std::ofstream m_file
Output file.
Definition of class GenEvent.
void write_event(const GenEvent &evt)
Write event to file.
std::string escape(const std::string &s) const
Escape '\' and ' ' characters in string.
void flush()
Inline function flushing buffer to output stream when close to buffer capacity.
GenEvent I/O serialization for structured text files.