From d2b0e25c6653476f5e844e6be99eee61cb759f10 Mon Sep 17 00:00:00 2001 From: Charles Toulemonde Date: Tue, 6 Jul 2010 11:39:23 +0000 Subject: [PATCH] =?utf8?q?mise=20=C3=A0=20jour=20Charles=20pour=20Thierry?= =?utf8?q?=20faire=20attention=20au=20r=C3=A9pertoire=20des=20classes?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- generator/generator_s_scc_st_2.py | 47 ++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/generator/generator_s_scc_st_2.py b/generator/generator_s_scc_st_2.py index 01dd7d9e..9d0baf0b 100644 --- a/generator/generator_s_scc_st_2.py +++ b/generator/generator_s_scc_st_2.py @@ -28,13 +28,15 @@ import types,string,re,os from generator_map import MapGenerator -#____________________________________________________________________________________ -# PYGMEEDict contient une equivalence entre le catalogue Map et les lignes generees -# comme entete (commentaire ?) dans le fichier d'input de pygmee -# - -CONFIGliste=('NAME_SCHEME', 'PATH_ASTER', 'PATH_BENHUR', 'PATH_MODULE', 'PATH_PYGMEE', 'PATH_STUDY', 'repIni') +import sys +sys.path.append('/local00/bin/MAP/classes/python/') +from class_MAP_parameters import * +dico_post={"analyse statistique classique":("c_post_distribution_properties","PDF"), +"analyse statistique de la qualite":("",""), +"analyse de la dispersion suivant la distance au joint":("c_post_distribution_properties","dgb"), +"analyse de la dispersion suivant la distance a la pointe de fissure":("",""), +"visualisation dans le triangle standard":("","")} def entryPoint(): """ @@ -58,14 +60,31 @@ class s_scc_st_2Generator(MapGenerator): """ - def TABLEAU(self,execution): dico=self.dictMCVal["TABLEAU"] - try : - a=dico['_TABLEAU_FICHIER'] - commande='echo '+a+';' - return commande - except : - print "aie aie aie" - + self.file_in_name=dico['_TABLEAU_FICHIER'] + return "" + def TRAITEMENT(self, execution): + dico=self.dictMCVal["TRAITEMENT"] + post=dico['_TRAITEMENT_TYPE'] + variable=dico['_TRAITEMENT_VARIABLE'] + composant=dico_post[post][0] + maDirectory=self.config.PATH_MAP+'/components/'+composant+'/' + monFichier=self.config.PATH_STUDY+'/'+composant+'_'+dico_post[post][1]+'_'+variable+'.input' + + parameter=MAP_parameters() + parameter.add_component(composant) + parameter.add_parameter(composant, 'file_in_name', self.file_in_name) + parameter.add_parameter(composant, 'variable_name', variable) + parameter.add_parameter(composant, 'post', dico_post[post][1]) + parameter.add_parameter(composant, 'study_name', self.config.appli.ssCode) + parameter.add_parameter(composant, 'study_path', self.config.PATH_STUDY) + parameter.write(monFichier) + + command='cd '+maDirectory+'src/'+'\n'+'python '+composant+'.py -i '+monFichier+';' + print "command = ", command + if (execution=="oui") : + return command + + return "" -- 2.39.2