HepMC3 event record library
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
ReaderGZ Class Reference

GenEvent I/O parsing for structured text files compressed with gzip. More...

#include <ReaderGZ.h>

+ Inheritance diagram for ReaderGZ:
+ Collaboration diagram for ReaderGZ:

Public Member Functions

 ReaderGZ (const std::string &filename)
 Construcor. More...
 
bool read_event (GenEvent &evt)
 Read event. More...
 
bool failed ()
 State. More...
 
void close ()
 Close. More...
 
virtual bool skip (const int)
 skip or fast forward reading of some events More...
 
std::shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. 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

igzstream m_gzstream
 Stream to read. More...
 
std::shared_ptr< Readerm_reader
 Actual reader. More...
 

Detailed Description

GenEvent I/O parsing for structured text files compressed with gzip.

Definition at line 34 of file ReaderGZ.h.

Constructor & Destructor Documentation

ReaderGZ ( const std::string &  filename)
inline

Construcor.

Definition at line 37 of file ReaderGZ.h.

References magic_t::bytes, HepMC3::deduce_reader(), ReaderGZ::m_gzstream, ReaderGZ::m_reader, and magic_t::number.

Member Function Documentation

void close ( )
inlinevirtual

Close.

Implements Reader.

Definition at line 68 of file ReaderGZ.h.

References ReaderGZ::m_reader.

bool failed ( )
inlinevirtual

State.

Implements Reader.

Definition at line 64 of file ReaderGZ.h.

References ReaderGZ::m_gzstream.

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

Set options.

Definition at line 58 of file Reader.h.

References Reader::m_options.

bool read_event ( GenEvent evt)
inlinevirtual

Read event.

Implements Reader.

Definition at line 60 of file ReaderGZ.h.

References ReaderGZ::m_reader.

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

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)
inlineinherited

Set options.

Definition at line 53 of file Reader.h.

References Reader::m_options.

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

Set the global GenRunInfo object.

Definition at line 64 of file Reader.h.

References Reader::m_run_info.

virtual bool skip ( const int  )
inlinevirtualinherited

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

igzstream m_gzstream
private

Stream to read.

Definition at line 70 of file ReaderGZ.h.

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

options

Definition at line 68 of file Reader.h.

std::shared_ptr<Reader> m_reader
private

Actual reader.

Definition at line 73 of file ReaderGZ.h.


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