HepMC3 event record library
|
GenEvent I/O parsing and serialization for root files. More...
#include <ReaderRoot.h>
Public Member Functions | |
ReaderRoot (const std::string &filename) | |
Default constructor. More... | |
bool | skip (const int) override |
skip events More... | |
bool | read_event (GenEvent &evt) override |
Read event from file. More... | |
void | close () override |
Close file stream. More... | |
bool | failed () override |
Get stream error state. More... | |
std::shared_ptr< GenRunInfo > | run_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 | |
TFile * | m_file |
File handler. More... | |
TIter * | m_next |
Iterator for event reading. More... | |
GenEvent I/O parsing and serialization for root files.
If HepMC was compiled with path to ROOT available, this class can be used for root file I/O in the same manner as with HepMC::ReaderAscii class.
Definition at line 32 of file ReaderRoot.h.
ReaderRoot | ( | const std::string & | filename | ) |
|
overridevirtual |
Close file stream.
Implements Reader.
Definition at line 88 of file ReaderRoot.cc.
References ReaderRoot::m_file.
|
overridevirtual |
Get stream error state.
Implements Reader.
Definition at line 92 of file ReaderRoot.cc.
References ReaderRoot::m_file.
|
inlineinherited |
|
overridevirtual |
Read event from file.
[out] | evt | Contains parsed event |
Implements Reader.
Definition at line 50 of file ReaderRoot.cc.
References HEPMC3_ERROR, HEPMC3_WARNING, ReaderRoot::m_file, ReaderRoot::m_next, GenEvent::read_data(), Reader::run_info(), and GenEvent::set_run_info().
|
inlineinherited |
Get the global GenRunInfo object.
Definition at line 44 of file Reader.h.
References Reader::m_run_info.
|
inlineinherited |
|
inlineprotectedinherited |
Set the global GenRunInfo object.
Definition at line 64 of file Reader.h.
References Reader::m_run_info.
|
overridevirtual |
skip events
Reimplemented from Reader.
Definition at line 39 of file ReaderRoot.cc.
References GenEvent::clear(), ReaderRoot::failed(), and ReaderRoot::read_event().
|
private |
File handler.
Definition at line 62 of file ReaderRoot.h.
|
private |
Iterator for event reading.
Definition at line 63 of file ReaderRoot.h.
|
protectedinherited |