English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TShareRun.h Source File
Uranie / ReLauncher  v4.10.0
/* @license-end */
TShareRun.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 by
6 // 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 1.4 $
22 // $State$
24 
32 #ifndef __SHARE_RUN__
33 #define __SHARE_RUN__
34 
35 //ROOT
36 #include "Rtypes.h"
37 
38 // Uranie
39 #include "TRun.h"
40 #include "TEval.h"
41 
42 #include <queue>
43 
44 namespace URANIE
45 {
46 namespace Relauncher
47 {
48 
49 
50 #define SINGL 11
51 #define GRAD 12
52 #define UENTR 13
53 
54 struct element
55 {
56  long id, calcnb;
57  vector<URANIE::DataServer::UEntry*> *inv, *outv;
58 };
59 struct relement
60 {
61  long id;
62  int stat;
63 };
64 
65 class TShareRun: public TRun
66 {
67 protected:
69 
70 public:
71  TShareRun(TEval *fun);
72  virtual ~TShareRun();
73 
74  virtual TEval *getEval()
75  {
76  return _fun;
77  }
78  virtual void put(long, vector<URANIE::DataServer::UEntry*> *in, vector<URANIE::DataServer::UEntry*> *out, int icalc)=0;
79 
80  ClassDef(URANIE::Relauncher::TShareRun, ID_RELAUNCHER)
81 };
82 
83 class TSimpleRun: public TShareRun
84 {
85 protected:
86 
87  std::queue<struct element> _qin;
88 
89 
90 public:
91  TSimpleRun(TEval *fun);
92  virtual ~TSimpleRun();
93 
94  virtual Bool_t onMaster(void);
95 
96  virtual void put(long, vector<URANIE::DataServer::UEntry*> *in, vector<URANIE::DataServer::UEntry*> *out, int icalc=0);
97 
98  virtual Bool_t readyToGet();
99 
100  ClassDef(URANIE::Relauncher::TSimpleRun, ID_RELAUNCHER)
101 };
102 
103 class TDecoratorRun: public TRun
104 {
105 protected:
107 
108 public:
109  TDecoratorRun(TRun *run);
110  virtual ~TDecoratorRun();
111 
112  virtual TEval *getEval();
113  virtual void startSlave();
114  virtual Bool_t onMaster();
115  virtual void stopSlave();
116 
117  ClassDef(URANIE::Relauncher::TDecoratorRun, ID_RELAUNCHER)
118 };
119 
120 }
121 } //namespace
122 
123 #endif
Definition: TBaseEval.cxx:44
virtual ~TShareRun()
Definition: TShareRun.cxx:55
long calcnb
Definition: TShareRun.h:56
std::queue< struct element > _qin
Definition: TShareRun.h:87
virtual Bool_t onMaster()
Definition: TShareRun.cxx:108
virtual TEval * getEval()
Definition: TShareRun.h:74
long id
Definition: TShareRun.h:56
Definition: TShareRun.h:83
vector< URANIE::DataServer::UEntry * > * inv
Definition: TShareRun.h:57
virtual void startSlave()
Definition: TShareRun.cxx:103
Definition: TRun.h:49
int stat
Definition: TShareRun.h:62
long id
Definition: TShareRun.h:61
virtual void put(long, vector< URANIE::DataServer::UEntry *> *in, vector< URANIE::DataServer::UEntry *> *out, int icalc=0)
Definition: TShareRun.cxx:74
virtual void stopSlave()
Definition: TShareRun.cxx:113
TSimpleRun(TEval *fun)
Definition: TShareRun.cxx:60
vector< URANIE::DataServer::UEntry * > * outv
Definition: TShareRun.h:57
virtual Bool_t readyToGet()
Definition: TShareRun.cxx:82
TShareRun(TEval *fun)
Definition: TShareRun.cxx:44
TDecoratorRun(TRun *run)
Definition: TShareRun.cxx:89
Definition: TShareRun.h:103
virtual TEval * getEval()
Definition: TShareRun.cxx:98
virtual ~TDecoratorRun()
Definition: TShareRun.cxx:94
virtual void put(long, vector< URANIE::DataServer::UEntry *> *in, vector< URANIE::DataServer::UEntry *> *out, int icalc)=0
TRun * _subrun
Definition: TShareRun.h:106
virtual ~TSimpleRun()
Definition: TShareRun.cxx:65
Definition: TShareRun.h:65
TEval * _fun
Definition: TShareRun.h:68
Definition: TShareRun.h:54
Definition: TEval.h:49
Definition: TShareRun.h:59
evaluation dun jeu de parametres
virtual Bool_t onMaster(void)
Definition: TShareRun.cxx:69