23#include "marley/OutputFile.hh"
35 class OutputFileAscii :
public OutputFile {
39 OutputFileAscii(
const JSON& output_config );
41 virtual ~OutputFileAscii() =
default;
43 virtual bool resume( std::unique_ptr<marley::Generator>& gen,
44 long& num_previous_events )
override;
60 std::shared_ptr< HepMC3::ReaderAscii >
reader_;
63 std::shared_ptr< HepMC3::WriterAscii >
writer_;
Stores event-related information.
GenEvent I/O parsing for structured text files.
GenEvent I/O serialization for structured text files.
virtual void open()
Opens the owned std::fstream with the correct settings.
std::fstream stream_
Stream used to read and write from the output file as needed.
std::shared_ptr< HepMC3::ReaderAscii > reader_
std::shared_ptr< HepMC3::GenEvent > pending_flush_event_
virtual void write_event(HepMC3::GenEvent *event) override
Write a new HepMC3::GenEvent to this output file.
virtual bool resume(std::unique_ptr< marley::Generator > &gen, long &num_previous_events) override
Load a marley::Generator object whose configuration and state were saved to the metadata in the outpu...
int_fast64_t byte_count_
Storage for the number of bytes written to disk.
std::streampos pending_truncate_pos_
std::shared_ptr< HepMC3::WriterAscii > writer_
Helper object used to produce standard ASCII HepMC3 output.
virtual int_fast64_t bytes_written() override
The number of bytes that have been written during the current MARLEY session to this file.