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