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=
"");
Definition of class FourVector.
Definition of struct GenEventData.
Definition of class GenEvent.
Definition of struct GenRunInfoData.
Definition of static class Print.
Definition of interface Reader.
Definition of class Units.
Stores event-related information.
Base class for all I/O readers.
PyObject * m_genruninfo
Python runInfo handler.
bool read_event(GenEvent &evt) override
Read event from file.
long int m_tree_getEntries
number of processed events
std::vector< T > get_vector(PyObject *file_name, const std::string &array_name, std::string desired_type="")
Get arrays.
PyObject * m_access_function
Python access function for arrays.
bool failed() override
Get file error state.
bool skip(const int) override
skip events
PyObject * m_tree
Python tree handler.
bool init(const std::string &filename)
init routine
GenEventData * m_event_data
Pointer to structure that holds event data.
int m_events_count
Events count. Needed to read the tree.
void close() override
Close file.
std::string m_tree_name
Name of TTree.
PyObject * get_function(PyObject *, const std::string &)
Get python functions.
std::string m_branch_name
Name of TBranch in TTree.
PyObject * init_python_module(const std::string &)
Init python module.
GenRunInfoData * m_run_info_data
Pointer to structure that holds run info data.
PyObject * m_python_module
Python module.
PyObject * m_file
Python file handler.
Stores serializable event information.
Stores serializable run information.