ExperimentOutputs openExperimentOutputs(ExperimentOutputLayout layouts, MeasurementSuite measures, TableWriter results, Closer closer) throws IOException {
TableLayout resultLayout = layouts.getResultsLayout();
TableWriter allResults = results;
if (outputFile != null) {
TableWriter disk = closer.register(CSVWriter.open(outputFile, resultLayout));
allResults = new MultiplexedTableWriter(resultLayout, allResults, disk);
}
TableWriter user = null;
if (userOutputFile != null) {
user = closer.register(CSVWriter.open(userOutputFile, layouts.getUserLayout()));
}