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::Reader Class Referenceabstract

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

#include <Reader.h>

Inheritance diagram for HepMC3::Reader:
HepMC3::ReaderAscii

Public Member Functions

 Reader ()
 Constructor.
 
 Reader (const Reader &)=delete
 deleted copy constructor
 
virtual ~Reader ()
 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
 Get options.
 
Readeroperator= (const Reader &)=delete
 deleted copy assignment operator
 
virtual bool read_event (GenEvent &evt)=0
 Fill next event from input into evt.
 
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 bool skip (const int)
 skip or fast forward reading of some events
 

Protected Attributes

std::map< std::string, std::string > m_options
 Options.
 

Detailed Description

Base class for all I/O readers.

Definition at line 25 of file Reader.h.

Constructor & Destructor Documentation

◆ Reader()

HepMC3::Reader::Reader ( )
inline

Constructor.

Definition at line 28 of file Reader.h.

28{}

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

◆ ~Reader()

virtual HepMC3::Reader::~Reader ( )
inlinevirtual

Virtual destructor.

Definition at line 31 of file Reader.h.

31{}

Member Function Documentation

◆ close()

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

Close file and/or stream.

Implemented in HepMC3::ReaderAscii.

◆ failed()

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

Get file and/or stream error state.

Implemented in HepMC3::ReaderAscii.

Referenced by skip().

◆ get_options()

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

Get options.

Definition at line 53 of file Reader.h.

53{ return m_options; }
std::map< std::string, std::string > m_options
Options.
Definition Reader.h:60

References m_options.

◆ read_event()

virtual bool HepMC3::Reader::read_event ( GenEvent & evt)
pure virtual

Fill next event from input into evt.

Implemented in HepMC3::ReaderAscii.

◆ run_info()

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

Get the global GenRunInfo object.

Definition at line 44 of file Reader.h.

44{ return m_run_info; }

Referenced by HepMC3::ReaderAscii::read_event().

◆ set_options()

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

Set options.

Definition at line 51 of file Reader.h.

51{ m_options = options; }

References m_options.

◆ set_run_info()

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

◆ skip()

virtual bool HepMC3::Reader::skip ( const int )
inlinevirtual

skip or fast forward reading of some events

Reimplemented in HepMC3::ReaderAscii.

Definition at line 34 of file Reader.h.

34{ return !failed();}
virtual bool failed()=0
Get file and/or stream error state.

References failed().

Member Data Documentation

◆ m_options

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

Options.

Definition at line 60 of file Reader.h.

Referenced by get_options(), and set_options().


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