]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Improving default text values and adding an observer template
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Sun, 16 Jun 2013 18:19:58 +0000 (20:19 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Sun, 16 Jun 2013 18:19:58 +0000 (20:19 +0200)
bin/AdaoCatalogGenerator.py

index aec9be48abea9e83d5895fa05856aaaeb2668c28..d5425dfe3a4c7cd58293ec6d69a26b30295bca76 100644 (file)
@@ -110,7 +110,7 @@ observers_choice = """
                                        ${var_name} = BLOC (condition=" '${var_name}' in set(SELECTION) ",
                                            ${var_name}_data = FACT(statut = "o",
                                                Scheduler    = SIMP(statut = "f", typ = "TXM"),
-                                               Info         = SIMP(statut = "f", typ = "TXM"),
+                                               Info         = SIMP(statut = "f", typ = "TXM", defaut = "${var_name}"),
                                                NodeType     = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("String", "Script", "Template")),
                                                PythonScript = BLOC (condition = " NodeType == 'String' ",
                                                    Value = SIMP(statut = "o", typ = "TXM")
@@ -119,15 +119,18 @@ observers_choice = """
                                                    Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=(OnlyStr()))
                                                ),
                                                ObserverTemplate =  BLOC (condition = " NodeType == 'Template' ",
-                                                   Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("ValuePrinter", "ValueGnuPlotter", "ValueSerieGnuPlotter")),
+                                                   Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "", into=("ValuePrinter", "ValueSeriePrinter", "ValueGnuPlotter", "ValueSerieGnuPlotter")),
                                                    ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ",
                                                        ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[-1]" ),
                                                    ),
+                                                   ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ",
+                                                       ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info,var[:]" ),
+                                                   ),
                                                    ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ",
-                                                       ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\\nglobal gp\\ntry:\\n    gp('set style data lines')\\nexcept:\\n    gp = Gnuplot.Gnuplot(persist=1)\\n    gp('set style data lines')\\ngp('set title  \\"'+str(info)+'\\"')\\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ),
+                                                       ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\\nglobal nfig,gp\\ntry:\\n    nfig += 1\\n    gp('set style data lines')\\nexcept:\\n    nfig = 0\\n    gp = Gnuplot.Gnuplot(persist=1)\\n    gp('set style data lines')\\ngp('set title  \\"'+str(info)+' (Figure %i)\\"'%nfig)\\ngp.plot( Gnuplot.Data( var[-1], with_='lines lw 2' ) )" ),
                                                    ),
                                                    ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ",
-                                                       ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\\nglobal gp\\ntry:\\n    gp('set style data lines')\\nexcept:\\n    gp = Gnuplot.Gnuplot(persist=1)\\n    gp('set style data lines')\\ngp('set title  \\"'+str(info)+'\\"')\\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ),
+                                                       ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import Gnuplot\\nglobal nfig,gp\\ntry:\\n    nfig += 1\\n    gp('set style data lines')\\nexcept:\\n    nfig = 0\\n    gp = Gnuplot.Gnuplot(persist=1)\\n    gp('set style data lines')\\ngp('set title  \\"'+str(info)+' (Figure %i)\\"'%nfig)\\ngp.plot( Gnuplot.Data( var[:], with_='lines lw 2' ) )" ),
                                                    ),
                                                ),
                                            ),
@@ -152,7 +155,7 @@ def F_variables(statut) : return FACT(statut=statut,
 ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY",
                           op=None,
                           repetable           = "n",
-                          Study_name          = SIMP(statut="o", typ = "TXM"),
+                          Study_name          = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"),
                           Study_repertory     = SIMP(statut="f", typ = "Repertoire", min=1, max=1),
                           Debug               = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0),
                           Algorithm           = SIMP(statut="o", typ = "TXM", into=(${algos_names})),
@@ -175,7 +178,7 @@ ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY",
 CHECKING_STUDY = PROC(nom="CHECKING_STUDY",
                           op=None,
                           repetable           = "n",
-                          Study_name          = SIMP(statut="o", typ = "TXM"),
+                          Study_name          = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"),
                           Study_repertory     = SIMP(statut="f", typ = "Repertoire", min=1, max=1),
                           Debug               = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0),
                           Algorithm           = SIMP(statut="o", typ = "TXM", into=(${check_names})),