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.10.0
/* @license-end */
TXMLProblem.h
Go to the documentation of this file.
1 // 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 
56 typedef struct
57 {
58  int value;
59  std::string msg;
60 } UranieError;
61 
62 namespace URANIE
63 {
64 namespace DataServer
65 {
66 
67 class TXMLProblem: public TNamed
68 {
69 private:
70  Bool_t _blog;
71  Int_t _ndebuglevel;
72  Int_t _ntask;
75  vector<TBaseModel *> _vectorOfModels;
76  TList * _listOfToDo;
77 
78 protected:
79  //---------------------------------------------
83  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  void parseAndRunNodeLauncher(TXMLNode *);
110 
111  //---------------------------------------------
115  void parseAndRunNodeSampler(TXMLNode *);
118 
119  //---------------------------------------------
123  void parseAndRunNodeModeler(TXMLNode *);
126  virtual void parseAndRunNodeModelerANN(TXMLNode *, TBaseModel *);
128 
129  void addInfoTask(TString sname, TString stitle);
130 
131 public:
132  //---------------------------------------------
136  TXMLProblem();
139  TXMLProblem(TString filename, Bool_t blog = kFALSE);
141  virtual ~TXMLProblem();
143 
144  //---------------------------------------------
148  Int_t getLevelDebug()
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  Int_t parseFile(TString filename);
172 
173  //---------------------------------------------
177  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  }
199  void changeLog()
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
ROOT.
Definition: TAttribute.h:104
int value
Definition: TXMLProblem.h:58
void unsetLog()
Definition: TXMLProblem.h:195
virtual TString parseNodePatternSelected(TXMLNode *)
Parses the node "models/patterns/select".
Int_t _ntask
The iterator of the task to do.
Definition: TXMLProblem.h:72
vector< TBaseModel * > _vectorOfModels
The vector of Models.
Definition: TXMLProblem.h:75
Interface of the class URANIE::DataServer::TBaseModel.
Bool_t _blog
Log printing.
Definition: TXMLProblem.h:70
virtual ~TXMLProblem()
Default destructor.
void addInfoTask(TString sname, TString stitle)
Int_t parseFile(TString filename)
Reads the XML data.
virtual void terminate(Option_t *option="")
Ending phase of the code.
Description of the class TXMLProblem.
Definition: TXMLProblem.h:67
virtual void parseNodeDataField(TXMLNode *)
Parses the node "data/Variables/Variable".
virtual void parseNodePatterns(TXMLNode *, TBaseModel *)
Parses the node "models/model".
virtual void parseNodeModel(TXMLNode *, TBaseModel *)
Parses the node "models/model".
Bool_t getLog()
Definition: TXMLProblem.h:203
virtual void parseNodeModels(TXMLNode *)
Parses the node "models".
virtual void init(Option_t *option="")
Init phase of the code.
TList * _listOfToDo
Definition: TXMLProblem.h:76
Definition: TXMLProblem.h:56
virtual void parseAndRunNodeModelerANN(TXMLNode *, TBaseModel *)
Parses the node "models/model".
TDataServer * _tds
The Data Server.
Definition: TXMLProblem.h:73
virtual void parseNodeDataDictionary(TXMLNode *)
Parses the node "data".
void setLevelDebug(Int_t val)
Sets the debug level.
Definition: TXMLProblem.h:154
virtual void clean(Option_t *option="")
Cleans the working directory of the code.
void setLog()
Definition: TXMLProblem.h:191
void parseAndRunNodeLauncher(TXMLNode *)
Parses and runs the node "Launcher".
Description of the class TDataServer.
Definition: TDataServer.h:85
Interface of the class URANIE::DataServer::TDataServer.
Description of the class TBaseModel.
Definition: TBaseModel.h:56
virtual void parseNodeDataVariables(TXMLNode *)
Parses the node "data/Variables".
TDataServer * getDataServer()
Definition: TXMLProblem.h:159
TXMLProblem()
Default constructor.
TDataServer * _tdsdatafield
The Data Server.
Definition: TXMLProblem.h:74
void changeLog()
Definition: TXMLProblem.h:199
Int_t getLevelDebug()
Gets the debug level.
Definition: TXMLProblem.h:149
void parseAndRunNodeModeler(TXMLNode *)
Parses and runs the node "Launcher".
virtual void parseNodeModelerAlgorithm(TXMLNode *, TBaseModel *)
Parses the node "modeler/algorithm".
virtual void parseNodeHeader(TXMLNode *)
Parses the node "description".
void parseAndRunNodeSampler(TXMLNode *)
Parses and Runs the node "sampler".
virtual void run(Option_t *option="")
Running phase of the code.
std::string msg
Definition: TXMLProblem.h:59
Int_t _ndebuglevel
Level of debug.
Definition: TXMLProblem.h:71
virtual void printLog(Option_t *option="")