EpIC 1.1.0
Monte Carlo generator for exclusive processes
Loading...
Searching...
No Matches
MonteCarloParser.h
1/*
2 * MonteCarloParser.h
3 *
4 * Created on: Feb 12, 2021
5 * Author: Pawel Sznajder (NCBJ)
6 */
7
8#ifndef AUTOMATION_MONTECARLOPARSER_H_
9#define AUTOMATION_MONTECARLOPARSER_H_
10
11#include <ElementaryUtils/parameters/Parameters.h>
12#include <ElementaryUtils/parser/XMLParser.h>
13#include <memory>
14#include <partons/beans/automation/BaseObjectData.h>
15#include <string>
16#include <vector>
17
18namespace EPIC {
19class MonteCarloScenario;
20} /* namespace EPIC */
21
22namespace EPIC {
23
24class MonteCarloParser : public ElemUtils::XMLParser,
25 public PARTONS::BaseObject {
26
27public:
28 static const std::string SCENARIO_NODE_NAME;
29 static const std::string SCENARIO_ATTRIBUTE_DESCRIPTION_NAME;
33 static const std::string
35
36 static const std::string TASK_NODE_NAME;
37 static const std::string
39 static const std::string
41
42 static const std::string GENERAL_CONFIGURATION_NODE_NAME;
46 static const std::string KINEMATIC_RANGE_NODE_NAME;
49 static const std::string EXPERIMENTAL_CONDIDTIONS_NODE_NAME;
55 static const std::string
58 static const std::string GENERATOR_CONFIGURATION_NODE_NAME;
63 static const std::string KINEMATIC_CONFIGURATION_NODE_NAME;
68 static const std::string RC_CONFIGURATION_NODE_NAME;
73 static const std::string WRITER_CONFIGURATION_NODE_NAME;
77
78 static const std::string PARAM_NODE_NAME;
79 static const std::string
81 static const std::string
83
84 static const std::string MODULE_NODE_NAME;
85 static const std::string
87 static const std::string
89
94
99
104
105 virtual std::string toString() const;
106
107 virtual void startElement(const std::string &elementName,
108 ElemUtils::Parameters attributes,
109 const std::string &elementData);
110 virtual void emptyStartElement(const std::string &elementName,
111 ElemUtils::Parameters attributes);
112 virtual void endElement(const std::string &elementName);
113
117 std::shared_ptr<MonteCarloScenario> parseScenario(const std::string &xmlFile);
118
119private:
120 std::shared_ptr<MonteCarloScenario> m_pScenario;
121
122 std::string m_description;
123 std::string m_date;
124
125 std::string m_serviceName;
126 std::string m_methodName;
127
128 PARTONS::BaseObjectData m_generalConfiguration;
129 PARTONS::BaseObjectData m_kinematicRange;
130 PARTONS::BaseObjectData m_experimentalConditions;
131 PARTONS::BaseObjectData m_computationConfiguration;
132 PARTONS::BaseObjectData m_generatorConfiguration;
133 PARTONS::BaseObjectData m_kinematicConfiguration;
134 PARTONS::BaseObjectData m_rcConfiguration;
135 PARTONS::BaseObjectData m_writerConfiguration;
136
137 std::vector<PARTONS::BaseObjectData *> m_currentModuleHierarchy;
138
139 bool m_isNew;
140};
141
142} /* namespace EPIC */
143
144#endif /* AUTOMATION_MONTECARLOPARSER_H_ */
Definition: MonteCarloParser.h:25
static const std::string KINEMATIC_CONFIGURATION_NODE_NAME
Definition: MonteCarloParser.h:63
static const std::string SCENARIO_ATTRIBUTE_DESCRIPTION_NAME
Definition: MonteCarloParser.h:29
static const std::string GENERAL_CONFIGURATION_NODE_NAME
Definition: MonteCarloParser.h:42
static const std::string PARAM_NODE_NAME
Parameter node name.
Definition: MonteCarloParser.h:78
static const std::string COMPUTATION_CONFIGURATION_NODE_NAME
Definition: MonteCarloParser.h:56
static const std::string SCENARIO_NODE_NAME
Scenario node name.
Definition: MonteCarloParser.h:28
static const std::string PARAM_ATTRIBUTE_VALUE_NAME
Parameter attribute value name.
Definition: MonteCarloParser.h:82
static const std::string GENERATOR_CONFIGURATION_NODE_NAME
Definition: MonteCarloParser.h:58
MonteCarloParser(const MonteCarloParser &other)
static const std::string MODULE_NAME_ATTRIBUT_NAME
Module attribute name name.
Definition: MonteCarloParser.h:88
static const std::string TASK_NODE_NAME
Task node name.
Definition: MonteCarloParser.h:36
static const std::string KINEMATIC_RANGE_NODE_NAME
Definition: MonteCarloParser.h:46
static const std::string TASK_ATRIBUTE_SERVICE_NAME
Task attribute service name.
Definition: MonteCarloParser.h:38
static const std::string TASK_ATRIBUTE_METHOD_NAME
Task attribute method name.
Definition: MonteCarloParser.h:40
static const std::string MODULE_TYPE_ATTRIBUT_NAME
Module attribute type name.
Definition: MonteCarloParser.h:86
static const std::string SCENARIO_ATTRIBUTE_DATE_NAME
Scenario attribute date name.
Definition: MonteCarloParser.h:34
static const std::string EXPERIMENTAL_CONDIDTIONS_NODE_NAME
kinematic range.
Definition: MonteCarloParser.h:49
static const std::string PARAM_ATTRIBUTE_NAME_NAME
Parameter attribute name name.
Definition: MonteCarloParser.h:80
std::shared_ptr< MonteCarloScenario > parseScenario(const std::string &xmlFile)
static const std::string WRITER_CONFIGURATION_NODE_NAME
Definition: MonteCarloParser.h:73
static const std::string RC_CONFIGURATION_NODE_NAME
Definition: MonteCarloParser.h:68
static const std::string MODULE_NODE_NAME
Module node name.
Definition: MonteCarloParser.h:84