MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
HepMC3::Writer Class Referenceabstract

Base class for all I/O writers. More...

#include <Writer.h>

Inheritance diagram for HepMC3::Writer:
HepMC3::WriterAscii

Public Member Functions

 Writer ()
 Constructor.
 
 Writer (const Writer &)=delete
 deleted copy constructor
 
virtual ~Writer ()
 Virtual destructor.
 
virtual void close ()=0
 Close file and/or stream.
 
virtual bool failed ()=0
 Get file and/or stream error state.
 
virtual std::map< std::string, std::string > get_options () const
 Set options.
 
Writeroperator= (const Writer &)=delete
 deleted copy assignment operator
 
virtual std::shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object.
 
virtual void set_options (const std::map< std::string, std::string > &options)
 Set options.
 
virtual void set_run_info (std::shared_ptr< GenRunInfo > run)
 Set the global GenRunInfo object.
 
virtual void write_event (const GenEvent &evt)=0
 Write event evt to output target.
 

Protected Attributes

std::map< std::string, std::string > m_options
 options
 

Detailed Description

Base class for all I/O writers.

Definition at line 25 of file Writer.h.

Constructor & Destructor Documentation

◆ Writer()

HepMC3::Writer::Writer ( )
inline

Constructor.

Definition at line 29 of file Writer.h.

29{}

Referenced by Writer(), and operator=().

◆ ~Writer()

virtual HepMC3::Writer::~Writer ( )
inlinevirtual

Virtual destructor.

Definition at line 32 of file Writer.h.

32{}

Member Function Documentation

◆ close()

virtual void HepMC3::Writer::close ( )
pure virtual

Close file and/or stream.

Implemented in HepMC3::WriterAscii.

◆ failed()

virtual bool HepMC3::Writer::failed ( )
pure virtual

Get file and/or stream error state.

Implemented in HepMC3::WriterAscii.

◆ get_options()

virtual std::map< std::string, std::string > HepMC3::Writer::get_options ( ) const
inlinevirtual

Set options.

Definition at line 54 of file Writer.h.

54{ return m_options; }
std::map< std::string, std::string > m_options
options
Definition Writer.h:59

References m_options.

◆ run_info()

virtual std::shared_ptr< GenRunInfo > HepMC3::Writer::run_info ( ) const
inlinevirtual

◆ set_options()

virtual void HepMC3::Writer::set_options ( const std::map< std::string, std::string > & options)
inlinevirtual

Set options.

Definition at line 52 of file Writer.h.

52{ m_options = options; }

References m_options.

◆ set_run_info()

virtual void HepMC3::Writer::set_run_info ( std::shared_ptr< GenRunInfo > run)
inlinevirtual

◆ write_event()

virtual void HepMC3::Writer::write_event ( const GenEvent & evt)
pure virtual

Write event evt to output target.

Implemented in HepMC3::WriterAscii.

Member Data Documentation

◆ m_options

std::map<std::string, std::string> HepMC3::Writer::m_options
protected

options

Definition at line 59 of file Writer.h.

Referenced by get_options(), set_options(), and HepMC3::WriterAscii::write_event().


The documentation for this class was generated from the following file: