--- myst: substitutions: bloc1: python: 1-4,12-39,42-96 cpp: 5-32,35-90,93 bloc2: python: 13-16 cpp: 5-8 bloc3: python: 69-79 cpp: 62-72 bloc4: python: 86-90 cpp: 79-83 bloc5: python: 7- cpp: 9- dedent: python: ":dedent:\n" cpp: "" --- # Macro "**relauncherCodeFlowrateSequential_TemporaryVar.{{extension}}**" ## Objective The goal of this macro is to show how to hide one of the evaluator's attribute and not to store it in the final dataserver. This is considered when a composition is done for instance, in which many variables might be intermediate needed ones, resulting from an assessor and used as input to one of the following, but of no interest to the user at the end. The `flowrate` code is provided with {{uranie}} and has been also used and discussed throughout these macros. ## Macro {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeFlowrateSequential_TemporaryVar." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc1[language] + "\n" + "```" }} Here again, a comparison is drawn with the macro in which we set an attribute to a constant value (see [](#use_cases_macro_relauncher_sequential_constant)), so only the differences are pointed out. The very first one is contained in the beginning lines: a new dummy function, so that we can have a composition of two assessors, this function only adding one to the provided parameter. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeFlowrateSequential_TemporaryVar." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc2[language] + "\n" + "```" }} The rest is exactly as for [](#use_cases_macro_relauncher_sequential_constant), up to the interface with the newy create function: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeFlowrateSequential_TemporaryVar." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc3[language] + "\n" + "```" }} A new output attribute is created, called **incd** for increased **d**, and the dummy function is defined as taking **d** as input and incd as output. Then the composition is done by chaining flowrate with the new dummy function. The rest is fairly common, up to the `TMaster`-inheriting object specification: the `addTemporary` method is called to specify that **d** is read from the output of flowrate and can be pass to the rest of the chain, but it will not be kept in the final dataserver. The `addConstantValue` is also used just changing the final parameters to show that if nothing is specified, then the value of **r** is not stored and this might be tricky for bookkeeping. The results is shown in the next section (from the `scan` method) and can be compared to [](#use_cases_macro_relauncher_sequential_constant_console) for consistency check. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeFlowrateSequential_TemporaryVar." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc4[language] + "\n" + dedent[language] + "```" }} ```{raw} latex \begin{landscape} ``` ## Console {{ "```{literalinclude} " + parent_dir + "/roottest/build/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeFlowrateSequential_TemporaryVar.log" + "\n" + ":language: " + language + "\n" + ":lines: " + bloc5[language] + "\n" + "```" }} ```{raw} latex \end{landscape} ```