make sure that all runs have the same number of parameters.
This commit is contained in:
parent
feae053bbc
commit
ca5cd4138a
@ -450,6 +450,23 @@ PmuppCollection PParamDataHandler::ReadDbFile(const QString fln, bool &valid)
|
|||||||
title += token[i];
|
title += token[i];
|
||||||
title = title.trimmed();
|
title = title.trimmed();
|
||||||
run.SetName(title);
|
run.SetName(title);
|
||||||
|
// check that the number of parameters is the same for all runs
|
||||||
|
if (collection.GetNoOfRuns() > 0) {
|
||||||
|
if (collection.GetRun(0).GetNoOfParam() != run.GetNoOfParam()) {
|
||||||
|
cerr << endl;
|
||||||
|
cerr << "----" << endl;
|
||||||
|
cerr << "**ERROR** in " << fln.toLatin1().data() << "." << endl;
|
||||||
|
cerr << " first run (#" << collection.GetRun(0).GetNumber() << ") has ";
|
||||||
|
cerr << collection.GetRun(0).GetNoOfParam() << " params." << endl;
|
||||||
|
cerr << " current run (#" << run.GetNumber() << ") has ";
|
||||||
|
cerr << run.GetNoOfParam() << " params!" << endl;
|
||||||
|
cerr << "Inspect your db-file!" << endl;
|
||||||
|
cerr << "----" << endl;
|
||||||
|
file.close();
|
||||||
|
valid = false;
|
||||||
|
return collection;
|
||||||
|
}
|
||||||
|
}
|
||||||
collection.AddRun(run);
|
collection.AddRun(run);
|
||||||
run.Clear();
|
run.Clear();
|
||||||
} else { // parameter
|
} else { // parameter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user