HepMC3 event record library
|
GenEvent I/O parsing and serialization for HEPEVT files.
Definition at line 28 of file ReaderHEPEVT.h.
#include <ReaderHEPEVT.h>
Public Member Functions | |
ReaderHEPEVT (const std::string &filename) | |
Default constructor. More... | |
virtual bool | read_hepevt_event_header () |
Find and read event header line from file. More... | |
virtual bool | read_hepevt_particle (int i, bool iflong=true) |
read particle from file More... | |
bool | read_event (GenEvent &evt, bool iflong) |
Read event from file. More... | |
bool | read_event (GenEvent &evt) |
Read event from file. More... | |
void | close () |
Close file stream. More... | |
bool | failed () |
Get stream error state. More... | |
shared_ptr< GenRunInfo > | run_info () const |
Get the global GenRunInfo object. More... | |
Data Fields | |
char * | hepevtbuffer |
Pointer to HEPEVT Fortran common block/C struct. More... | |
FILE * | m_file |
File to read. More... | |
bool | m_failed |
File state. More... | |
int | m_events_count |
Event count. More... | |
Protected Member Functions | |
void | set_run_info (shared_ptr< GenRunInfo > run) |
Set the global GenRunInfo object. More... | |
ReaderHEPEVT | ( | const std::string & | filename | ) |
Default constructor.
Definition at line 18 of file ReaderHEPEVT.cc.
References ERROR, ReaderHEPEVT::hepevtbuffer, ReaderHEPEVT::m_failed, ReaderHEPEVT::m_file, HEPEVT_Wrapper::set_hepevt_address(), and Reader::set_run_info().
|
virtual |
Close file stream.
Implements Reader.
Definition at line 129 of file ReaderHEPEVT.cc.
References ReaderHEPEVT::hepevtbuffer, and ReaderHEPEVT::m_file.
|
virtual |
Get stream error state.
Implements Reader.
Definition at line 135 of file ReaderHEPEVT.cc.
References ReaderHEPEVT::m_failed.
bool read_event | ( | GenEvent & | evt, |
bool | iflong | ||
) |
Read event from file.
[in] | iflong | Event style |
[out] | evt | Contains parsed even |
Definition at line 101 of file ReaderHEPEVT.cc.
References GenEvent::clear(), HEPEVT_Wrapper::HEPEVT_to_GenEvent(), ReaderHEPEVT::m_events_count, ReaderHEPEVT::m_failed, HEPEVT_Wrapper::number_entries(), ReaderHEPEVT::read_hepevt_event_header(), ReaderHEPEVT::read_hepevt_particle(), GenEvent::set_run_info(), GenEvent::weights(), and HEPEVT_Wrapper::zero_everything().
|
virtual |
Read event from file.
[out] | evt | Contains parsed even |
Implements Reader.
Definition at line 125 of file ReaderHEPEVT.cc.
References ReaderHEPEVT::read_event().
|
virtual |
Find and read event header line from file.
Definition at line 35 of file ReaderHEPEVT.cc.
|
virtual |
read particle from file
[in] | i | Particle id |
[in] | iflong | Event style |
Definition at line 63 of file ReaderHEPEVT.cc.
|
inlineinherited |
Get the global GenRunInfo object.
Definition at line 37 of file Reader.h.
References Reader::m_run_info.
|
inlineprotectedinherited |
Set the global GenRunInfo object.
Definition at line 44 of file Reader.h.
References Reader::m_run_info.
char* hepevtbuffer |
Pointer to HEPEVT Fortran common block/C struct.
Definition at line 75 of file ReaderHEPEVT.h.
int m_events_count |
Event count.
Definition at line 78 of file ReaderHEPEVT.h.
bool m_failed |
File state.
Definition at line 77 of file ReaderHEPEVT.h.
FILE* m_file |
File to read.
Definition at line 76 of file ReaderHEPEVT.h.