6 #ifndef HEPMC3_READERGZ_H
7 #define HEPMC3_READERGZ_H
39 std::ifstream file(filename);
41 printf(
"Error in ReaderGZ: could not open file%s\n",filename.c_str());
44 magic_t my_magic = {0x1f, 0x8b, 0x08, 0x08};
46 file.read((
char *) file_magic.
bytes,
sizeof(file_magic));
53 printf(
"Error in ReaderGZ: make sure %s is a gziped file!\n",filename.c_str());
GenEvent I/O parsing for structured text files compressed with gzip.
Definition of class ReaderHEPEVT.
Union to hold first 4 byts of file, i.e. magic bytes.
Definition of interface Reader.
bool read_event(GenEvent &evt)
Read event.
std::shared_ptr< Reader > deduce_reader(std::istream &stream)
This function will deduce the type of input stream based on its content and will return appropriate R...
Definition of class ReaderAsciiHepMC2.
Stores event-related information.
ReaderGZ(const std::string &filename)
Construcor.
Definition of class ReaderAscii.
igzstream m_gzstream
Stream to read.
Definition of class GenEvent.
Base class for all I/O readers.
Definition of class ReaderLHEF.
std::shared_ptr< Reader > m_reader
Actual reader.