English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / XmlProblem: TXMLProblem.h Source File
Uranie / XmlProblem 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 TXMLPROBLEM_H
45#define TXMLPROBLEM_H
46// ROOT
47#include <TXMLNode.h>
48
49#include "XMLProblem.h"
50#include "TDataServer.h"
51#include "TBaseModel.h"
52
53//STL
54#include <vector>
55
56//typedef struct {
57// int value;
58// std::string msg;
59//} UranieError;
60
61namespace URANIE
62{
63namespace XMLProblem
64{
65
66class TXMLProblem: public TNamed
67{
68private:
69 Bool_t _blog;
71 Int_t _ntask;
72 URANIE::DataServer::TDataServer* _tds;
73 URANIE::DataServer::TDataServer* _tdsdatafield;
74 vector<TBaseModel *> _vectorOfModels;
75 TList * _listOfToDo;
76
77protected:
78 //---------------------------------------------
82
83 virtual void parseNodeHeader(TXMLNode *);
85 virtual void parseNodeDataDictionary(TXMLNode *);
87 virtual void parseNodeDataField(TXMLNode *);
89 virtual void parseNodePatterns(TXMLNode *, TBaseModel *);
91 virtual TString parseNodePatternSelected(TXMLNode *);
93 virtual void parseNodeModelerAlgorithm(TXMLNode *, TBaseModel *);
95
96 //---------------------------------------------
100
101 void parseAndRunNodeLauncher(TXMLNode *);
103
104 //---------------------------------------------
108
109 void parseAndRunNodeSampler(TXMLNode *);
111
112 //---------------------------------------------
116
117 void parseAndRunNodeModeler(TXMLNode *);
118#ifdef WITH_OPT
120 virtual void parseAndRunNodeModelerANN(TXMLNode *, TBaseModel *);
121#endif
124 TBaseModel *);
126
127public:
128 //---------------------------------------------
132
135 TXMLProblem(TString filename, Bool_t blog = kFALSE);
137 virtual ~TXMLProblem();
139
140 //---------------------------------------------
144
146 {
147 return _ndebuglevel;
148 }
150 void setLevelDebug(Int_t val)
151 {
152 _ndebuglevel = val;
153 }
154 // Gets the dataserver
155 URANIE::DataServer::TDataServer* getDataServer()
156 {
157 return _tds;
158 }
160
161 //---------------------------------------------
165
166 Int_t parseFile(TString filename);
168
169 //---------------------------------------------
173
174 virtual void init(Option_t *option = "");
176 virtual void run(Option_t *option = "");
178 virtual void terminate(Option_t *option = "");
180 virtual void clean(Option_t *option = "");
186 void addInfoTask(TString sname, TString stitle);
188
189 //---------------------------------------------
193 void setLog()
194 {
195 _blog = kTRUE;
196 }
197 void unsetLog()
198 {
199 _blog = kFALSE;
200 }
202 {
203 _blog = _blog ? kFALSE : kTRUE;
204 }
205 Bool_t getLog()
206 {
207 return _blog;
208 }
209 virtual void printLog(Option_t *option = "");
211
212 ClassDef(URANIE::XMLProblem::TXMLProblem, ID_XMLPROBLEM)
213 //Classe de
214};
215
216} // Fin du namespace XMLProblem
217} // Fin du namespace URANIE
218#endif
Interface of the class URANIE::XMLProblem::TBaseModel.
Description of the class TBaseModel.
Definition TBaseModel.h:61
Description of the class TXMLProblem.
Definition TXMLProblem.h:67
virtual void parseNodeDataDictionary(TXMLNode *)
Parses the node "DataDictionary".
Int_t _ndebuglevel
Level of debug.
Definition TXMLProblem.h:70
Bool_t _blog
Log Printing.
Definition TXMLProblem.h:69
Int_t parseFile(TString filename)
Reads XML data.
virtual void terminate(Option_t *option="")
Terminates phase of the code.
TXMLProblem(TString filename, Bool_t blog=kFALSE)
constructor with the XML File
virtual void run(Option_t *option="")
Runs phase of the code.
TList * _listOfToDo
Definition TXMLProblem.h:75
virtual void parseNodeModelerAlgorithm(TXMLNode *, TBaseModel *)
Parses the node "modeler/algorithm".
URANIE::DataServer::TDataServer * _tds
The Data Server.
Definition TXMLProblem.h:72
virtual void init(Option_t *option="")
Initial phase of the code.
URANIE::DataServer::TDataServer * _tdsdatafield
The Data Server.
Definition TXMLProblem.h:73
void addInfoTask(TString sname, TString stitle)
add Informations the the Task List to do
virtual void parseNodePatterns(TXMLNode *, TBaseModel *)
Parses the node "models/model".
virtual void parseNodeDataField(TXMLNode *)
Parses the node "DataDictionary/DataField".
virtual TString parseNodePatternSelected(TXMLNode *)
Parses the node "models/patterns/select".
void setLevelDebug(Int_t val)
Sets the debug level.
Definition TXMLProblem.h:150
virtual void clean(Option_t *option="")
Cleans the working directory of the code.
void parseAndRunNodeModeler(TXMLNode *)
Parse and run the node "Modeler".
void unsetLog()
Definition TXMLProblem.h:197
Int_t getLevelDebug()
Gets the debug level.
Definition TXMLProblem.h:145
void parseAndRunNodeLauncher(TXMLNode *)
Parses and runs the node "Launcher".
virtual void printLog(Option_t *option="")
virtual void parseAndRunNodeModelerLinearRegression(TXMLNode *, TBaseModel *)
Parse the node "Modeler/LinearRegression".
Bool_t getLog()
Definition TXMLProblem.h:205
TXMLProblem()
Default constructor.
virtual ~TXMLProblem()
Default destructor.
Int_t _ntask
The iterator of the task to do.
Definition TXMLProblem.h:71
void changeLog()
Definition TXMLProblem.h:201
void parseAndRunNodeSampler(TXMLNode *)
Parses and Runs the node "sampler".
URANIE::DataServer::TDataServer * getDataServer()
Definition TXMLProblem.h:155
void setLog()
Definition TXMLProblem.h:193
virtual void parseNodeHeader(TXMLNode *)
Parses the node "description".
vector< TBaseModel * > _vectorOfModels
The vector of Models.
Definition TXMLProblem.h:74
Definition TBaseModel.h:57