|
HepMC3 event record library
|
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.
#include <ReaderRoot.h>
Inheritance diagram for ReaderRoot:
Collaboration diagram for ReaderRoot:Public Member Functions | |
| ReaderRoot (const std::string &filename) | |
| Default constructor. 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... | |
Protected Member Functions | |
| void | set_run_info (shared_ptr< GenRunInfo > run) |
| Set the global GenRunInfo object. More... | |
Private Attributes | |
| TFile * | m_file |
| File handler. More... | |
| TIter * | m_next |
| Iterator for event reading. More... | |
| shared_ptr< GenRunInfo > | m_run_info |
| The global GenRunInfo object. More... | |
| ReaderRoot | ( | const std::string & | filename | ) |
Default constructor.
Definition at line 15 of file ReaderRoot.cc.
References ERROR, ReaderRoot::m_file, ReaderRoot::m_next, and Reader::set_run_info().
|
virtual |
Close file stream.
Implements Reader.
Definition at line 75 of file ReaderRoot.cc.
References ReaderRoot::m_file.
|
virtual |
Get stream error state.
Implements Reader.
Definition at line 79 of file ReaderRoot.cc.
References ReaderRoot::m_file.
|
virtual |
Read event from file.
| [out] | evt | Contains parsed event |
Implements Reader.
Definition at line 37 of file ReaderRoot.cc.
References ERROR, ReaderRoot::m_file, ReaderRoot::m_next, GenEvent::read_data(), Reader::run_info(), GenEvent::set_run_info(), and WARNING.
|
inlineinherited |
Get the global GenRunInfo object.
Definition at line 39 of file Reader.h.
References Reader::m_run_info.
|
inlineprotectedinherited |
Set the global GenRunInfo object.
Definition at line 46 of file Reader.h.
References Reader::m_run_info.
|
private |
File handler.
Definition at line 60 of file ReaderRoot.h.
|
private |
Iterator for event reading.
Definition at line 61 of file ReaderRoot.h.
|
privateinherited |
The global GenRunInfo object.
1.8.17