English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TXMLProblem.h Source File
Uranie / DataServer v4.9.0
/* @license-end */
TXMLProblem.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2024 CEA/DES
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as published
6// by the Free Software Foundation, either version 3 of the License, or any
7// later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
18// $Id$
19// $Author$
20// $Date$
21// $Revision$
22// $State$
24
44#ifndef CLASSNAME_H
45#define CLASSNAME_H
46// ROOT
47#include <TXMLNode.h>
48
49#include "DataServer.h"
50#include "TDataServer.h"
51#include "TBaseModel.h"
52
53//STL
54#include <vector>
55
56typedef struct
57{
58 int value;
59 std::string msg;
61
62namespace URANIE
63{
64namespace DataServer
65{
66
67class TXMLProblem: public TNamed
68{
69private:
70 Bool_t _blog;
72 Int_t _ntask;
75 vector<TBaseModel *> _vectorOfModels;
76 TList * _listOfToDo;
77
78protected:
79 //---------------------------------------------
83
84 virtual void parseNodeHeader(TXMLNode *);
86 virtual void parseNodeDataDictionary(TXMLNode *);
88 virtual void parseNodeDataVariables(TXMLNode *);
90 virtual void parseNodeDataField(TXMLNode *);
92 virtual void parseNodeModels(TXMLNode *);
94 virtual void parseNodePatterns(TXMLNode *, TBaseModel *);
96 virtual void parseNodeModelerAlgorithm(TXMLNode *, TBaseModel *);
98 virtual TString parseNodePatternSelected(TXMLNode *);
100 virtual void parseNodeModel(TXMLNode *, TBaseModel *);
102
103 //---------------------------------------------
107
108 void parseAndRunNodeLauncher(TXMLNode *);
110
111 //---------------------------------------------
115
116 void parseAndRunNodeSampler(TXMLNode *);
118
119 //---------------------------------------------
123
124 void parseAndRunNodeModeler(TXMLNode *);
126 virtual void parseAndRunNodeModelerANN(TXMLNode *, TBaseModel *);
128
129 void addInfoTask(TString sname, TString stitle);
130
131public:
132 //---------------------------------------------
136
139 TXMLProblem(TString filename, Bool_t blog = kFALSE);
141 virtual ~TXMLProblem();
143
144 //---------------------------------------------
148
150 {
151 return _ndebuglevel;
152 }
154 void setLevelDebug(Int_t val)
155 {
156 _ndebuglevel = val;
157 }
158 // Gets the dataserver
160 {
161 return _tds;
162 }
164
165 //---------------------------------------------
169
170 Int_t parseFile(TString filename);
172
173 //---------------------------------------------
177
178 virtual void init(Option_t *option = "");
180 virtual void run(Option_t *option = "");
182 virtual void terminate(Option_t *option = "");
184 virtual void clean(Option_t *option = "");
186
187 //---------------------------------------------
191 void setLog()
192 {
193 _blog = kTRUE;
194 }
195 void unsetLog()
196 {
197 _blog = kFALSE;
198 }
200 {
201 _blog = _blog ? kFALSE : kTRUE;
202 }
203 Bool_t getLog()
204 {
205 return _blog;
206 }
207 virtual void printLog(Option_t *option = "");
209
210 ClassDef(URANIE::DataServer::TXMLProblem, ID_DATASERVER)
211 //Classe de
212};
213
214} // Fin du namespace DataServer
215} // Fin du namespace URANIE
216#endif
Interface of the class URANIE::DataServer::TBaseModel.
Interface of the class URANIE::DataServer::TDataServer.
Description of the class TBaseModel.
Definition TBaseModel.h:57
Description of the class TDataServer.
Definition TDataServer.h:86
Description of the class TXMLProblem.
Definition TXMLProblem.h:68
virtual void parseNodePatterns(TXMLNode *, TBaseModel *)
Parses the node "models/model".
virtual void run(Option_t *option="")
Running phase of the code.
void unsetLog()
Definition TXMLProblem.h:195
virtual void printLog(Option_t *option="")
virtual void parseNodeDataDictionary(TXMLNode *)
Parses the node "data".
Int_t getLevelDebug()
Gets the debug level.
Definition TXMLProblem.h:149
virtual void parseNodeModels(TXMLNode *)
Parses the node "models".
void setLog()
Definition TXMLProblem.h:191
TDataServer * _tdsdatafield
The Data Server.
Definition TXMLProblem.h:74
virtual void clean(Option_t *option="")
Cleans the working directory of the code.
virtual void parseNodeModel(TXMLNode *, TBaseModel *)
Parses the node "models/model".
void parseAndRunNodeModeler(TXMLNode *)
Parses and runs the node "Launcher".
void parseAndRunNodeLauncher(TXMLNode *)
Parses and runs the node "Launcher".
virtual void init(Option_t *option="")
Init phase of the code.
TList * _listOfToDo
Definition TXMLProblem.h:76
virtual ~TXMLProblem()
Default destructor.
TDataServer * getDataServer()
Definition TXMLProblem.h:159
void changeLog()
Definition TXMLProblem.h:199
virtual void terminate(Option_t *option="")
Ending phase of the code.
virtual void parseNodeHeader(TXMLNode *)
Parses the node "description".
TXMLProblem()
Default constructor.
virtual void parseNodeModelerAlgorithm(TXMLNode *, TBaseModel *)
Parses the node "modeler/algorithm".
virtual TString parseNodePatternSelected(TXMLNode *)
Parses the node "models/patterns/select".
TDataServer * _tds
The Data Server.
Definition TXMLProblem.h:73
void parseAndRunNodeSampler(TXMLNode *)
Parses and Runs the node "sampler".
Bool_t getLog()
Definition TXMLProblem.h:203
Bool_t _blog
Log printing.
Definition TXMLProblem.h:70
virtual void parseAndRunNodeModelerANN(TXMLNode *, TBaseModel *)
Parses the node "models/model".
TXMLProblem(TString filename, Bool_t blog=kFALSE)
constructor with the XML File
Int_t parseFile(TString filename)
Reads the XML data.
vector< TBaseModel * > _vectorOfModels
The vector of Models.
Definition TXMLProblem.h:75
void setLevelDebug(Int_t val)
Sets the debug level.
Definition TXMLProblem.h:154
void addInfoTask(TString sname, TString stitle)
virtual void parseNodeDataVariables(TXMLNode *)
Parses the node "data/Variables".
Int_t _ntask
The iterator of the task to do.
Definition TXMLProblem.h:72
Int_t _ndebuglevel
Level of debug.
Definition TXMLProblem.h:71
virtual void parseNodeDataField(TXMLNode *)
Parses the node "data/Variables/Variable".
ROOT.
Definition TAttribute.h:106
Definition TXMLProblem.h:57
std::string msg
Definition TXMLProblem.h:59
int value
Definition TXMLProblem.h:58