--- myst: substitutions: bloc1: python: 1-5,17-22,25-69,72-78 cpp: 5-9,15-19,22-67,70-75 bloc2: python: 38-45 cpp: 35-42 bloc3: python: 66-69,72-78 cpp: 7-8,66-67,70-75 --- (use_cases_macro_relauncher_key_empty_vectors)= # Macro "**relauncherCodeMultiTypeKeyEmptyVectors.{{extension}}**" ## Objective The objective of this macro is to test the case where vectors and strings are produced as outputs, using the code described in [](#use_cases_macro_launcher_input_output_outputs), with a Key format, obtained by doing: ```none multitype -mtKey -empty ``` Unlike what's done to in [](#use_cases_macro_relauncher_key), the *"-empty"* allows the code to generate empty vectors and not only vectors whose size would be between 1 and 15 elements. The resulting output file used is a key-format one in a condensate form, named `_output_multitype_mt_Key_condensate_.dat` looks like: {{ "```{literalinclude} " + parent_dir + "/usermanual/use_cases/files/_output_multitype_mt_Key_condensate_.dat" + "\n" + ":language: none\n" + "```" }} ## Macro {{uranie}} {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeMultiTypeKeyEmptyVectors." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc1[language] + "\n" + "```" }} The beginning of the code is pretty common to the macro already discussed in [](#use_cases_macro_relauncher_key_macro). Apart from the command difference discussed in the objective above through the *"-empty"* argument, the main difference with previous macro is the way the output file is declared. Despite from changing the name, the vector properties are set by calling the `setVectorProperties` method to emphasize how to read the information. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeMultiTypeKeyEmptyVectors." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc2[language] + "\n" + "```" }} Apart from this, the code is smooth and the final results one can be interested in the size of the vectors produced when empty vectors are allowed. This is produced though the following lines, and the resulting plots are shown in {numref}`usecases_relauncherCodeMultiTypeKeyEmptyVectors`. {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/use_cases/" + language + "/relauncherCodeMultiTypeKeyEmptyVectors." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc3[language] + "\n" + "```" }} If the output file was not properly formatted, then one can have issues with this specific case (empty vectors). The consequences are shown in [](#use_cases_macro_relauncher_key_empty_vectors_failure). ## Graph {{ "```{" "figure" "} " + parent_dir + "/roottest/build/uranie/doc/relauncher/use_cases/" + language + "/key_vector/relauncherCodeMultiTypeKeyEmptyVectors.png\n" ":align: center\n" ":name: usecases_relauncherCodeMultiTypeKeyEmptyVectors\n" + figure_scale + "\n" "\n" "Graph of the macro **\"relauncherCodeMultiTypeKeyEmptyVectors." + extension + "\"**\n" "```" }}