Belle II Software  release-08-01-10
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 
21 namespace Belle2 {
34  class HepMCOutputModule : public Module {
35 
36  public:
37 
43 
45  virtual ~HepMCOutputModule() {}
46 
48  virtual void initialize() override;
49 
51  virtual void event() override;
52 
54  virtual void terminate() override;
55 
56  protected:
57 
58  //Parameter
59  std::string m_filename;
62  //Variables
63  HepMC::IO_HEPEVT m_hepevtio;
64  std::unique_ptr<HepMC::IO_GenEvent> m_ascii_io;
67  };
68 
70 } // 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.