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::TCode Class Reference
Uranie / Launcher v4.9.0
/* @license-end */
URANIE::Launcher::TCode Class Reference

Description of the class TCode. More...

#include <TCode.h>

Inheritance diagram for URANIE::Launcher::TCode:
Collaboration diagram for URANIE::Launcher::TCode:

Public Member Functions

Constructor and Destructor
 TCode ()
 Default constructor.
 
 TCode (const TString &name, const TString &title)
 constructor with a name and a title
 
 TCode (URANIE::DataServer::TDataServer *tds, TString scmd)
 Constructor from TDataServer and Command as string.
 
 TCode (URANIE::Launcher::TCode &mycode)
 Copy constructor.
 
virtual ~TCode ()
 Default destructor.
 
Get Input Files or Output Files
TInputFilegetInputFile (TString sfile)
 Get the input file file from his name.
 
TInputFilegetInputFile (Int_t nfile)
 Get the input file from his index.
 
TInputFilegetLastInputFile ()
 Get the last input file.
 
TOutputFilegetOutputFile (Int_t nfile)
 Get the output file from his index.
 
TOutputFilegetOutputFile (TString sfile)
 getOutputFile
 
Setting and Getting attributs
void setWorkingDirectory (TString sPathName="")
 Set the working directory.
 
TString getWorkingDirectory ()
 Get the working directory.
 
void setReferenceDirectory (TString str)
 Set the reference directory where inputs no change are located.
 
TString getReferenceDirectory ()
 Get the reference directory where inputs no change are located.
 
void setCommand (TString str)
 Set the code command.
 
TString getCommand ()
 Get the code command.
 
Int_t getNOutputFiles ()
 Get the number of output files.
 
Int_t getNOutputAttributes ()
 Get the number of output attributes.
 
Int_t getNOutputAttributes (Int_t nfile)
 Get the number of output attributes in the output file given by his index.
 
Int_t getNInputFiles ()
 Get the number of input files.
 
Int_t getNInputAttributes ()
 Get the number of input attributes.
 
Int_t getNInputAttributes (Int_t nfile)
 Get the number of input attributes in the input file given by his index.
 
URANIE::DataServer::TAttribute * getInputAttribute (Int_t nfile, Int_t natt)
 Get an attribute of an input file.
 
URANIE::DataServer::TAttribute * getAttribute (Int_t nfile, Int_t natt)
 Get an attribute of an output file.
 
TString getInputVarNames ()
 Get the names of the input variables separated by ":".
 
TString getOutputVarNames ()
 Get the names of the output variables separated by ":".
 
URANIE::DataServer::TDataServer * getTDataServer ()
 Get the pointer to the TDS.
 
void setTDataServer (URANIE::DataServer::TDataServer *atds)
 Set the pointer to the TDS.
 
Encapsulates a code

The states of the TCode are follow:

dot_inline_dotgraph_1.png

with

  • init : the initialisation phase
  • preTraitment : the preTraitment phase (change in the inputs files the current values of the input attributes)
  • run : Evaluate the code with the current inputs values
  • postTraitment : the postTraitment phase (cath in the output files the values of teh ouput attributes)
  • terminate : the terminate phase
  • runTest : run a test "Not Yest implemented" (just to verify all are good with the first computation)
virtual void runTest (Option_t *option="")
 Run a test for the code.
 
virtual void initFileType (Option_t *option="")
 Init file typing.
 
virtual void init (Option_t *option="")
 Init phase of the code.
 
virtual void preTraitment (Int_t n, Double_t *val, Int_t *index=NULL, Option_t *option="")
 Pre-traitment phase of the code.
 
virtual void preTraitment (Int_t n, vector< URANIE::DataServer::UEntry * > *input, Option_t *option="")
 Pre-traitment phase of the code that deals with vectors/strings.
 
virtual void run (Option_t *option="")
 Run the code.
 
virtual Bool_t postTraitment (Int_t &nout, Double_t *dvalout, Option_t *option="", TList *lstOut=NULL)
 Post-traitment phase of the code.
 
virtual Bool_t postTraitment (vector< URANIE::DataServer::UEntry * > *out, Option_t *option)
 Post-traitment phase of the code that deals with vectors/strings.
 
virtual void terminate (Option_t *option="")
 Terminate phase of the code.
 
Manipulates the code
void createDirectory (TString sPathName, TString sDirectoryName="")
 create the directory sPathName+"/"+sDirectoryName
 
