Belle II Software development
HepmcOutputModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/core/Module.h>
12
13#include <string>
14
15#include "HepMC/IO_GenEvent.h"
16#include "HepMC/IO_HEPEVT.h"
17
18/* #include <generators/hepmc/HepMCReader.h> */
19/* #include <generators/utilities/InitialParticleGeneration.h> */
20
21namespace Belle2 {
31 class HepMCOutputModule : public Module {
32
33 public:
34
40
42 virtual ~HepMCOutputModule() {}
43
45 virtual void initialize() override;
46
48 virtual void event() override;
49
51 virtual void terminate() override;
52
53 protected:
54
55 //Parameter
56 std::string m_filename;
59 //Variables
60 HepMC::IO_HEPEVT m_hepevtio;
61 std::unique_ptr<HepMC::IO_GenEvent> m_ascii_io;
64 };
65
67} // end namespace Belle2
The HepMCOutput module.
std::unique_ptr< HepMC::IO_GenEvent > m_ascii_io
The text file stream.
virtual void initialize() override
Initializes the module.
bool m_storeVirtualParticles
Flag which specifies if virtual particles are stored in the HEPEvt file.
virtual void event() override
method is called for each event.
virtual void terminate() override
method is called at end
virtual ~HepMCOutputModule()
Destructor.
std::string m_filename
The output filename.
HepMC::IO_HEPEVT m_hepevtio
wrapper/buffer for hepevt conversion.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.