--- myst: substitutions: bloc1: python: 16-24 cpp: 18-26 bloc2: python: 26-28 cpp: 36-38 dedent: python: ":dedent:\n" cpp: "" --- # Input file Input file formats supported by `TCodeEval` objects, include: - `TFlatScript`, Input file is created from scratch. Values are given in order separated by a blank separator. The default behaviour with respect to strings and vectors for this file, is to look like the DataServer format (from the {{Launch}} module): strings have no specific beginning/ending characters, as for the vectors whose delimiter is chosen to be a comma. - `TLineScript`, Input file is created from scratch. Each `TAttribute` values are written on a specific line. Changing attribute means changing line. It is the equivalent of the Column format (from the {{Launch}} module). - `TKeyScript`, Input file is created from an original file. Each `TAttribute` is associated to a keyword. Values are substituted using a *"keyword = value"* pattern. - `TFlagScript`, Input file is created from a template file. Each `TAttribute` is associated to a keyword. Each keyword is substituted directly by the current value. `TXmlScript` is not provided in this version The `addInput` method is used to declare parameters for all these file types. For `TFlatScript` and `TLineScript`, it takes a single argument: a pointer to a `TAttribute` object, while in the two other cases, the same first argument is completed by a `const char *` for the key. The declaration order is only significant when no key is specified (so for the `TFlatScript` and `TLineScript` files). {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/teval_trun/" + language + "/teval_trun." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc1[language] + "\n" + dedent[language] + "```" }} {{ "````{" "only" "} cpp" + "\n" + "A more condensed version of this `addInput` method exists for all these input types: the `setInputs` method. Here as well, it takes an extra compulsory argument, an integer which equals the number of attributes to come. The rest of the arguments are either a single pointer to a `TAttribute` object for the `TFlatScript` and `TLineScript` objects, or a pair composed of the same pointer directly followed by the key (for the two other input file types). Starting back from our example written above, one could condensate this into these lines:\n" + "\n" + "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/teval_trun/cpp/teval_trun.C\n" + ":language: cpp\n" + ":lines: 28-34\n" + "```\n" + "\n" + "````" }} Once done, the input files are provided to the `TCodeEval` object, using the `addInputFile` method, as shown below: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/relauncher/teval_trun/" + language + "/teval_trun." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc2[language] + "\n" + dedent[language] + "```" }}