Version: SMASH-2.0.2
hepmcoutput.h
Go to the documentation of this file.
1 
2 /*
3  *
4  * Copyright (c) 2014-2020
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:
46  HepMcOutput(const bf::path &path, std::string name, const bool full_event,
47  const int total_N, const int proj_N);
48 
50  ~HepMcOutput();
59  void at_eventend(const Particles &particles, const int32_t event_number,
60  const EventInfo &event) override;
61 
62  private:
64  const bf::path filename_;
68  std::unique_ptr<HepMC3::WriterAscii> output_file_;
69 };
70 
71 } // namespace smash
72 
73 #endif // SRC_INCLUDE_SMASH_HEPMCOUTPUT_H_
smash
Definition: action.h:24
hepmcinterface.h
smash::HepMcOutput::filename_unfinished_
bf::path filename_unfinished_
Filename of output as long as simulation is still running.
Definition: hepmcoutput.h:66
smash::HepMcOutput
SMASH output to HepMC file.
Definition: hepmcoutput.h:34
smash::EventInfo
Structure to contain custom data for output.
Definition: outputinterface.h:36
smash::HepMcOutput::output_file_
std::unique_ptr< HepMC3::WriterAscii > output_file_
Pointer to Ascii HepMC3 output file.
Definition: hepmcoutput.h:68
smash::HepMcOutput::~HepMcOutput
~HepMcOutput()
Destructor renames file.
Definition: hepmcoutput.cc:80
smash::HepMcOutput::HepMcOutput
HepMcOutput(const bf::path &path, std::string name, const bool full_event, const int total_N, const int proj_N)
Create HepMC particle output.
Definition: hepmcoutput.cc:70
smash::HepMcInterface
Base class for output handlers that need the HepMC3 structure.
Definition: hepmcinterface.h:81
smash::Particles
Definition: particles.h:33
smash::HepMcOutput::at_eventend
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:86
smash::HepMcOutput::filename_
const bf::path filename_
Filename of output.
Definition: hepmcoutput.h:64