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///
13#include "HepMC3/GenEvent.h"
14#include "HepMC3/GenParticle.h"
16namespace HepMC3
17{
19{
20public:
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);
29private:
30 float m_Ebeam; ///< Beam energy in GEV
31 int m_Irun; ///< Run number
32 int m_Ievnt; ///< Event number
33};
34}
35#endif
Definition of struct GenEventData.
Definition of class GenEvent.
Definition of class GenParticle.
Definition of class WriterRootTree.
Stores event-related information.
Definition: GenEvent.h:41
GenEvent I/O output to files similar to these produced by OPAL software.
float m_Ebeam
Beam energy in GEV.
void set_run_number(const int nr)
Set run number.
void init_branches()
Init ROOT branches.
void write_event(const GenEvent &evt)
Write event.
GenEvent I/O serialization for root files based on root TTree.
HepMC3 main namespace.