public void generateCsvHeats(String filename, HeatSet[] selectedHeatsets) throws IOException {
Vector<Heat> heats = getHeats(selectedHeatsets);
resetStartId();
CsvWriter writer = new CsvWriter();
writer.initialize(filename);
writer.open();
for (Heat heat : heats) {
appendCsvHeat(heat, writer);
}
writer.close();
}