English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Launcher: URANIE::Launcher::TLauncher Class Reference
Uranie / Launcher v4.9.0
/* @license-end */
URANIE::Launcher::TLauncher Class Reference

Description of the class TLauncher. More...

#include <TLauncher.h>

Inheritance diagram for URANIE::Launcher::TLauncher:
Collaboration diagram for URANIE::Launcher::TLauncher:

Public Member Functions

Private Methods to manipulate the code
virtual void createResultsDirectory (Option_t *option="")
 Builts Results directory, no available options.
 
URANIE::DataServer::TDSNtupleD * createNtupleDFile (TString &sntlname, TString &slabelvarname, TString &slabelvartype)
 Create the ntupleD to store the output results.
 
void initiateTheEntryVector ()
 Create fill correctly the UEntry vectors.
 
Constructor and Destructor
 TLauncher ()
 Default constructor.
 
 TLauncher (URANIE::DataServer::TDataServer *tds, TCode *code, Option_t *option="")
 Constructor with a dataserver.
 
virtual ~TLauncher ()
 Default destructor.
 
Setting and Getting attributes
void setWorkingDirectory (TString str)
 Sets the working directory where to realize the computations.
 
TString getWorkingDirectory ()
 Gets the working directory.
 
void setPreProCommand (TString sCommand)
 Set the \it "prepro" command to execute before each parallel computation.
 
TString getPreProCommand ()
 
void setPostProCommand (TString sCommand)
 Set the \it "postpro" command to execute after each parallel computation.
 
TString getPostProCommand ()
 
void setSave (Int_t nSave=-1)
 Activates the save mode and sets number of max saves to perform.
 
void unsetSave ()
 Desactivates the save mode and unsets the specified number of max saves.
 
Bool_t getSave ()
 Get the save flag.
 
void setClean (Bool_t bbool=kTRUE)
 Set the clean flag.
 
Bool_t getClean ()
 Get the clean flag.
 
void setDrawProgressBar (Bool_t bbool=kTRUE)
 Set the "draw progress bar" flag.
 
Bool_t getDrawProgressBar ()
 Get the clean flag.
 
Bool_t getNoIntermediateSaved ()
 Get the clean flag.
 
void addSaveFile (TString sfile)
 Defines the output file to save during the launching process.
 
void setVarDraw (TString str, TString select="", TString opt="")
 Activates and defines the graphics during the launching.
 
Number of Process per Jobs
void setProcsPerJob (int procs)
 
int getProcsPerJob ()
 
Temporisation in seconds for large number of procs
void setDelay (int delay)
 
Printing Log
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 
virtual void printLog (Option_t *option="")
 
MultiLauncher strategy
void setEmptyMasterNode ()
 
void unsetEmptyMasterNode ()
 

Public Attributes

TCode_code
 
TString _sdraw
 
TString _sopt
 
TString _scut
 
TString _sdirectory
 Current directory.
 
TString _sworkingDirectory
 The Working directory.
 
TString _sPreProCommand
 The prepro command before each parralel computation.
 
TString _sPostProCommand
 The prepro command after each parralel computation.
 
TString _sInputNames
 
TString _sInputTypes
 
Bool_t _bsave
 Saves all the computation files in each directory.
 
Bool_t _bclean
 Cleans the Working Directory before runing the code.
 
Bool_t _blog
 Boolean to edit the log.
 
Bool_t _DoLogger
 Boolean to edit the log.
 
Bool_t _DoMultiDump
 Boolean to edit the log.
 
Bool_t _bdrawProgressBar
 Boolean to know if the progress bar has to be drawn.
 
Bool_t _bnoIntermediateSaved
 Boolean to decide whether to keep or not the intermediate state.
 
Bool_t _bemptyMasterNode
 
Int_t _nprocs
 The number of process for one job.
 
Int_t _nMaxSave
 The authorized number of saves.
 
Int_t _delay
 
TList * _listOfSaveFile
 temporisation in seconds between first and last execution on a batch system
 
URANIE::DataServer::TDataServer * _tds
 
vector< URANIE::DataServer::UEntry * > _InputVector
 Pointer vers un TDS.
 
vector< URANIE::DataServer::UEntry * > _OutputVector
 

Protected Member Functions

void setNoIntermediateSaved (Bool_t bbool=kTRUE)
 Set the "only final file" flag.
 

