HepMC3 event record library
WriterRootTreeOPAL.h
Go to the documentation of this file.
1 #ifndef HEPMC3_WRITERROOTTREEOPAL_H
2 #define HEPMC3_WRITERROOTTREEOPAL_H
3 ///
4 /// @file WriterRootTreeOPAL.h
5 /// @brief Definition of class \b WriterRootTreeOPAL
6 ///
7 /// @class HepMC3::WriterRootTreeOPAL
8 /// @brief GenEvent I/O output to files similar to these produced by OPAL software
9 ///
10 /// @ingroup Examples
11 ///
12 #include "HepMC3/WriterRootTree.h"
13 #include "HepMC3/GenEvent.h"
14 #include "HepMC3/GenParticle.h"
16 namespace HepMC3
17 {
19 {
20 public:
21  /** @brief Constructor */
22  WriterRootTreeOPAL(const std::string &filename,std::shared_ptr<GenRunInfo> run = std::shared_ptr<GenRunInfo>());
23  /** @brief Init ROOT branches */
24  void init_branches();
25  /** @brief Write event */
26  void write_event(const GenEvent &evt);
27  /** @brief Set run number */
28  void set_run_number(const int nr);
29 private:
30  float m_Ebeam; ///< Beam energy in GEV
31  int m_Irun; ///< Run number
32  int m_Ievnt; ///< Event number
33 };
34 }
35 #endif
GenEvent.h
Definition of class GenEvent.
HepMC3::WriterRootTreeOPAL::set_run_number
void set_run_number(const int nr)
Set run number.
Definition: WriterRootTreeOPAL.cc:28
HepMC3::GenEvent
Stores event-related information.
Definition: GenEvent.h:41
WriterRootTree.h
Definition of class WriterRootTree.
HepMC3
HepMC3 main namespace.
Definition: AnalysisExample.h:18
GenParticle.h
Definition of class GenParticle.
HepMC3::WriterRootTreeOPAL::m_Irun
int m_Irun
Run number.
Definition: WriterRootTreeOPAL.h:31
HepMC3::WriterRootTreeOPAL::init_branches
void init_branches()
Init ROOT branches.
Definition: WriterRootTreeOPAL.cc:8
HepMC3::WriterRootTreeOPAL::m_Ievnt
int m_Ievnt
Event number.
Definition: WriterRootTreeOPAL.h:32
HepMC3::WriterRootTreeOPAL
GenEvent I/O output to files similar to these produced by OPAL software.
Definition: WriterRootTreeOPAL.h:18
GenEventData.h
Definition of struct GenEventData.
HepMC3::WriterRootTreeOPAL::m_Ebeam
float m_Ebeam
Beam energy in GEV.
Definition: WriterRootTreeOPAL.h:30
HepMC3::WriterRootTree
GenEvent I/O serialization for root files based on root TTree.
Definition: WriterRootTree.h:38
HepMC3::WriterRootTreeOPAL::WriterRootTreeOPAL
WriterRootTreeOPAL(const std::string &filename, std::shared_ptr< GenRunInfo > run=std::shared_ptr< GenRunInfo >())
Constructor.
Definition: WriterRootTreeOPAL.cc:7
HepMC3::WriterRootTreeOPAL::write_event
void write_event(const GenEvent &evt)
Write event.
Definition: WriterRootTreeOPAL.cc:14