HepMC3 event record library
|
Definition at line 19 of file ReaderuprootTree.h.
#include <ReaderuprootTree.h>
Public Member Functions | |
ReaderuprootTree (const std::string &filename, const std::string &treename="hepmc3_tree", const std::string &branchname="hepmc3_event") | |
Constructor with tree and branch names. | |
bool | skip (const int) override |
skip events | |
bool | read_event (GenEvent &evt) override |
Read event from file. | |
void | close () override |
Close file. | |
bool | failed () override |
Get file error state. | |
std::shared_ptr< GenRunInfo > | run_info () const |
Get the global GenRunInfo object. | |
void | set_options (const std::map< std::string, std::string > &options) |
Set options. | |
std::map< std::string, std::string > | get_options () const |
Set options. | |
Protected Member Functions | |
void | set_run_info (std::shared_ptr< GenRunInfo > run) |
Set the global GenRunInfo object. | |
Protected Attributes | |
std::map< std::string, std::string > | m_options |
options | |
Private Member Functions | |
bool | init (const std::string &filename) |
init routine | |
PyObject * | get_function (PyObject *, const std::string &) |
Get python functions. | |
PyObject * | init_python_module (const std::string &) |
Init python module. | |
template<class T > | |
std::vector< T > | get_vector (PyObject *file_name, const std::string &array_name, std::string desired_type="") |
Get arrays. | |
Private Attributes | |
int | m_events_count |
Events count. Needed to read the tree. | |
GenEventData * | m_event_data |
Pointer to structure that holds event data. | |
GenRunInfoData * | m_run_info_data |
Pointer to structure that holds run info data. | |
std::string | m_tree_name |
Name of TTree. | |
std::string | m_branch_name |
Name of TBranch in TTree. | |
PyObject * | m_file |
Python file handler. | |
PyObject * | m_tree |
Python tree handler. | |
PyObject * | m_genruninfo |
Python runInfo handler. | |
PyObject * | m_access_function |
Python access function for arrays. | |
PyObject * | m_python_module |
Python module. | |
long int | m_tree_getEntries |
number of processed events | |
std::shared_ptr< GenRunInfo > | m_run_info |
The global GenRunInfo object. | |
ReaderuprootTree | ( | const std::string & | filename, |
const std::string & | treename = "hepmc3_tree" , |
||
const std::string & | branchname = "hepmc3_event" |
||
) |
Constructor with tree and branch names.
Definition at line 100 of file ReaderuprootTree.cc.
References ReaderuprootTree::init().
~ReaderuprootTree | ( | ) |
Definition at line 318 of file ReaderuprootTree.cc.
|
overridevirtual |
|
overridevirtual |
|
private |
Get python functions.
Definition at line 66 of file ReaderuprootTree.cc.
References ReaderuprootTree::m_python_module.
|
inlineinherited |
|
private |
Get arrays.
obtain vector of objects using name and type
Definition at line 9 of file ReaderuprootTree.cc.
References ReaderuprootTree::m_access_function, and ReaderuprootTree::m_events_count.
|
private |
init routine
Definition at line 106 of file ReaderuprootTree.cc.
References ReaderuprootTree::get_function(), HEPMC3_ERROR, ReaderuprootTree::init_python_module(), ReaderuprootTree::m_access_function, ReaderuprootTree::m_event_data, ReaderuprootTree::m_file, ReaderuprootTree::m_python_module, ReaderuprootTree::m_run_info_data, and Reader::set_run_info().
|
private |
Init python module.
Definition at line 79 of file ReaderuprootTree.cc.
References ReaderuprootTree::m_python_module.
|
overridevirtual |
Read event from file.
[out] | evt | Contains parsed event |
Implements Reader.
Definition at line 193 of file ReaderuprootTree.cc.
|
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 |
|
private |
Python access function for arrays.
Definition at line 58 of file ReaderuprootTree.h.
|
private |
Name of TBranch in TTree.
Definition at line 49 of file ReaderuprootTree.h.
|
private |
Pointer to structure that holds event data.
Definition at line 46 of file ReaderuprootTree.h.
|
private |
Events count. Needed to read the tree.
Definition at line 45 of file ReaderuprootTree.h.
|
private |
Python file handler.
Definition at line 52 of file ReaderuprootTree.h.
|
private |
Python runInfo handler.
Definition at line 56 of file ReaderuprootTree.h.
|
protectedinherited |
|
private |
Python module.
Definition at line 60 of file ReaderuprootTree.h.
|
privateinherited |
The global GenRunInfo object.
|
private |
Pointer to structure that holds run info data.
Definition at line 47 of file ReaderuprootTree.h.
|
private |
Python tree handler.
Definition at line 54 of file ReaderuprootTree.h.
|
private |
number of processed events
Definition at line 62 of file ReaderuprootTree.h.
|
private |
Name of TTree.
Definition at line 48 of file ReaderuprootTree.h.