21 m_file = TFile::Open(filename.c_str());
29 m_file = TFile::Open(filename.c_str());
59 HEPMC3_WARNING_LEVEL(100,
"ReaderRootTree: problem reading branch tree: GenRunInfo. Will attempt to read GenRunInfoData object.")
60 std::shared_ptr<GenRunInfo> ri = std::make_shared<GenRunInfo>();
119 if ( !
m_file->IsOpen() )
return true;
#define HEPMC3_WARNING_LEVEL(LEVEL, MESSAGE)
Macro for printing HEPMC3_HEPMC3_WARNING messages.
#define HEPMC3_ERROR_LEVEL(LEVEL, MESSAGE)
Macro for printing error messages.
Definition of class ReaderRootTree.
Definition of class Units.
Declaration of the Verrion functions and some macros.
Stores event-related information.
void set_run_info(std::shared_ptr< GenRunInfo > run)
Set the GenRunInfo object by smart pointer.
void read_data(const GenEventData &data)
Fill GenEvent based on GenEventData.
GenEvent I/O parsing and serialization for root files based on root TTree.
bool read_event(GenEvent &evt) override
Read event from file.
TTree * m_tree
Tree handler. Public to allow simple access, e.g. custom branches.
ReaderRootTree(const std::string &filename)
Default constructor.
bool failed() override
Get file error state.
bool skip(const int) override
skip events
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.
std::string m_branch_name
Name of TBranch in TTree.
TFile * m_file
File handler.
GenRunInfoData * m_run_info_data
Pointer to structure that holds run info data.
virtual void set_run_info(std::shared_ptr< GenRunInfo > run)
Set the global GenRunInfo object.
virtual std::shared_ptr< GenRunInfo > run_info() const
Get the global GenRunInfo object.
Stores serializable event information.
Stores serializable run information.