Hook

Tasks are mute pieces of software. They are not conceived to write files, display values, nor more generally present
any side effects at all. Tasks' role is to compute some output data from their input data. That's what guaranties that
their execution can be deported to other machines.

OpenMOLE introduces a mechanism called Hooks to save or display results generated on remote environments. Hooks
are conceived to perform an action upon completion of the task they are attached to.

Save your data as CSV

The path is expanded using the variables from the dataflow (expressions between ${} are evaluated and replaced).

The optional last parameter of AppendToCSVFileHook is the list of variables to write to the CSV file. The
default behaviour when this list is not specified is to dump all the variables from the dataflow to the file. You
can restrict this behaviour by listing only the variables you want to save

Some additional optional parameters can be set by calling the function set on the newly
created Hook.
Setting csvHeader := Col1, Col2, ColZ customises the header of the CSV file to be created
with the string it receives as a parameter. Please note that this only happens if the file doesn't exist when the
hook is executed.
singleRow := true forces the flattening of the input lists such that all variables values
are written to a single row/line of the CSV file.

This workflow demonstrates the optional behaviour of AppendToCSVFileHook:

Append some content to a file

Similarly to the AppendToFileHook, any string can be appended to a file, using the more general
AppendToFileHook. The appended strings can be a combination of variables from the dataflow and plain text.