HepMC event record
|
Definition at line 34 of file ReaderRootTree.h.
Public Member Functions | |
ReaderRootTree (const std::string &filename) | |
Default constructor. More... | |
ReaderRootTree (const std::string &filename, const std::string &treename, const std::string &branchname) | |
Constructor with tree name. 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... | |
shared_ptr< GenRunInfo > | run_info () const |
Get the global GenRunInfo object. More... | |
Data Fields | |
TTree * | m_tree |
Tree handler. Public to allow simple access, e.g. custom branches. More... | |
Protected Member Functions | |
void | set_run_info (shared_ptr< GenRunInfo > run) |
Set the global GenRunInfo object. More... | |
void | set_run_info (shared_ptr< GenRunInfo > run) |
Set the global GenRunInfo object. More... | |
Private Member Functions | |
bool | init () |
init routine More... | |
Private Attributes | |
TFile | m_file |
File handler. More... | |
int | m_events_count |
Events count. Needed to read the tree. More... | |
GenEventData * | m_event_data |
std::string | m_tree_name |
std::string | m_branch_name |
ReaderRootTree | ( | const std::string & | filename | ) |
Default constructor.
Definition at line 17 of file ReaderRootTree.cc.
References ReaderRootTree::init().
ReaderRootTree | ( | const std::string & | filename, |
const std::string & | treename, | ||
const std::string & | branchname | ||
) |
Constructor with tree name.
Definition at line 24 of file ReaderRootTree.cc.
References ReaderRootTree::init().
|
virtual |
Close file stream.
Implements Reader.
Definition at line 88 of file ReaderRootTree.cc.
References ReaderRootTree::m_file.
|
virtual |
Get stream error state.
Implements Reader.
Definition at line 93 of file ReaderRootTree.cc.
References ReaderRootTree::m_events_count, ReaderRootTree::m_file, and ReaderRootTree::m_tree.
|
private |
init routine
Definition at line 30 of file ReaderRootTree.cc.
References ReaderRootTree::m_file, ReaderRootTree::m_tree, and Reader::set_run_info().
|
virtual |
Read event from file.
[out] | evt | Contains parsed event |
Implements Reader.
Definition at line 70 of file ReaderRootTree.cc.
References GenEventData::attribute_id, GenEventData::attribute_name, GenEventData::attribute_string, GenEventData::links1, GenEventData::links2, ReaderRootTree::m_events_count, ReaderRootTree::m_tree, GenEventData::particles, GenEvent::read_data(), and GenEventData::vertices.
|
inlineinherited |
Get the global GenRunInfo object.
Definition at line 37 of file build/outputs/include/HepMC/Reader.h.
References Reader::m_run_info.
|
inlineinherited |
Get the global GenRunInfo object.
Definition at line 37 of file include/HepMC/Reader.h.
References Reader::m_run_info.
|
inlineprotectedinherited |
Set the global GenRunInfo object.
Definition at line 44 of file build/outputs/include/HepMC/Reader.h.
References Reader::m_run_info.
|
inlineprotectedinherited |
Set the global GenRunInfo object.
Definition at line 44 of file include/HepMC/Reader.h.
References Reader::m_run_info.
|
private |
Events count. Needed to read the tree.
Definition at line 73 of file ReaderRootTree.h.
|
private |
File handler.
Definition at line 69 of file ReaderRootTree.h.
TTree* m_tree |
Tree handler. Public to allow simple access, e.g. custom branches.
Definition at line 71 of file ReaderRootTree.h.