27#include "marley/OutputFile.hh"
38 class OutputFileRoot :
public OutputFile {
42 OutputFileRoot(
const JSON& output_config );
44 virtual ~OutputFileRoot();
46 virtual bool resume( std::unique_ptr<marley::Generator>& gen,
47 long& num_previous_events )
override;
Stores event-related information.
std::unique_ptr< HepMC3::GenEventData > temp_event_data_
Temporary storage for the events.
HepMC3::GenEventData * temp_event_data_ptr_
virtual void open()
Opens the owned ROOT file with the correct settings.
std::unique_ptr< HepMC3::GenRunInfoData > temp_run_info_data_
Temporary storage for the run information.
TTree * out_tree_
TTree object used to store the events.
std::shared_ptr< HepMC3::GenRunInfo > run_info_
Copy of the run information to check for a mismatch.
virtual void write_event(HepMC3::GenEvent *event) override
Write a new HepMC3::GenEvent to this output file.
void clear_event_data()
Clears the temporary storage for event data.
std::unique_ptr< TFile > out_tfile_
TFile object used to manage input/output.
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...
virtual int_fast64_t bytes_written() override
The number of bytes that have been written during the current MARLEY session to this file.
Stores serializable event information.
Stores serializable run information.