HepMC3 event record library
WriterRootTreeOPAL.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2023 The HepMC collaboration (see AUTHORS for details)
5//
6#ifndef HEPMC3_WRITERROOTTREEOPAL_H
7#define HEPMC3_WRITERROOTTREEOPAL_H
8///
9/// @file WriterRootTreeOPAL.h
10/// @brief Definition of class \b WriterRootTreeOPAL
11///
12/// @class HepMC3::WriterRootTreeOPAL
13/// @brief GenEvent I/O output to files similar to these produced by OPAL software
14///
15/// @ingroup Examples
16///
18#include "HepMC3/GenEvent.h"
19#include "HepMC3/GenParticle.h"
21namespace HepMC3
22{
24{
25public:
26 /** @brief Constructor */
27 WriterRootTreeOPAL(const std::string &filename,std::shared_ptr<GenRunInfo> run = std::shared_ptr<GenRunInfo>());
28 /** @brief Init ROOT branches */
29 void init_branches();
30 /** @brief Write event */
31 void write_event(const GenEvent &evt);
32 /** @brief Set run number */
33 void set_run_number(const int nr);
34private:
35 float m_Ebeam; ///< Beam energy in GEV
36 int m_Irun; ///< Run number
37 int m_Ievnt; ///< Event number
38};
39}
40#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.