English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Launcher: TLauncherEnv.h Source File
Uranie / Launcher  v4.10.0
/* @license-end */
TLauncherEnv.h
Go to the documentation of this file.
1 /* --- Ansi C --- */
3 // Copyright (C) 2023 CEA/DEN
4 //
5 // This program is free software: you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public License
7 // as published by the Free Software Foundation, either version 3 of
8 // the License, or any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this program.
17 // if not, see <http://www.gnu.org/licenses/>.
19 
27 #ifndef __LAUNCHERENV__
28 #define __LAUNCHERENV__
29 
30 // ROOT
31 #include "Rtypes.h"
32 #include "TString.h"
33 #include "TNamed.h"
34 
35 // URANIE
36 #include "Launcher.h"
37 #include "TCode.h"
38 #include "UExceptions.h"
39 
40 
41 #include <iostream>
42 #include <fstream>
43 #include <iomanip>
44 
45 using std::cout;
46 using std::endl;
47 using std::cerr;
48 using std::setw;
49 
50 namespace URANIE {
51 namespace Launcher {
52 
53 class TLauncherEnv: public TNamed
54 {
55 protected:
57  TString _sdirectory;
59  Bool_t _blog;
60 
61 
67  bool cleanWorkingDirectory();
68 
69 public:
70  //---------------------------------------------
73  TLauncherEnv();
74  TLauncherEnv(TCode *code);
75  virtual ~TLauncherEnv();
76 
77  //---------------------------------------------
80  void setWorkingDirectory(TString str);
83 
87  {
88  return _sworkingDirectory;
89  }
90 
91  //---------------------------------------------
95  void setLog()
96  {
97  _blog = kTRUE;
98  }
99  void unsetLog()
100  {
101  _blog = kFALSE;
102  }
103  void changeLog()
104  {
105  _blog = _blog ? kFALSE : kTRUE;
106  }
107  Bool_t getLog()
108  {
109  return _blog;
110  }
112 
113  ClassDef(URANIE::Launcher::TLauncherEnv, ID_LAUNCHER)
114 
115 };
116 
117 }} // namespace
118 
119 #endif // __LAUNCHERENV__
Definition: TCluster.h:66
Definition: TLauncherEnv.h:53
TString _sworkingDirectory
The Working directory.
Definition: TLauncherEnv.h:58
bool cleanWorkingDirectory()
clean the working directory
TString getWorkingDirectory()
Gets the working directory.
Definition: TLauncherEnv.h:86
TCode * _code
Definition: TLauncherEnv.h:56
void verifyWorkingDirectory()
choose the working directory
void unsetLog()
Definition: TLauncherEnv.h:99
Interface of the class URANIE::Launcher::TCode.
void setWorkingDirectory(TString str)
set the working directory
void createResultsDirectory()
Builts Results directory, no available options.
Bool_t _blog
Boolean to edit the log.
Definition: TLauncherEnv.h:59
void setLog()
Definition: TLauncherEnv.h:95
TString _sdirectory
Current directory.
Definition: TLauncherEnv.h:57
Description of the class TCode.
Definition: TCode.h:48
void changeLog()
Definition: TLauncherEnv.h:103
Bool_t getLog()
Definition: TLauncherEnv.h:107