6 #ifndef HEPMC_WRITERROOTTREE_H 7 #define HEPMC_WRITERROOTTREE_H 21 #include "HepMC/Writer.h" 22 #include "HepMC/GenEvent.h" 23 #include "HepMC/Data/GenEventData.h" 24 #include "HepMC/Data/GenRunInfoData.h" 43 shared_ptr<GenRunInfo> run = shared_ptr<GenRunInfo>());
45 WriterRootTree(
const std::string &filename,
const std::string &treename,
const std::string &branchname,
46 shared_ptr<GenRunInfo> run = shared_ptr<GenRunInfo>());
69 bool init(shared_ptr<GenRunInfo> run);
80 std::string m_tree_name;
81 std::string m_branch_name;
TTree * m_tree
Tree handler. Public to allow simple access, e.g. custom branches.
bool init(shared_ptr< GenRunInfo > run)
init routine
void close()
Close file stream.
TFile m_file
File handler.
int m_events_count
Events count. Needed to read the tree.
Stores event-related information.
GenEvent I/O serialization for root files based on root TTree.
Base class for all I/O writers.
void write_run_info()
Write the GenRunInfo object to file.
Definition of template class SmartPointer.
bool failed()
Get stream error state flag.
WriterRootTree(const std::string &filename, shared_ptr< GenRunInfo > run=shared_ptr< GenRunInfo >())
Default constructor.
void write_event(const GenEvent &evt)
Write event to file.
Stores serializable event information.