EpIC 1.1.0
Monte Carlo generator for exclusive processes
Loading...
Searching...
No Matches
WriterPythia6.h
1/*
2 * WriterPythia6.h
3 *
4 * Created on: Jun 06, 2022
5 * Author: Pawel Sznajder (NCBJ)
6 * Author: Alex Jentsch (BNL)
7 */
8
9#ifndef MODULES_WRITER_WRITERPYTHIA6_H_
10#define MODULES_WRITER_WRITERPYTHIA6_H_
11
12#include <ElementaryUtils/parameters/Parameters.h>
13#include <fstream>
14#include <locale>
15#include <string>
16#include <vector>
17
18#include "../../beans/physics/Event.h"
19#include "WriterModule.h"
20
21namespace EPIC {
22struct WriterPythia6NoSeparator;
23} /* namespace EPIC */
24
25namespace EPIC {
26
35
36public:
37
38 static const unsigned int classId;
40
44 WriterPythia6(const std::string &className);
45
50
54 virtual ~WriterPythia6();
55
56 virtual WriterPythia6 *clone() const;
57 virtual void configure(const ElemUtils::Parameters &parameters);
58
59 virtual void open();
61 const GenerationInformation& generationInformation);
62 virtual void close();
63 virtual void write(const Event &event);
64 virtual void write(const std::vector<Event> &events);
65
66 //********************************************************
67 //*** SETTERS AND GETTERS ********************************
68 //********************************************************
69
70private:
71
75 inline int getParticleCode(ParticleCodeType::Type type) const;
76
77 inline std::string trailSign(double v);
78
79 std::ofstream m_ofstream;
80 std::stringstream m_trailSign;
81 WriterPythia6NoSeparator* m_writerPythia6NoSeparator;
82};
83
91struct WriterPythia6NoSeparator: std::numpunct<char> {
92protected:
93 virtual string_type do_grouping() const {
94 return "\000";
95 }
96};
97
98} /* namespace EPIC */
99
100#endif /* MODULES_WRITER_WRITERPYTHIA6_H_ */
Single event.
Definition: Event.h:36
Container to store run related information.
Definition: GenerationInformation.h:25
Type
Definition: ParticleCodeType.h:33
Definition: WriterModule.h:31
Event writer to match PYTHIA 6 format.
Definition: WriterPythia6.h:34
virtual void write(const Event &event)
static const unsigned int classId
Definition: WriterPythia6.h:38
WriterPythia6(const WriterPythia6 &other)
virtual void saveGenerationInformation(const GenerationInformation &generationInformation)
virtual void write(const std::vector< Event > &events)
WriterPythia6(const std::string &className)
virtual void close()
virtual void open()
virtual ~WriterPythia6()
Structure to avoid comma separators.
Definition: WriterPythia6.h:91