Protected Attributes

URANIE::DataServer::UMessageLogger * _fLogger
 

Manipulate the code

virtual void init (Option_t *option="")
 Init phase of the code.
 
virtual void terminate (Option_t *option="")
 Terminate phase of the code.
 
virtual void clean (Option_t *option="")
 Cleans the working directory of the code.
 
virtual void run (Option_t *option="")
 Runs phase of the code.
 

Detailed Description

Description of the class TLauncher.

To be written by the developper.

Constructor & Destructor Documentation

◆ TLauncher() [1/2]

URANIE::Launcher::TLauncher::TLauncher ( )

Default constructor.

Referenced by ClassImp().

◆ TLauncher() [2/2]

URANIE::Launcher::TLauncher::TLauncher ( URANIE::DataServer::TDataServer *  tds,
TCode code,
Option_t *  option = "" 
)

Constructor with a dataserver.

◆ ~TLauncher()

virtual URANIE::Launcher::TLauncher::~TLauncher ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ addSaveFile()

void URANIE::Launcher::TLauncher::addSaveFile ( TString  sfile)

Defines the output file to save during the launching process.

Parameters
sfile(TString) the name of the file to store during the process

Referenced by ClassImp().

◆ changeLog()

void URANIE::Launcher::TLauncher::changeLog ( )
inline

References _blog.

◆ clean()

virtual void URANIE::Launcher::TLauncher::clean ( Option_t *  option = "")
protectedvirtual

Cleans the working directory of the code.

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::preTreatment().

◆ createNtupleDFile()

URANIE::DataServer::TDSNtupleD * URANIE::Launcher::TLauncher::createNtupleDFile ( TString &  sntlname,
TString &  slabelvarname,
TString &  slabelvartype 
)

Create the ntupleD to store the output results.

This function is separated from the main loop to be reused in the TLauncherByStep (keep as much common code as possible)

Parameters
sntlnamename of the tuple
slabelvarnamename ot the branches to be created
slabelvartypetype ot the branches to be created

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::postTreatment().

◆ createResultsDirectory()

virtual void URANIE::Launcher::TLauncher::createResultsDirectory ( Option_t *  option = "")
virtual

Builts Results directory, no available options.

Referenced by ClassImp().

◆ getClean()

Bool_t URANIE::Launcher::TLauncher::getClean ( )
inline

Get the clean flag.

Returns
(Bool_t) the clean flag (boolean)

References _bclean.

◆ getDrawProgressBar()

Bool_t URANIE::Launcher::TLauncher::getDrawProgressBar ( )
inline

Get the clean flag.

Returns
(Bool_t) the clean flag (boolean)

References _bdrawProgressBar.

◆ getLog()

Bool_t URANIE::Launcher::TLauncher::getLog ( )
inline

References _blog.

◆ getNoIntermediateSaved()

Bool_t URANIE::Launcher::TLauncher::getNoIntermediateSaved ( )
inline

Get the clean flag.

Returns
(Bool_t) the clean flag (boolean)

References _bnoIntermediateSaved.

◆ getPostProCommand()

TString URANIE::Launcher::TLauncher::getPostProCommand ( )
inline

References _sPostProCommand.

◆ getPreProCommand()

TString URANIE::Launcher::TLauncher::getPreProCommand ( )
inline

References _sPreProCommand.

◆ getProcsPerJob()

int URANIE::Launcher::TLauncher::getProcsPerJob ( )
inline

References _nprocs.

◆ getSave()

Bool_t URANIE::Launcher::TLauncher::getSave ( )
inline

Get the save flag.

Returns
(Bool_t) the save flag (boolean)

References _bsave.

◆ getWorkingDirectory()

TString URANIE::Launcher::TLauncher::getWorkingDirectory ( )
inline

Gets the working directory.

Returns
(TString) the working directory

References _sworkingDirectory.

Referenced by URANIE::Launcher::TLauncherByStep::postTreatment().

◆ init()

virtual void URANIE::Launcher::TLauncher::init ( Option_t *  option = "")
protectedvirtual

Init phase of the code.

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::preTreatment().

◆ initiateTheEntryVector()

void URANIE::Launcher::TLauncher::initiateTheEntryVector ( )

Create fill correctly the UEntry vectors.

This function is separated from the main loop to be reused in the TLauncherByStep (keep as much common code as possible)

