| HepMC3 event record library
    | 
Definition at line 25 of file ReaderuprootTree.h.
#include <ReaderuprootTree.h>
 Inheritance diagram for ReaderuprootTree:
 Inheritance diagram for ReaderuprootTree: Collaboration diagram for ReaderuprootTree:
 Collaboration diagram for ReaderuprootTree:| 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. | |
| virtual std::shared_ptr< GenRunInfo > | run_info () const | 
| Get the global GenRunInfo object. | |
| virtual void | set_options (const std::map< std::string, std::string > &options) | 
| Set options. | |
| virtual std::map< std::string, std::string > | get_options () const | 
| Get options. | |
| virtual 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 102 of file ReaderuprootTree.cc.
References init(), m_branch_name, m_events_count, m_tree, and m_tree_name.
| ~ReaderuprootTree | ( | ) | 
Definition at line 319 of file ReaderuprootTree.cc.
| 
 | overridevirtual | 
| 
 | overridevirtual | 
Get file error state.
Implements Reader.
Definition at line 313 of file ReaderuprootTree.cc.
References m_events_count, m_genruninfo, and m_run_info_data.
| 
 | private | 
Get python functions.
Definition at line 71 of file ReaderuprootTree.cc.
References m_python_module.
| 
 | inlinevirtualinherited | 
Get options.
Reimplemented in ReaderPlugin.
Definition at line 53 of file Reader.h.
References m_options.
| 
 | private | 
Get arrays.
obtain vector of objects using name and type
Definition at line 14 of file ReaderuprootTree.cc.
References m_access_function, and m_events_count.
| 
 | private | 
init routine
Definition at line 108 of file ReaderuprootTree.cc.
References get_function(), HEPMC3_ERROR, init_python_module(), m_access_function, m_event_data, m_file, m_python_module, m_run_info_data, and Reader::set_run_info().
| 
 | private | 
| 
 | overridevirtual | 
Read event from file.
| [out] | evt | Contains parsed event | 
Implements Reader.
Definition at line 194 of file ReaderuprootTree.cc.
References m_genruninfo, and m_tree_name.
| 
 | inlinevirtualinherited | 
Get the global GenRunInfo object.
Reimplemented in ReaderPlugin.
Definition at line 44 of file Reader.h.
References m_run_info.
| 
 | inlinevirtualinherited | 
Set options.
Reimplemented in ReaderPlugin.
Definition at line 51 of file Reader.h.
References m_options.
| 
 | inlinevirtualinherited | 
Set the global GenRunInfo object.
Reimplemented in ReaderPlugin.
Definition at line 56 of file Reader.h.
References m_run_info.
| 
 | overridevirtual | 
skip events
Reimplemented from Reader.
Definition at line 186 of file ReaderuprootTree.cc.
References m_branch_name, m_file, m_tree, and m_tree_name.
| 
 | private | 
Python access function for arrays.
Definition at line 64 of file ReaderuprootTree.h.
| 
 | private | 
Name of TBranch in TTree.
Definition at line 55 of file ReaderuprootTree.h.
| 
 | private | 
Pointer to structure that holds event data.
Definition at line 52 of file ReaderuprootTree.h.
| 
 | private | 
Events count. Needed to read the tree.
Definition at line 51 of file ReaderuprootTree.h.
| 
 | private | 
Python file handler.
Definition at line 58 of file ReaderuprootTree.h.
| 
 | private | 
Python runInfo handler.
Definition at line 62 of file ReaderuprootTree.h.
| 
 | protectedinherited | 
| 
 | private | 
Python module.
Definition at line 66 of file ReaderuprootTree.h.
| 
 | privateinherited | 
The global GenRunInfo object.
| 
 | private | 
Pointer to structure that holds run info data.
Definition at line 53 of file ReaderuprootTree.h.
| 
 | private | 
Python tree handler.
Definition at line 60 of file ReaderuprootTree.h.
| 
 | private | 
number of processed events
Definition at line 68 of file ReaderuprootTree.h.
| 
 | private | 
Name of TTree.
Definition at line 54 of file ReaderuprootTree.h.