private ConsoleWriterService( TunableParameterService parameterService, DataSetInformationService dataSetInformationService) { _saveAsSampleRun = parameterService.getSaveAsSampleRun(); if (_saveAsSampleRun) { String filepath = "output/sample_runs/"; String timestamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime()); _filename = filepath.concat(dataSetInformationService.getDescription()).concat(timestamp); try { _output = new PrintStream(_filename); } catch (FileNotFoundException e) { e.printStackTrace(); } } }
/** Public constructor */ private ConsoleWriterService() { this(TunableParameterService.getInstance(), DataSetInformationService.getInstance()); }