Belle II Software  release-08-01-10
HepevtOutputModule.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 <fstream>
14 #include <string>
15 
16 namespace Belle2 {
29  class HepevtOutputModule : public Module {
30 
31  public:
32 
38 
40  virtual ~HepevtOutputModule() {}
41 
43  virtual void initialize() override;
44 
46  virtual void event() override;
47 
49  virtual void terminate() override;
50 
51 
52  protected:
53 
54  //Parameter
55  std::string m_filename;
56  bool m_mirrorPz;
58  bool m_fullFormat;
60  //Variables
61  std::ofstream m_fileStream;
63  };
64 
66 } // end namespace Belle2
67 
68 
The HepevtOutput module.
bool m_mirrorPz
If the directions of HER and LER are switched, mirror Pz.
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
Terminates the module.
bool m_fullFormat
Flag which specifies if the full HepEvt format should be written (true), or a compact format (false).
virtual ~HepevtOutputModule()
Destructor.
std::ofstream m_fileStream
The text file stream.
std::string m_filename
The output filename.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.