virtual void copyFiles (Option_t *option="")
 copyFiles
 
void resetCurrentSimulation ()
 resetCurrentSimulation
 
virtual void cleanOutputFiles (Option_t *option="")
 Cleans the output files.
 
Adding Input and Output files
void addInputFile (TInputFile *ifile)
 Add a TInputFile file.
 
void addInputFile (TString str)
 Add an input file as a TString This input file does not contain input attributes. It is a mandatory input file for the code evaluation.
 
void addOutputFile (TOutputFile *ifile)
 Add a TOutputFile file The TOutputFile file contains the output attributes of teh study.
 
Printing Log
void setLog ()
 Force the log.
 
void unsetLog ()
 Force to desable the log.
 
void changeLog ()
 Swith the status of the log.
 
Bool_t getLog ()
 Get the status of the log.
 
virtual void printLog (Option_t *option="")
 Print the log of the object/class.
 

Public Attributes

protected attributes
protected TList * _listOfInputFiles
 < vector of output files
 
TString _sWorkingDirectory
 The Working directory.
 
TString _sReferenceDirectory
 The Working directory.
 
TString _sCommand
 The Command of the code.
 
Int_t _nCurrentSimulation
 The Current number of simulation.
 
Int_t _nOfInput
 The size of the vector listOfInput scanning input files.
 
Int_t _nOfInputToSubstitute
 The size of the vector _nIndexOfInputToSubstitute.
 
Int_t * _nIndexOfInputToSubstitute
 The vector of Index to Substitute.
 
Bool_t _blog
 Boolean for edit the log.
 
URANIE::DataServer::TDataServer * _tds
 

Detailed Description

Description of the class TCode.

To be written by the developper.

Constructor & Destructor Documentation

◆ TCode() [1/4]

URANIE::Launcher::TCode::TCode ( )

Default constructor.

Referenced by ClassImp().

◆ TCode() [2/4]

URANIE::Launcher::TCode::TCode ( const TString &  name,
const TString &  title 
)

constructor with a name and a title

Parameters
name
title

◆ TCode() [3/4]

URANIE::Launcher::TCode::TCode ( URANIE::DataServer::TDataServer *  tds,
TString  scmd 
)

Constructor from TDataServer and Command as string.

Parameters
tds
scmd

◆ TCode() [4/4]

URANIE::Launcher::TCode::TCode ( URANIE::Launcher::TCode mycode)

Copy constructor.

Parameters
mycode

◆ ~TCode()

virtual URANIE::Launcher::TCode::~TCode ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ addInputFile() [1/2]

void URANIE::Launcher::TCode::addInputFile ( TInputFile ifile)

Add a TInputFile file.

Parameters
ifile

Referenced by ClassImp(), and ClassImp().

◆ addInputFile() [2/2]

void URANIE::Launcher::TCode::addInputFile ( TString  str)

Add an input file as a TString This input file does not contain input attributes. It is a mandatory input file for the code evaluation.

Parameters
str

◆ addOutputFile()

void URANIE::Launcher::TCode::addOutputFile ( TOutputFile ifile)

Add a TOutputFile file The TOutputFile file contains the output attributes of teh study.

Parameters
ifile

Referenced by ClassImp(), and ClassImp().

◆ changeLog()

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

Swith the status of the log.

References _blog.

◆ cleanOutputFiles()

virtual void URANIE::Launcher::TCode::cleanOutputFiles ( Option_t *  option = "")
virtual

Cleans the output files.

Parameters
option

Referenced by ClassImp(), and ClassImp().

◆ copyFiles()

virtual void URANIE::Launcher::TCode::copyFiles ( Option_t *  option = "")
virtual

copyFiles

Parameters
option

Referenced by ClassImp(), and ClassImp().

◆ createDirectory()

void URANIE::Launcher::TCode::createDirectory ( TString  sPathName,
TString  sDirectoryName = "" 
)

create the directory sPathName+"/"+sDirectoryName

Parameters
sPathName
sDirectoryName

Referenced by ClassImp(), and ClassImp().

◆ getAttribute()

URANIE::DataServer::TAttribute * URANIE::Launcher::TCode::getAttribute ( Int_t  nfile,
Int_t  natt 
)

Get an attribute of an output file.

Parameters
nfile
natt
Returns

Referenced by ClassImp(), and ClassImp().

◆ getCommand()