Parameters
inaddress of the vector of UEntry for inputs
outaddress of the vector of UEntry for outputs

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::preTreatment().

◆ printLog()

virtual void URANIE::Launcher::TLauncher::printLog ( Option_t *  option = "")
virtual

Reimplemented in URANIE::Launcher::TLauncherByStep.

Referenced by ClassImp().

◆ run()

virtual void URANIE::Launcher::TLauncher::run ( Option_t *  option = "")
virtual

Runs phase of the code.

Reimplemented in URANIE::Launcher::TLauncherByStep.

Referenced by ClassImp().

◆ setClean()

void URANIE::Launcher::TLauncher::setClean ( Bool_t  bbool = kTRUE)
inline

Set the clean flag.

The clean flag means that before launching, all the working directory are cleaned, and, if save == FALSE, after the launching all the working directory are also cleaned.

References _bclean.

Referenced by URANIE::Launcher::TLauncherByStep::TLauncherByStep().

◆ setDelay()

void URANIE::Launcher::TLauncher::setDelay ( int  delay)
inline

References _delay.

◆ setDrawProgressBar()

void URANIE::Launcher::TLauncher::setDrawProgressBar ( Bool_t  bbool = kTRUE)
inline

Set the "draw progress bar" flag.

The progress bar will be drawn if and only if the "draw progress bar" flag is true.

References _bdrawProgressBar.

◆ setEmptyMasterNode()

void URANIE::Launcher::TLauncher::setEmptyMasterNode ( )
inline

References _bemptyMasterNode.

◆ setLog()

void URANIE::Launcher::TLauncher::setLog ( )
inline

References _blog.

◆ setNoIntermediateSaved()

void URANIE::Launcher::TLauncher::setNoIntermediateSaved ( Bool_t  bbool = kTRUE)
inlineprotected

Set the "only final file" flag.

The output file is not created at every iteration, but only at the end. To be used only for (very) quick code when re-running it is not an issue The method is put in protected so that this option is changed only by option "noIntermediateSaved" in run()

References _bnoIntermediateSaved.

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::postTreatment().

◆ setPostProCommand()

void URANIE::Launcher::TLauncher::setPostProCommand ( TString  sCommand)
inline

Set the \it "postpro" command to execute after each parallel computation.

Set the \it "postpro" command to execute after each parallel computation

Parameters
sCommand(TString) The \it "prepro" command to execute beafore each parallel computation

References _sPostProCommand.

◆ setPreProCommand()

void URANIE::Launcher::TLauncher::setPreProCommand ( TString  sCommand)
inline

Set the \it "prepro" command to execute before each parallel computation.

Set the \it "prepro" command to execute before each parallel computation

Parameters
sCommand(TString) The \it "prepro" command to execute beafore each parallel computation

References _sPreProCommand.

◆ setProcsPerJob()

void URANIE::Launcher::TLauncher::setProcsPerJob ( int  procs)
inline

References _nprocs.

◆ setSave()

void URANIE::Launcher::TLauncher::setSave ( Int_t  nSave = -1)

Activates the save mode and sets number of max saves to perform.

A positive value stands for the explicit value of max saves. -1 allows to set max number of saves to the number of patterns.

Parameters
nSave(Int_t) [-1] Defines the number of saved patterns (working subdirectory). The default value [-1] means that all patterns are launched in a different working directory UranieLauncher_i

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::TLauncherByStep().

◆ setVarDraw()

void URANIE::Launcher::TLauncher::setVarDraw ( TString  str,
TString  select = "",
TString  opt = "" 
)
inline

Activates and defines the graphics during the launching.

By default, there is no graphic during the launchin process. To activate it, you must defines the informations of the graphics : the X, Y and Z attributes, the select and the options of the graphic.

Parameters
str(TString) the attributes to visualize ("Z:Y:X")
select(TString) [""] the "select" of patterns to visualize
opt(TString) [""] the options of the graphic

References _scut, _sdraw, and _sopt.

◆ setWorkingDirectory()

void URANIE::Launcher::TLauncher::setWorkingDirectory ( TString  str)

Sets the working directory where to realize the computations.

The working directory does not end with a slash () or a backslash (/) symbols.

lanceur->setWorkingDirectory("/home/uranie/tmp/UranieLauncher/myCode");
Parameters
str(TString) the working directory where to realize the computations.

Referenced by ClassImp().

