Version: SMASH-2.2
hepmcoutput.h
Go to the documentation of this file.
1 
2 /*
3  *
4  * Copyright (c) 2014-2022
5  * SMASH Team
6  *
7  * GNU General Public License (GPLv3 or later)
8  *
9  */
10 
11 #ifndef SRC_INCLUDE_SMASH_HEPMCOUTPUT_H_
12 #define SRC_INCLUDE_SMASH_HEPMCOUTPUT_H_
13 
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 #include <boost/filesystem.hpp>
19 #include "HepMC3/Writer.h"
20 #include "hepmcinterface.h"
21 
22 namespace smash {
23 
36 class HepMcOutput : public HepMcInterface {
37  public:
47  HepMcOutput(const bf::path &path, std::string name, const bool full_event,
48  std::string HepMC3_output_type);
49 
51  ~HepMcOutput();
60  void at_eventend(const Particles &particles, const int32_t event_number,
61  const EventInfo &event) override;
62 
63  private:
65  const bf::path filename_;
69  std::unique_ptr<HepMC3::Writer> output_file_;
74 };
75 
76 } // namespace smash
77 
78 #endif // SRC_INCLUDE_SMASH_HEPMCOUTPUT_H_
Base class for output handlers that need the HepMC3 structure.
SMASH output to HepMC file.
Definition: hepmcoutput.h:36
void at_eventend(const Particles &particles, const int32_t event_number, const EventInfo &event) override
Add the final particles information of an event to the central vertex.
Definition: hepmcoutput.cc:187
enum smash::HepMcOutput::enum_output type_of_HepMC3_output
enum to identify the HepMC3 output type
enum_output
enum to identify the HepMC3 output type
Definition: hepmcoutput.h:71
const bf::path filename_
Filename of output.
Definition: hepmcoutput.h:65
bf::path filename_unfinished_
Filename of output as long as simulation is still running.
Definition: hepmcoutput.h:67
~HepMcOutput()
Destructor renames file.
Definition: hepmcoutput.cc:180
HepMcOutput(const bf::path &path, std::string name, const bool full_event, std::string HepMC3_output_type)
Create HepMC particle output.
Definition: hepmcoutput.cc:160
type_of_HepMC3_output output_type_
HepMC3 output type.
Definition: hepmcoutput.h:73
std::unique_ptr< HepMC3::Writer > output_file_
Pointers to the base class of HepMC3 output files.
Definition: hepmcoutput.h:69
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
Definition: action.h:24
Structure to contain custom data for output.