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

Detailed Description

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

Examples:
convert_example.cc.

Definition at line 34 of file ReaderGZ.h.

#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...
 
shared_ptr< GenRunInforun_info () const
 Get the global GenRunInfo object. More...
 

Protected Member Functions

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

Private Member Functions

std::shared_ptr< Readerdeduce_reader (std::istream &stream_test, std::istream &stream)
 THis function will deduce the type of input file based on the name/URL and it's content and will return appropriate Reader. More...
 

Private Attributes

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

Constructor & Destructor Documentation

◆ ReaderGZ()

ReaderGZ ( const std::string &  filename)
inline

Member Function Documentation

◆ close()

void close ( )
inlinevirtual

Close.

Implements Reader.

Definition at line 67 of file ReaderGZ.h.

References ReaderGZ::m_reader.

◆ deduce_reader()

std::shared_ptr<Reader> deduce_reader ( std::istream &  stream_test,
std::istream &  stream 
)
inlineprivate

THis function will deduce the type of input file based on the name/URL and it's content and will return appropriate Reader.

Definition at line 75 of file ReaderGZ.h.

◆ failed()

bool failed ( )
inlinevirtual

State.

Implements Reader.

Definition at line 63 of file ReaderGZ.h.

References ReaderGZ::m_gzstream.

◆ read_event()

bool read_event ( GenEvent evt)
inlinevirtual

Read event.

Implements Reader.

Definition at line 59 of file ReaderGZ.h.

References ReaderGZ::m_reader.

◆ run_info()

shared_ptr<GenRunInfo> run_info ( ) const
inlineinherited

Get the global GenRunInfo object.

Examples:
convert_example.cc, and LHEF_example_cat.cc.

Definition at line 39 of file Reader.h.

References Reader::m_run_info.

◆ set_run_info()

void set_run_info ( shared_ptr< GenRunInfo run)
inlineprotectedinherited

Set the global GenRunInfo object.

Definition at line 46 of file Reader.h.

References Reader::m_run_info.

Field Documentation

◆ m_gzstream

igzstream m_gzstream
private

Stream to read.

Definition at line 69 of file ReaderGZ.h.

◆ m_gzstream_test

igzstream m_gzstream_test
private

Stream to test.

Definition at line 72 of file ReaderGZ.h.

◆ m_reader

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: