Version: SMASH-2.1
hepmcoutput.h
Go to the documentation of this file.
1 
2 /*
3  *
4  * Copyright (c) 2014-2021
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 <HepMC3/WriterAscii.h>
15 #include <memory>
16 #include <string>
17 
18 #include <boost/filesystem.hpp>
19 #include "hepmcinterface.h"
20 
21 namespace smash {
22 
34 class HepMcOutput : public HepMcInterface {
35  public:
44  HepMcOutput(const bf::path &path, std::string name, const bool full_event);
45 
47  ~HepMcOutput();
56  void at_eventend(const Particles &particles, const int32_t event_number,
57  const EventInfo &event) override;
58 
59  private:
61  const bf::path filename_;
65  std::unique_ptr<HepMC3::WriterAscii> output_file_;
66 };
67 
68 } // namespace smash
69 
70 #endif // SRC_INCLUDE_SMASH_HEPMCOUTPUT_H_
Base class for output handlers that need the HepMC3 structure.
SMASH output to HepMC file.
Definition: hepmcoutput.h:34
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:84
HepMcOutput(const bf::path &path, std::string name, const bool full_event)
Create HepMC particle output.
Definition: hepmcoutput.cc:70
const bf::path filename_
Filename of output.
Definition: hepmcoutput.h:61
bf::path filename_unfinished_
Filename of output as long as simulation is still running.
Definition: hepmcoutput.h:63
~HepMcOutput()
Destructor renames file.
Definition: hepmcoutput.cc:78
std::unique_ptr< HepMC3::WriterAscii > output_file_
Pointer to Ascii HepMC3 output file.
Definition: hepmcoutput.h:65
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.