Check if only one ROC point is in the file
| 240 | |
| 241 | //Check if only one ROC point is in the file |
| 242 | bool fileHasSinglePoint(const QString &evalFile) { |
| 243 | QFile file(evalFile); |
| 244 | bool success = file.open(QFile::ReadOnly); |
| 245 | if (!success) qFatal("Failed to open %s for reading.", qPrintable(evalFile)); |
| 246 | QStringList lines = QString(file.readAll()).split("\n"); |
| 247 | file.close(); |
| 248 | |
| 249 | int rocCnt = 0; |
| 250 | foreach (const QString &line, lines) { |
| 251 | if (line.contains("DiscreteROC")) { |
| 252 | rocCnt++; |
| 253 | } |
| 254 | if (rocCnt > 1) |
| 255 | return false; |
| 256 | } |
| 257 | |
| 258 | return true; |
| 259 | } |
| 260 | |
| 261 | //Check all files to see if any single file has only have one ROC point |
| 262 | bool filesHaveSinglePoint(const QStringList &files) { |
no test coverage detected