HepMC3 event record library
|
Go to the documentation of this file.
13 #include "HepMC3/Version.h"
16 HEPMC3_DECLARE_READER_FILE(ReaderRootTree)
19 m_tree(0),m_events_count(0),m_tree_name("hepmc3_tree"),m_branch_name("hepmc3_event")
21 m_file = TFile::Open(filename.c_str());
27 m_tree(0),m_events_count(0),m_tree_name(treename.c_str()),m_branch_name(branchname.c_str())
29 m_file = TFile::Open(filename.c_str());
59 HEPMC3_ERROR(
"ReaderRootTree2: problem reading branch tree: " <<
"GenRunInfo")
110 if ( !
m_file->IsOpen() )
return true;
std::vector< std::string > tool_name
Tool names.
bool skip(const int) override
skip events
TTree * m_tree
Tree handler. Public to allow simple access, e.g. custom branches.
Stores event-related information.
TFile * m_file
File handler.
std::string m_tree_name
Name of TTree.
std::string m_branch_name
Name of TBranch in TTree.
int m_events_count
Events count. Needed to read the tree.
std::vector< std::string > tool_description
Tool descriptions.
std::vector< std::string > weight_names
Weight names.
Stores serializable event information.
Definition of class ReaderRootTree.
std::vector< int > links1
First id of the vertex links.
void set_run_info(shared_ptr< GenRunInfo > run)
Set the GenRunInfo object by smart pointer.
bool read_event(GenEvent &evt) override
Read event from file.
std::vector< int > links2
Second id of the vertex links.
std::vector< std::string > attribute_string
Attribute serialized as string.
std::vector< std::string > attribute_name
Attribute name.
bool failed() override
Get file error state.
void close() override
Close file.
Stores serializable run information.
ReaderRootTree(const std::string &filename)
Default constructor.
std::vector< std::string > attribute_string
Attribute serialized as string.
GenEvent I/O parsing and serialization for root files based on root TTree.
std::vector< std::string > attribute_name
Attribute name.
#define HEPMC3_ERROR(MESSAGE)
Macro for printing error messages.
GenRunInfoData * m_run_info_data
Pointer to structure that holds run info data.
shared_ptr< GenRunInfo > run_info() const
Get the global GenRunInfo object.
Definition of class Units.
std::vector< GenParticleData > particles
Particles.
GenEventData * m_event_data
Pointer to structure that holds event data.
std::vector< std::string > tool_version
Tool versions.
void set_run_info(shared_ptr< GenRunInfo > run)
Set the global GenRunInfo object.
void read_data(const GenEventData &data)
Fill GenEvent based on GenEventData.
std::vector< GenVertexData > vertices
Vertices.
std::vector< int > attribute_id
Attribute owner id.