HepMC3 event record library
examples
ConvertExample
include
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
///
17
#include "
HepMC3/WriterRootTree.h
"
18
#include "
HepMC3/GenEvent.h
"
19
#include "
HepMC3/GenParticle.h
"
20
#include "
HepMC3/Data/GenEventData.h
"
21
namespace
HepMC3
22
{
23
class
WriterRootTreeOPAL
:
public
WriterRootTree
24
{
25
public
:
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);
34
private
:
35
float
m_Ebeam
;
///< Beam energy in GEV
36
int
m_Irun
;
///< Run number
37
int
m_Ievnt
;
///< Event number
38
};
39
}
40
#endif
GenEventData.h
Definition of struct GenEventData.
GenEvent.h
Definition of class GenEvent.
GenParticle.h
Definition of class GenParticle.
WriterRootTree.h
Definition of class WriterRootTree.
HepMC3::GenEvent
Stores event-related information.
Definition
GenEvent.h:41
HepMC3::WriterRootTreeOPAL
GenEvent I/O output to files similar to these produced by OPAL software.
Definition
WriterRootTreeOPAL.h:24
HepMC3::WriterRootTreeOPAL::m_Irun
int m_Irun
Run number.
Definition
WriterRootTreeOPAL.h:36
HepMC3::WriterRootTreeOPAL::m_Ebeam
float m_Ebeam
Beam energy in GEV.
Definition
WriterRootTreeOPAL.h:35
HepMC3::WriterRootTreeOPAL::set_run_number
void set_run_number(const int nr)
Set run number.
Definition
WriterRootTreeOPAL.cc:32
HepMC3::WriterRootTreeOPAL::init_branches
void init_branches()
Init ROOT branches.
Definition
WriterRootTreeOPAL.cc:11
HepMC3::WriterRootTreeOPAL::WriterRootTreeOPAL
WriterRootTreeOPAL(const std::string &filename, std::shared_ptr< GenRunInfo > run=std::shared_ptr< GenRunInfo >())
Constructor.
Definition
WriterRootTreeOPAL.cc:10
HepMC3::WriterRootTreeOPAL::write_event
void write_event(const GenEvent &evt)
Write event.
Definition
WriterRootTreeOPAL.cc:17
HepMC3::WriterRootTreeOPAL::m_Ievnt
int m_Ievnt
Event number.
Definition
WriterRootTreeOPAL.h:37
HepMC3::WriterRootTree
GenEvent I/O serialization for root files based on root TTree.
Definition
WriterRootTree.h:41
HepMC3
HepMC3 main namespace.
Definition
AnalysisExample.h:24
Generated on Sun Nov 10 2024 14:00:33 for HepMC3 event record library by
1.12.0