Belle II Software  release-05-02-19
HepmcOutputModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nikolai Hartmann *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 
15 #include <string>
16 
17 #include "HepMC/IO_GenEvent.h"
18 #include "HepMC/IO_HEPEVT.h"
19 
20 /* #include <generators/hepmc/HepMCReader.h> */
21 /* #include <generators/utilities/InitialParticleGeneration.h> */
22 
23 namespace Belle2 {
36  class HepMCOutputModule : public Module {
37 
38  public:
39 
45 
47  virtual ~HepMCOutputModule() {}
48 
50  virtual void initialize() override;
51 
53  virtual void event() override;
54 
56  virtual void terminate() override;
57 
58  protected:
59 
60  //Parameter
61  std::string m_filename;
64  //Variables
65  HepMC::IO_HEPEVT m_hepevtio;
66  std::unique_ptr<HepMC::IO_GenEvent> m_ascii_io;
69  };
70 
72 } // end namespace Belle2
Belle2::HepMCOutputModule::~HepMCOutputModule
virtual ~HepMCOutputModule()
Destructor.
Definition: HepmcOutputModule.h:55
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::HepMCOutputModule::m_filename
std::string m_filename
The output filename.
Definition: HepmcOutputModule.h:69
Belle2::HepMCOutputModule::m_hepevtio
HepMC::IO_HEPEVT m_hepevtio
wrapper/buffer for hepevt conversion.
Definition: HepmcOutputModule.h:73
Belle2::HepMCOutputModule::event
virtual void event() override
method is called for each event.
Definition: HepmcOutputModule.cc:45
Belle2::HepMCOutputModule::m_storeVirtualParticles
bool m_storeVirtualParticles
Flag which specifies if virtual particles are stored in the HEPEvt file.
Definition: HepmcOutputModule.h:70
Belle2::HepMCOutputModule::initialize
virtual void initialize() override
Initializes the module.
Definition: HepmcOutputModule.cc:39
Belle2::HepMCOutputModule::terminate
virtual void terminate() override
method is called at end
Definition: HepmcOutputModule.cc:113
Belle2::HepMCOutputModule::m_ascii_io
std::unique_ptr< HepMC::IO_GenEvent > m_ascii_io
The text file stream.
Definition: HepmcOutputModule.h:74
Belle2::HepMCOutputModule::HepMCOutputModule
HepMCOutputModule()
Constructor.
Definition: HepmcOutputModule.cc:30