TString URANIE::Launcher::TCode::getCommand ( )
inline

Get the code command.

Returns

References _sCommand.

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

◆ getInputAttribute()

URANIE::DataServer::TAttribute * URANIE::Launcher::TCode::getInputAttribute ( Int_t  nfile,
Int_t  natt 
)

Get an attribute of an input file.

Parameters
nfile
natt
Returns

Referenced by ClassImp(), and ClassImp().

◆ getInputFile() [1/2]

TInputFile * URANIE::Launcher::TCode::getInputFile ( Int_t  nfile)

Get the input file from his index.

Parameters
nfile
Returns

◆ getInputFile() [2/2]

TInputFile * URANIE::Launcher::TCode::getInputFile ( TString  sfile)

Get the input file file from his name.

Parameters
sfile
Returns

Referenced by ClassImp(), and ClassImp().

◆ getInputVarNames()

TString URANIE::Launcher::TCode::getInputVarNames ( )

Get the names of the input variables separated by ":".

Returns

Referenced by ClassImp().

◆ getLastInputFile()

TInputFile * URANIE::Launcher::TCode::getLastInputFile ( )

Get the last input file.

Returns

Referenced by ClassImp().

◆ getLog()

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

Get the status of the log.

Returns

References _blog.

◆ getNInputAttributes() [1/2]

Int_t URANIE::Launcher::TCode::getNInputAttributes ( )

Get the number of input attributes.

Returns

Referenced by ClassImp(), and ClassImp().

◆ getNInputAttributes() [2/2]

Int_t URANIE::Launcher::TCode::getNInputAttributes ( Int_t  nfile)

Get the number of input attributes in the input file given by his index.

Parameters
nfile
Returns

◆ getNInputFiles()

Int_t URANIE::Launcher::TCode::getNInputFiles ( )
inline

Get the number of input files.

Returns

References _listOfInputFiles.

Referenced by ClassImp(), and ClassImp().

◆ getNOutputAttributes() [1/2]

Int_t URANIE::Launcher::TCode::getNOutputAttributes ( )

Get the number of output attributes.

Returns

Referenced by ClassImp(), and ClassImp().

◆ getNOutputAttributes() [2/2]

Int_t URANIE::Launcher::TCode::getNOutputAttributes ( Int_t  nfile)

Get the number of output attributes in the output file given by his index.

Parameters
nfile
Returns

◆ getNOutputFiles()

Int_t URANIE::Launcher::TCode::getNOutputFiles ( )
inline

Get the number of output files.

Returns

Referenced by ClassImp(), and ClassImp().

◆ getOutputFile() [1/2]

TOutputFile * URANIE::Launcher::TCode::getOutputFile ( Int_t  nfile)

Get the output file from his index.

Parameters
nfile
Returns

Referenced by ClassImp(), and ClassImp().

◆ getOutputFile() [2/2]

TOutputFile * URANIE::Launcher::TCode::getOutputFile ( TString  sfile)

getOutputFile

Parameters
sfile
Returns

◆ getOutputVarNames()

TString URANIE::Launcher::TCode::getOutputVarNames ( )

Get the names of the output variables separated by ":".

Returns

Referenced by ClassImp().

◆ getReferenceDirectory()

TString URANIE::Launcher::TCode::getReferenceDirectory ( )
inline

Get the reference directory where inputs no change are located.

Returns

References _sReferenceDirectory.

◆ getTDataServer()

URANIE::DataServer::TDataServer * URANIE::Launcher::TCode::getTDataServer ( )
inline

Get the pointer to the TDS.

Returns

References _tds.

◆ getWorkingDirectory()

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

Get the working directory.

Returns

References _sWorkingDirectory.

Referenced by ClassImp().

◆ init()

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

Init phase of the code.

Parameters
option

Reimplemented in URANIE::Launcher::TCodeFMU.

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

◆ initFileType()

virtual void URANIE::Launcher::TCode::initFileType ( Option_t *  option = "")
virtual

Init file typing.

Parameters
option

Referenced by ClassImp().

◆ postTraitment() [1/2]

virtual Bool_t URANIE::Launcher::TCode::postTraitment ( Int_t &  nout,
Double_t *  dvalout,
Option_t *  option = "",
TList *  lstOut = NULL 
)
virtual

Post-traitment phase of the code.

Parameters
nout
dvalout
option
lstOut
Returns

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

