Skip to content

Commit ad59c78

Browse files
pillotdavidrohr
authored andcommitted
turn error into warning and continue the scan
1 parent c711285 commit ad59c78

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Detectors/MUON/MCH/Conditions/src/scan-hvlv-ccdb.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ void fillDataPoints(const std::vector<DPVAL>& dps, std::map<uint64_t, double>& d
479479
auto previousTS = dps2.rbegin()->first;
480480
if (ts != previousTS || getValue(*itDP) != dps2.rbegin()->second) {
481481
if (ts <= previousTS) {
482-
printf("error: wrong data point order (%llu <= %llu)\n", (ULL)ts, (ULL)previousTS);
483-
exit(1);
482+
printf("\e[0;31mwarning: wrong data point order (%llu <= %llu)\e[0m\n", (ULL)ts, (ULL)previousTS);
484483
}
485484
if (printWarning) {
486485
printf("%s%s missing the previous data point (dt = %s%llu ms)", color.c_str(), header.c_str(),
@@ -512,8 +511,9 @@ void fillDataPoints(const std::vector<DPVAL>& dps, std::map<uint64_t, double>& d
512511
for (++itDP; itDP < dps.end(); ++itDP) {
513512
ts = itDP->get_epoch_time();
514513
if (ts <= previousTS) {
515-
printf("error: wrong data point order (%llu <= %llu)\n", (ULL)ts, (ULL)previousTS);
516-
exit(1);
514+
printf("\e[0;31mwarning: wrong data point order (%llu <= %llu)\e[0m\n", (ULL)ts, (ULL)previousTS);
515+
} else {
516+
previousTS = ts;
517517
}
518518
if (ts < tMin && (warningLevel > 1 || (warningLevel == 1 && ts + tolerance < tMin))) {
519519
printf("%s%s data point outside of file validity range (dt = -%llu ms)\e[0m\n",
@@ -523,7 +523,6 @@ void fillDataPoints(const std::vector<DPVAL>& dps, std::map<uint64_t, double>& d
523523
header.c_str(), (ULL)(ts - tMax));
524524
}
525525
dps2.emplace(ts, getValue(*itDP));
526-
previousTS = ts;
527526
}
528527
}
529528

0 commit comments

Comments
 (0)