Skip to content

Commit c7052ad

Browse files
committed
Revert "[QC-429] Propagating the validity through QC chain, but do not use it (#1902)" (#1917)
This reverts commit 89b6a59.
1 parent d52f191 commit c7052ad

4 files changed

Lines changed: 5 additions & 21 deletions

File tree

Framework/src/AggregatorRunner.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,6 @@ void AggregatorRunner::store(QualityObjectsType& qualityObjects)
240240
for (auto& qo : qualityObjects) {
241241
mDatabase->storeQO(qo);
242242
}
243-
if (!qualityObjects.empty()) {
244-
auto& qo = qualityObjects.at(0);
245-
ILOG(Info, Devel) << "Validity of QO '" << qo->GetName() << "' is (" << qo->getValidity().getMin() << ", " << qo->getValidity().getMax() << ")" << ENDM;
246-
}
247243
} catch (boost::exception& e) {
248244
ILOG(Info, Devel) << "Unable to " << diagnostic_information(e) << ENDM;
249245
}

Framework/src/CcdbDatabase.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ void CcdbDatabase::storeQO(std::shared_ptr<const o2::quality_control::core::Qual
287287
if (to == -1 || to == 0 || validity.getMax() == gInvalidValidityInterval.getMax() || validity.getMax() == gFullValidityInterval.getMax()) {
288288
to = from + 1000l * 60 * 60 * 24 * 365 * 10; // ~10 years since the start of validity
289289
}
290-
291290
if (from >= to) {
292291
ILOG(Error, Support) << "The start validity of '" << qo->GetName() << "' is not earlier than the end (" << from << ", " << to << "). The object will not be stored" << ENDM;
293292
return;

Framework/src/CheckRunner.cxx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,12 @@ void CheckRunner::store(QualityObjectsType& qualityObjects, long validFrom)
379379
ILOG(Debug, Devel) << "Storing " << qualityObjects.size() << " QualityObjects" << ENDM;
380380
try {
381381
for (auto& qo : qualityObjects) {
382-
auto tmpValidity = qo->getValidity();
383-
qo->setValidity(ValidityInterval{ static_cast<unsigned long>(validFrom), validFrom + 10ull * 365 * 24 * 60 * 60 * 1000 });
382+
qo->setActivity(*mActivity);
383+
qo->getActivity().mValidity.set(validFrom, 0);
384384
mDatabase->storeQO(qo);
385-
qo->setValidity(tmpValidity);
386385
mTotalNumberQOStored++;
387386
mNumberQOStored++;
388387
}
389-
390-
if (!qualityObjects.empty()) {
391-
auto& qo = qualityObjects.at(0);
392-
ILOG(Info, Devel) << "New validity of QO '" << qo->GetName() << "' would be (" << qo->getValidity().getMin() << ", " << qo->getValidity().getMax() << ")" << ENDM;
393-
}
394388
} catch (boost::exception& e) {
395389
ILOG(Info, Support) << "Unable to " << diagnostic_information(e) << ENDM;
396390
}
@@ -401,17 +395,12 @@ void CheckRunner::store(std::vector<std::shared_ptr<MonitorObject>>& monitorObje
401395
ILOG(Debug, Devel) << "Storing " << monitorObjects.size() << " MonitorObjects" << ENDM;
402396
try {
403397
for (auto& mo : monitorObjects) {
404-
auto tmpValidity = mo->getValidity();
405-
mo->setValidity(ValidityInterval{ static_cast<unsigned long>(validFrom), validFrom + 10ull * 365 * 24 * 60 * 60 * 1000 });
398+
mo->setActivity(*mActivity);
399+
mo->getActivity().mValidity.set(validFrom, 0);
406400
mDatabase->storeMO(mo);
407-
mo->setValidity(tmpValidity);
408401
mTotalNumberMOStored++;
409402
mNumberMOStored++;
410403
}
411-
if (!monitorObjects.empty()) {
412-
auto& mo = monitorObjects.at(0);
413-
ILOG(Info, Devel) << "New validity of MO '" << mo->GetName() << "' would be (" << mo->getValidity().getMin() << ", " << mo->getValidity().getMax() << ")" << ENDM;
414-
}
415404
} catch (boost::exception& e) {
416405
ILOG(Info, Support) << "Unable to " << diagnostic_information(e) << ENDM;
417406
}

Framework/src/TaskRunner.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ void TaskRunner::finishCycle(DataAllocator& outputs)
510510

511511
// this stays until we move to using mTimekeeper.
512512
auto nowMs = getCurrentTimestamp();
513-
mObjectsManager->setValidity(mTimekeeper->getValidity());
513+
mObjectsManager->setValidity(ValidityInterval{ nowMs, nowMs + 1000l * 60 * 60 * 24 * 365 * 10 });
514514
mNumberObjectsPublishedInCycle += publish(outputs);
515515
mTotalNumberObjectsPublished += mNumberObjectsPublishedInCycle;
516516
saveToFile();

0 commit comments

Comments
 (0)