HepMC3 event record library
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
Reader Class Referenceabstract

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

#include <Reader.h>

+ Inheritance diagram for Reader:
+ Collaboration diagram for Reader:

Public Member Functions

 Reader ()
 Constructor. More...
 
virtual ~Reader ()
 Virtual destructor. More...
 
virtual bool skip (const int)
 skip or fast forward reading of some events More...
 
virtual bool read_event (GenEvent &evt)=0
 Fill next event from input into evt. More...
 
virtual bool failed ()=0
 Get file and/or stream error state. More...
 
virtual void close ()=0
 Close file and/or stream. More...
 
std::shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 
 Reader (const Reader &)=delete
 deleted copy constructor More...
 
Readeroperator= (const Reader &)=delete
 deleted copy assignment operator More...
 
void set_options (const std::map< std::string, std::string > &options)
 Set options. More...
 
std::map< std::string,
std::string > 
get_options () const
 Set options. More...
 

Protected Member Functions

void set_run_info (std::shared_ptr< GenRunInfo > run)
 Set the global GenRunInfo object. More...
 

Protected Attributes

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

Private Attributes

std::shared_ptr< GenRunInfom_run_info
 The global GenRunInfo object. More...
 

Detailed Description

Base class for all I/O readers.

Definition at line 25 of file Reader.h.

Constructor & Destructor Documentation

Reader ( )
inline

Constructor.

Definition at line 28 of file Reader.h.

virtual ~Reader ( )
inlinevirtual

Virtual destructor.

Definition at line 31 of file Reader.h.

Reader ( const Reader )
delete

deleted copy constructor

Member Function Documentation

virtual void close ( )
pure virtual
virtual bool failed ( )
pure virtual

Get file and/or stream error state.

Implemented in ReaderHEPEVT, ReaderGZ, ReaderRootTree, ReaderRoot, ReaderAsciiHepMC2, ReaderLHEF, ReaderAscii, and ReaderPlugin.

std::map<std::string, std::string> get_options ( ) const
inline

Set options.

Definition at line 58 of file Reader.h.

References Reader::m_options.

Reader& operator= ( const Reader )
delete

deleted copy assignment operator

virtual bool read_event ( GenEvent evt)
pure virtual

Fill next event from input into evt.

Implemented in ReaderHEPEVT, ReaderGZ, ReaderRootTree, ReaderAsciiHepMC2, ReaderRoot, ReaderLHEF, ReaderAscii, and ReaderPlugin.

std::shared_ptr<GenRunInfo> run_info ( ) const
inline

Get the global GenRunInfo object.

Examples:
LHEF_example_cat.cc.

Definition at line 44 of file Reader.h.

References Reader::m_run_info.

void set_options ( const std::map< std::string, std::string > &  options)
inline

Set options.

Definition at line 53 of file Reader.h.

References Reader::m_options.

void set_run_info ( std::shared_ptr< GenRunInfo run)
inlineprotected

Set the global GenRunInfo object.

Definition at line 64 of file Reader.h.

References Reader::m_run_info.

virtual bool skip ( const int  )
inlinevirtual

skip or fast forward reading of some events

Reimplemented in ReaderHEPEVT, ReaderRootTree, ReaderAsciiHepMC2, ReaderLHEF, ReaderRoot, and ReaderAscii.

Definition at line 34 of file Reader.h.

References Reader::failed().

Field Documentation

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

options

Definition at line 68 of file Reader.h.

std::shared_ptr<GenRunInfo> m_run_info
private

The global GenRunInfo object.

Definition at line 71 of file Reader.h.


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