20 m_file = TFile::Open(filename.c_str());
28 m_file = TFile::Open(filename.c_str());
36 ERROR(
"ReaderRootTree: problem opening file: " <<
m_file->GetName() )
58 ERROR(
"ReaderRootTree2: problem reading branch tree: " <<
"GenRunInfo")
103 if ( !
m_file->IsOpen() )
return true;
#define ERROR(MESSAGE)
Macro for printing error messages.
Definition of class ReaderRootTree.
Definition of class Units.
Stores event-related information.
void set_run_info(shared_ptr< GenRunInfo > run)
Set the GenRunInfo object by smart pointer.
void read_data(const GenEventData &data)
Fill GenEvent based on GenEventData.
bool read_event(GenEvent &evt)
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.
GenEventData * m_event_data
Pointer to structure that holds event data.
int m_events_count
Events count. Needed to read the tree.
std::string m_tree_name
Name of TTree.
std::string m_branch_name
Name of TBranch in TTree.
TFile * m_file
File handler.
bool failed()
Get file error state.
GenRunInfoData * m_run_info_data
Pointer to structure that holds run info data.
void set_run_info(shared_ptr< GenRunInfo > run)
Set the global GenRunInfo object.
shared_ptr< GenRunInfo > run_info() const
Get the global GenRunInfo object.
Stores serializable event information.
Stores serializable run information.