wmoo: campaign appends to output CSV
Usually you'll want to remove weathermonitor.csv before running the campaign. If you forgot that but desperately need the old or the new data, you can easily recover these manually (as they're separated by CSV headers). git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1115 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -32,12 +32,9 @@ bool WeathermonitorCampaign::run()
|
||||
{
|
||||
Logger log("Weathermonitor Campaign");
|
||||
|
||||
ifstream test(results_filename);
|
||||
if (test.is_open()) {
|
||||
log << results_filename << " already exists" << endl;
|
||||
return false;
|
||||
}
|
||||
ofstream results(results_filename);
|
||||
// non-destructive: due to the CSV header we can always manually recover
|
||||
// from an accident (append mode)
|
||||
ofstream results(results_filename, ios::out | ios::app);
|
||||
if (!results.is_open()) {
|
||||
log << "failed to open " << results_filename << endl;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user