◆ postTraitment() [2/2]

virtual Bool_t URANIE::Launcher::TCode::postTraitment ( vector< URANIE::DataServer::UEntry * > *  out,
Option_t *  option 
)
virtual

Post-traitment phase of the code that deals with vectors/strings.

Parameters
out
option
Returns

◆ preTraitment() [1/2]

virtual void URANIE::Launcher::TCode::preTraitment ( Int_t  n,
Double_t *  val,
Int_t *  index = NULL,
Option_t *  option = "" 
)
virtual

Pre-traitment phase of the code.

Parameters
n
val
index
option

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

◆ preTraitment() [2/2]

virtual void URANIE::Launcher::TCode::preTraitment ( Int_t  n,
vector< URANIE::DataServer::UEntry * > *  input,
Option_t *  option = "" 
)
virtual

Pre-traitment phase of the code that deals with vectors/strings.

Parameters
n
input
option

◆ printLog()

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

Print the log of the object/class.

Parameters
option

Reimplemented in URANIE::Launcher::TCodeFMU.

Referenced by ClassImp(), and ClassImp().

◆ resetCurrentSimulation()

void URANIE::Launcher::TCode::resetCurrentSimulation ( )

resetCurrentSimulation

Creates the uranieLancher_0 subdirectory to store all the computation

Referenced by ClassImp(), and ClassImp().

◆ run()

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

◆ runTest()

virtual void URANIE::Launcher::TCode::runTest ( Option_t *  option = "")
virtual

Run a test for the code.

Parameters
option

Referenced by ClassImp().

◆ setCommand()

void URANIE::Launcher::TCode::setCommand ( TString  str)
inline

Set the code command.

Parameters
str

References _sCommand.

Referenced by ClassImp(), and URANIE::Launcher::TLauncherMulti::run().

◆ setLog()

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

Force the log.

References _blog.

◆ setReferenceDirectory()

void URANIE::Launcher::TCode::setReferenceDirectory ( TString  str)
inline

Set the reference directory where inputs no change are located.

Parameters
str

References _sReferenceDirectory.

◆ setTDataServer()

void URANIE::Launcher::TCode::setTDataServer ( URANIE::DataServer::TDataServer *  atds)
inline

Set the pointer to the TDS.

Parameters
atds

References _tds.

◆ setWorkingDirectory()

void URANIE::Launcher::TCode::setWorkingDirectory ( TString  sPathName = "")

Set the working directory.

Parameters
str

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

◆ terminate()

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

Terminate phase of the code.

Parameters
option

Reimplemented in URANIE::Launcher::TCodeFMU.

Referenced by ClassImp(), and ClassImp().

◆ unsetLog()

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

Force to desable the log.

References _blog.

Member Data Documentation

◆ _blog

◆ _listOfInputFiles

protected TList* URANIE::Launcher::TCode::_listOfInputFiles

< vector of output files

The list of input

Referenced by ClassImp(), ClassImp(), and getNInputFiles().

◆ _nCurrentSimulation

Int_t URANIE::Launcher::TCode::_nCurrentSimulation

The Current number of simulation.

Referenced by ClassImp(), and ClassImp().

◆ _nIndexOfInputToSubstitute

Int_t* URANIE::Launcher::TCode::_nIndexOfInputToSubstitute

The vector of Index to Substitute.

Referenced by ClassImp().

◆ _nOfInput

Int_t URANIE::Launcher::TCode::_nOfInput

The size of the vector listOfInput scanning input files.

Referenced by ClassImp().

◆ _nOfInputToSubstitute

Int_t URANIE::Launcher::TCode::_nOfInputToSubstitute

The size of the vector _nIndexOfInputToSubstitute.

Referenced by ClassImp().

◆ _sCommand

TString URANIE::Launcher::TCode::_sCommand

The Command of the code.

Referenced by ClassImp(), getCommand(), and setCommand().

◆ _sReferenceDirectory

TString URANIE::Launcher::TCode::_sReferenceDirectory

The Working directory.

Referenced by ClassImp(), ClassImp(), getReferenceDirectory(), and setReferenceDirectory().

◆ _sWorkingDirectory

TString URANIE::Launcher::TCode::_sWorkingDirectory

The Working directory.

Referenced by ClassImp(), ClassImp(), and getWorkingDirectory().

◆ _tds

URANIE::DataServer::TDataServer* URANIE::Launcher::TCode::_tds