3 #include "WriterRootTreeOPAL.h" 7 WriterRootTreeOPAL::WriterRootTreeOPAL(
const std::string &filename,shared_ptr<GenRunInfo> run):WriterRootTree::WriterRootTree(filename,
"h10",
"h10",run) {}
8 void WriterRootTreeOPAL::init_branches()
10 m_tree->Branch(
"Irun", &m_Irun);
11 m_tree->Branch(
"Ievnt", &m_Ievnt);
12 m_tree->Branch(
"Ebeam",&m_Ebeam);
17 std::vector<int> beams;
18 for (
int i=0;i<evt.
particles().size();i++)
28 void WriterRootTreeOPAL::set_run_number(
const int nr) {m_Irun=nr;}
int event_number() const
Get event number.
void write_event(const GenEvent &evt)
Write event evt to output target.
TTree * m_tree
Tree handler. Public to allow simple access, e.g. custom branches.
void write_event(const GenEvent &evt)
Write event to file.
Stores event-related information.
const std::vector< ConstGenParticlePtr > & particles() const
Get list of particles (const)
Feature< Feature_type > abs(const Feature< Feature_type > &input)
Obtain the absolute value of a Feature. This works as you'd expect. If foo is a valid Feature...