1 #ifndef READERUPROOTTREE_H
2 #define READERUPROOTTREE_H
11 #include "HepMC3/Version.h"
13 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
14 #include "numpy/arrayobject.h"
23 ReaderuprootTree(
const std::string &filename,
const std::string &treename=
"hepmc3_tree",
const std::string &branchname=
"hepmc3_event");
26 bool skip(
const int)
override;
35 void close()
override;
43 bool init(
const std::string &filename);
68 template <
class T> std::vector<T>
get_vector(PyObject * file_name,
const std::string& array_name,std::string desired_type=
"");
long int m_tree_getEntries
number of processed events
Definition of interface Reader.
std::vector< T > get_vector(PyObject *file_name, const std::string &array_name, std::string desired_type="")
Get arrays.
PyObject * init_python_module(const std::string &)
Init python module.
std::string m_tree_name
Name of TTree.
GenRunInfoData * m_run_info_data
Pointer to structure that holds run info data.
bool failed() override
Get file error state.
Definition of struct GenEventData.
PyObject * get_function(PyObject *, const std::string &)
Get python functions.
PyObject * m_access_function
Python access function for arrays.
int m_events_count
Events count. Needed to read the tree.
GenEventData * m_event_data
Pointer to structure that holds event data.
std::string m_branch_name
Name of TBranch in TTree.
Stores event-related information.
Stores serializable event information.
bool read_event(GenEvent &evt) override
Read event from file.
Stores serializable run information.
bool skip(const int) override
skip events
Definition of class Units.
PyObject * m_file
Python file handler.
void close() override
Close file.
PyObject * m_genruninfo
Python runInfo handler.
Definition of static class Print.
Definition of class GenEvent.
Base class for all I/O readers.
bool init(const std::string &filename)
init routine
PyObject * m_python_module
Python module.
Definition of class FourVector.
ReaderuprootTree(const std::string &filename, const std::string &treename="hepmc3_tree", const std::string &branchname="hepmc3_event")
Constructor with tree and branch names.
PyObject * m_tree
Python tree handler.
Definition of struct GenRunInfoData.