English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Launcher: TLauncherFunction.h Source File
Uranie / Launcher v4.9.0
/* @license-end */
TLauncherFunction.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
41#ifndef ULAUNCHERFUNCTION_H
42#define ULAUNCHERFUNCTION_H
43
44#include <iostream>
45using std::cout;
46using std::endl;
47
48//ROOT
49#include "Rtypes.h"
50#include "TNamed.h"
51#include "TMethodCall.h"
52
53// Uranie
54#include "Launcher.h"
55#include "TDataServer.h"
56
57namespace URANIE
58{
59namespace Launcher
60{
61class TLauncherFunction: public TNamed
62{
63private:
64 TMethodCall *_fMethodCall;
65 void (*_fMethod)(Double_t *gin, Double_t *f);
66 TString _soutput;
67 Int_t _nOutput;
68 URANIE::DataServer::TDataServer *_tds;
70 Bool_t _blog;
72 URANIE::DataServer::TDSNtupleD *_internal;
73public:
74 //---------------------------------------------
78
79 TLauncherFunction(URANIE::DataServer::TDataServer *tds, const char* functionanme,
80 TString sinput = "", TString soutput = "");
81#ifdef ROOT5
83 TLauncherFunction(URANIE::DataServer::TDataServer *tds, void *fcn,
84 TString sinput = "", TString soutput = "");
85#else
87 TLauncherFunction(URANIE::DataServer::TDataServer *tds, void (*fcn)(Double_t*,Double_t*),
88 TString sinput, TString soutput);
89#endif
93
94 //---------------------------------------------
98
99 void setNOutput(Int_t n);
100
102
106 void setDrawProgressBar(Bool_t bbool = kTRUE)
107 {
108 _bdrawProgressBar = bbool;
109 }
110
112
116 {
117 return _bdrawProgressBar;
118 }
119
121
122 //---------------------------------------------
126
127 virtual void run(TString sinput = "", TString soutput = "",
128 Option_t *option = "");
130
132
133 //---------------------------------------------
137 void setLog()
138 {
139 _blog = kTRUE;
140 }
141 void unsetLog()
142 {
143 _blog = kFALSE;
144 }
146 {
147 _blog = _blog ? kFALSE : kTRUE;
148 }
149 Bool_t getLog()
150 {
151 return _blog;
152 }
153 virtual void printLog(Option_t *option = "");
155
156 ClassDef(URANIE::Launcher::TLauncherFunction, ID_LAUNCHER)
157 //Classe de
158};
159
160} // Fin du namespace Launcher
161} // Fin du namespace URANIE
162
163#endif
Execute an analytical function on a dataserver.
Definition TLauncherFunction.h:62
TList * _listOfInputAttributes
List of the input branches.
Definition TLauncherFunction.h:69
URANIE::DataServer::TDataServer * _tds
Pointer to the DataServer.
Definition TLauncherFunction.h:68
URANIE::DataServer::TDSNtupleD * _internal
Definition TLauncherFunction.h:72
TString _soutput
Name of the output attributes.
Definition TLauncherFunction.h:66
Bool_t getLog()
Definition TLauncherFunction.h:149
Bool_t _blog
Boolean to edit the log.
Definition TLauncherFunction.h:70
virtual void printLog(Option_t *option="")
virtual void run(TString sinput="", TString soutput="", Option_t *option="")
Runs phase of the code.
TMethodCall * _fMethodCall
Pointer to MethodCall in case of interpreted function.
Definition TLauncherFunction.h:64
virtual ~TLauncherFunction()
Default destructor.
TLauncherFunction(URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), TString sinput, TString soutput)
Constructor by a TDataServer, a function and list of inputs and outputs (optional)
Int_t _nOutput
The dimension of the output vector.
Definition TLauncherFunction.h:67
void setNOutput(Int_t n)
Sets the number of output.
TLauncherFunction(URANIE::DataServer::TDataServer *tds, const char *functionanme, TString sinput="", TString soutput="")
Constructor by a TDataServer, the name of the function and a list of inputs (optional)....
void changeLog()
Definition TLauncherFunction.h:145
Bool_t getDrawProgressBar()
Get the "draw progress bar" flag.
Definition TLauncherFunction.h:115
Bool_t _bdrawProgressBar
Boolean to know if the progress bar has to be drawn.
Definition TLauncherFunction.h:71
void(* _fMethod)(Double_t *gin, Double_t *f)
Definition TLauncherFunction.h:65
void setDrawProgressBar(Bool_t bbool=kTRUE)
Set the "draw progress bar" flag.
Definition TLauncherFunction.h:106
void setLog()
Definition TLauncherFunction.h:137
void unsetLog()
Definition TLauncherFunction.h:141
Definition TCluster.h:67