◆ terminate()

virtual void URANIE::Launcher::TLauncher::terminate ( Option_t *  option = "")
protectedvirtual

Terminate phase of the code.

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::postTreatment().

◆ unsetEmptyMasterNode()

void URANIE::Launcher::TLauncher::unsetEmptyMasterNode ( )
inline

References _bemptyMasterNode.

◆ unsetLog()

void URANIE::Launcher::TLauncher::unsetLog ( )
inline

References _blog.

◆ unsetSave()

void URANIE::Launcher::TLauncher::unsetSave ( )
inline

Desactivates the save mode and unsets the specified number of max saves.

References _bsave, _nMaxSave, and MAX_PATTERN.

Member Data Documentation

◆ _bclean

Bool_t URANIE::Launcher::TLauncher::_bclean

Cleans the Working Directory before runing the code.

Referenced by ClassImp(), getClean(), and setClean().

◆ _bdrawProgressBar

Bool_t URANIE::Launcher::TLauncher::_bdrawProgressBar

◆ _bemptyMasterNode

Bool_t URANIE::Launcher::TLauncher::_bemptyMasterNode

◆ _blog

◆ _bnoIntermediateSaved

Bool_t URANIE::Launcher::TLauncher::_bnoIntermediateSaved

Boolean to decide whether to keep or not the intermediate state.

Referenced by ClassImp(), getNoIntermediateSaved(), URANIE::Launcher::TLauncherByStep::postTreatment(), and setNoIntermediateSaved().

◆ _bsave

Bool_t URANIE::Launcher::TLauncher::_bsave

Saves all the computation files in each directory.

Referenced by ClassImp(), getSave(), URANIE::Launcher::TLauncherByStep::preTreatment(), and unsetSave().

◆ _code

◆ _delay

Int_t URANIE::Launcher::TLauncher::_delay

Referenced by ClassImp(), and setDelay().

◆ _DoLogger

◆ _DoMultiDump

Bool_t URANIE::Launcher::TLauncher::_DoMultiDump

Boolean to edit the log.

Referenced by ClassImp().

◆ _fLogger

URANIE::DataServer::UMessageLogger* URANIE::Launcher::TLauncher::_fLogger
protected

Referenced by ClassImp().

◆ _InputVector

vector<URANIE::DataServer::UEntry*> URANIE::Launcher::TLauncher::_InputVector

◆ _listOfSaveFile

TList* URANIE::Launcher::TLauncher::_listOfSaveFile

temporisation in seconds between first and last execution on a batch system

The list of output files to save with the number of run

Referenced by ClassImp(), and URANIE::Launcher::TLauncherByStep::postTreatment().

◆ _nMaxSave

Int_t URANIE::Launcher::TLauncher::_nMaxSave

The authorized number of saves.

Referenced by ClassImp(), and unsetSave().

◆ _nprocs

Int_t URANIE::Launcher::TLauncher::_nprocs

The number of process for one job.

Referenced by ClassImp(), getProcsPerJob(), URANIE::Launcher::TLauncherByStep::run(), and setProcsPerJob().

◆ _OutputVector

vector<URANIE::DataServer::UEntry*> URANIE::Launcher::TLauncher::_OutputVector

◆ _scut

TString URANIE::Launcher::TLauncher::_scut

Referenced by ClassImp(), and setVarDraw().

◆ _sdirectory

◆ _sdraw

TString URANIE::Launcher::TLauncher::_sdraw

Referenced by ClassImp(), and setVarDraw().

◆ _sInputNames

TString URANIE::Launcher::TLauncher::_sInputNames

Referenced by ClassImp().

◆ _sInputTypes

TString URANIE::Launcher::TLauncher::_sInputTypes

Referenced by ClassImp().

◆ _sopt

TString URANIE::Launcher::TLauncher::_sopt

◆ _sPostProCommand

TString URANIE::Launcher::TLauncher::_sPostProCommand

The prepro command after each parralel computation.

Referenced by ClassImp(), getPostProCommand(), and setPostProCommand().

◆ _sPreProCommand

TString URANIE::Launcher::TLauncher::_sPreProCommand

The prepro command before each parralel computation.

Referenced by ClassImp(), getPreProCommand(), and setPreProCommand().

◆ _sworkingDirectory

TString URANIE::Launcher::TLauncher::_sworkingDirectory

◆ _tds