Skip to content

Commit b9b2bd1

Browse files
committed
[QC-1296] Registering the QC tasks in BK must be the default behaviour
1 parent 622afde commit b9b2bd1

File tree

4 files changed

+4
-17
lines changed

4 files changed

+4
-17
lines changed

Framework/src/AggregatorRunner.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void AggregatorRunner::start(ServiceRegistryRef services)
378378
}
379379

380380
// register ourselves to the BK
381-
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
381+
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
382382
ILOG(Debug, Devel) << "Registering aggregator to BookKeeping" << ENDM;
383383
try {
384384
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, AggregatorRunner::getDetectorName(mAggregators), bkp::DplProcessType::QC_AGGREGATOR, "");

Framework/src/CheckRunner.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ void CheckRunner::start(ServiceRegistryRef services)
455455
}
456456

457457
// register ourselves to the BK
458-
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
458+
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
459459
ILOG(Debug, Devel) << "Registering checkRunner to BookKeeping" << ENDM;
460460
try {
461461
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, mDetectorName, bkp::DplProcessType::QC_CHECKER, "");

Framework/src/PostProcessingRunner.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void PostProcessingRunner::start(framework::ServiceRegistryRef dplServices)
187187
QcInfoLogger::setRun(mActivity.mId);
188188

189189
// register ourselves to the BK
190-
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
190+
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
191191
ILOG(Debug, Devel) << "Registering pp task to BookKeeping" << ENDM;
192192
try {
193193
Bookkeeping::getInstance().registerProcess(mActivity.mId, mRunnerConfig.taskName, mRunnerConfig.detectorName, bkp::DplProcessType::QC_POSTPROCESSING, "");

Framework/src/TaskRunner.cxx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,6 @@ void TaskRunner::start(ServiceRegistryRef services)
306306
mNoMoreCycles = false;
307307
mCycleNumber = 0;
308308

309-
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK_AT_START")) {
310-
// until we are sure it works, we have to turn it on
311-
registerToBookkeeping();
312-
}
313-
314309
try {
315310
startOfActivity();
316311
startCycle();
@@ -442,13 +437,6 @@ void TaskRunner::registerToBookkeeping()
442437
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
443438
try {
444439
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bkp::DplProcessType::QC_TASK, "");
445-
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES")) {
446-
ILOG(Debug, Devel) << "O2_QC_REGISTER_IN_BK_X_TIMES set to " << gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES") << ENDM;
447-
int iterations = std::stoi(gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES"));
448-
for (int i = 1; i < iterations; i++) { // start at 1 because we already did it once
449-
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bkp::DplProcessType::QC_TASK, "");
450-
}
451-
}
452440
} catch (std::runtime_error& error) {
453441
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
454442
}
@@ -465,8 +453,7 @@ void TaskRunner::finishCycle(DataAllocator& outputs)
465453
<< "(" << mTimekeeper->getTimerangeIdRange().getMin() << ", " << mTimekeeper->getTimerangeIdRange().getMax() << ")" << ENDM;
466454
mTask->endOfCycle();
467455

468-
if (mCycleNumber == 0 && gSystem->Getenv("O2_QC_REGISTER_IN_BK")) {
469-
// until we are sure it works, we have to turn it on
456+
if (mCycleNumber == 0) { // register at the end of the first cycle
470457
registerToBookkeeping();
471458
}
472459

0 commit comments

Comments
 (0)