EpIC 1.1.0
Monte Carlo generator for exclusive processes
Loading...
Searching...
No Matches
WriterModule.h
1/*
2 * RecordModule.h
3 *
4 * Created on: Feb 7, 2021
5 * Author: Pawel Sznajder (NCBJ)
6 */
7
8#ifndef MODULES_WRITER_WRITERMODULE_H_
9#define MODULES_WRITER_WRITERMODULE_H_
10
11#include <ElementaryUtils/parameters/Parameters.h>
12#include <string>
13#include <vector>
14
15#include "../../beans/physics/Event.h"
16#include "../EpicModuleObject.h"
17
18namespace EPIC {
19class GenerationInformation;
20} /* namespace EPIC */
21
22namespace EPIC {
23
32
33public:
34 static const std::string
36
37 static const std::string PARAMETER_NAME_PATH;
40
44 WriterModule(const std::string &className);
45
50
54 virtual ~WriterModule();
55
56 virtual void configure(const ElemUtils::Parameters &parameters);
57
58 virtual bool runTest() const;
59
63 virtual void open() = 0;
64
68 virtual void saveGenerationInformation(const GenerationInformation& generationInformation) = 0;
69
73 virtual void close() = 0;
74
78 virtual void write(const Event &event) = 0;
79
83 virtual void write(const std::vector<Event> &events) = 0;
84
85 //********************************************************
86 //*** SETTERS AND GETTERS ********************************
87 //********************************************************
88
92 const std::string &getPath() const;
93
97 void setPath(const std::string &path);
98
99protected:
100 virtual void initModule();
101 virtual void isModuleWellConfigured();
102
103 std::string m_path;
104};
105
106} /* namespace EPIC */
107
108#endif /* MODULES_WRITER_WRITERMODULE_H_ */
Testable version of PARTONS::ModuleObject.
Definition: EpicModuleObject.h:26
Single event.
Definition: Event.h:36
Container to store run related information.
Definition: GenerationInformation.h:25
Definition: WriterModule.h:31
static const std::string WRITER_MODULE_CLASS_NAME
Class name used in parsing XML.
Definition: WriterModule.h:35
virtual ~WriterModule()
WriterModule(const WriterModule &other)
void setPath(const std::string &path)
virtual void write(const Event &event)=0
static const std::string PARAMETER_NAME_PATH
Definition: WriterModule.h:37
virtual void write(const std::vector< Event > &events)=0
std::string m_path
Path to output file.
Definition: WriterModule.h:103
virtual void saveGenerationInformation(const GenerationInformation &generationInformation)=0
virtual void open()=0
virtual void close()=0
const std::string & getPath() const
virtual bool runTest() const
WriterModule(const std::string &className)