Skip to content

Commit 7d55d57

Browse files
authored
Merge branch 'AliceO2Group:master' into alexianStuff
2 parents cd9c3f5 + f5db0cf commit 7d55d57

20 files changed

Lines changed: 77 additions & 30 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ include(GNUInstallDirs)
1313
# ---- Project ----
1414

1515
project(QualityControl
16-
VERSION 1.185.0
16+
VERSION 1.186.0
1717
DESCRIPTION "O2 Data Quality Control Framework"
1818
LANGUAGES C CXX)
1919

Framework/src/AggregatorRunner.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,7 @@ void AggregatorRunner::start(ServiceRegistryRef services)
380380
// register ourselves to the BK
381381
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;
383-
try {
384-
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, AggregatorRunner::getDetectorName(mAggregators), bkp::DplProcessType::QC_AGGREGATOR, "");
385-
} catch (std::runtime_error& error) {
386-
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
387-
}
383+
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, AggregatorRunner::getDetectorName(mAggregators), bkp::DplProcessType::QC_AGGREGATOR, "");
388384
}
389385
}
390386

Framework/src/Bookkeeping.cxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <unistd.h>
2323
#include <filesystem>
2424
#include <fstream>
25+
#include <thread>
2526

2627
using namespace o2::bkp::api;
2728

@@ -113,7 +114,14 @@ void Bookkeeping::registerProcess(int runNumber, const std::string& name, const
113114
if (!mInitialized) {
114115
return;
115116
}
116-
mClient->dplProcessExecution()->registerProcessExecution(runNumber, type, getHostName(), name, args, detector);
117+
118+
std::thread([this, runNumber, type, name, args, detector]() {
119+
try {
120+
this->mClient->dplProcessExecution()->registerProcessExecution(runNumber, type, getHostName(), name, args, detector);
121+
} catch (std::runtime_error& error) { // catch here because we are in a thread
122+
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
123+
}
124+
}).detach();
117125
}
118126

119127
std::vector<int> Bookkeeping::sendFlagsForSynchronous(uint32_t runNumber, const std::string& detectorName, const std::vector<QcFlag>& qcFlags)

Framework/src/CheckRunner.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,7 @@ void CheckRunner::start(ServiceRegistryRef services)
458458
// register ourselves to the BK
459459
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
460460
ILOG(Debug, Devel) << "Registering checkRunner to BookKeeping" << ENDM;
461-
try {
462-
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, mDetectorName, bkp::DplProcessType::QC_CHECKER, "");
463-
} catch (std::runtime_error& error) {
464-
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
465-
}
461+
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, mDetectorName, bkp::DplProcessType::QC_CHECKER, "");
466462
}
467463
}
468464

Framework/src/InfrastructureGenerator.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <Framework/ExternalFairMQDeviceProxy.h>
3939
#include <Framework/DataDescriptorQueryBuilder.h>
4040
#include <Framework/O2ControlParameters.h>
41+
#include <Framework/CommonLabels.h>
4142
#include <Mergers/MergerInfrastructureBuilder.h>
4243
#include <Mergers/MergerBuilder.h>
4344
#include <DataSampling/DataSampling.h>
@@ -568,6 +569,7 @@ void InfrastructureGenerator::generateLocalTaskRemoteProxy(framework::WorkflowSp
568569
if (!taskSpec.critical) {
569570
proxy.labels.emplace_back(framework::DataProcessorLabel{ "expendable" });
570571
}
572+
proxy.labels.emplace_back(framework::suppressDomainInfoLabel); // QC-1320
571573
// if not in RUNNING, we should drop all the incoming messages, we set the corresponding proxy option.
572574
enableDraining(proxy.options);
573575
if (getenv("O2_QC_KILL_PROXIES") != nullptr) {
@@ -607,6 +609,7 @@ void InfrastructureGenerator::generateMergers(framework::WorkflowSpec& workflow,
607609
mergerConfig.monitoringUrl = std::move(monitoringUrl);
608610
mergerConfig.detectorName = detectorName;
609611
mergerConfig.labels.push_back({ "resilient" });
612+
mergerConfig.labels.push_back(framework::suppressDomainInfoLabel); // QC-1320
610613
mergerConfig.publishMovingWindow = { enableMovingWindows ? PublishMovingWindow::Yes : PublishMovingWindow::No };
611614
mergerConfig.parallelismType = { (mergerConfig.inputObjectTimespan.value == InputObjectsTimespan::LastDifference) ? ParallelismType::RoundRobin : ParallelismType::SplitInputs };
612615
mergersBuilder.setConfig(mergerConfig);

Framework/src/PostProcessingRunner.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,7 @@ void PostProcessingRunner::start(framework::ServiceRegistryRef dplServices)
189189
// register ourselves to the BK
190190
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;
192-
try {
193-
Bookkeeping::getInstance().registerProcess(mActivity.mId, mRunnerConfig.taskName, mRunnerConfig.detectorName, bkp::DplProcessType::QC_POSTPROCESSING, "");
194-
} catch (std::runtime_error& error) {
195-
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
196-
}
192+
Bookkeeping::getInstance().registerProcess(mActivity.mId, mRunnerConfig.taskName, mRunnerConfig.detectorName, bkp::DplProcessType::QC_POSTPROCESSING, "");
197193
}
198194

199195
if (mTaskState == TaskState::Created || mTaskState == TaskState::Finished) {

Framework/src/TaskRunner.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,7 @@ void TaskRunner::registerToBookkeeping()
437437
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
438438
// register ourselves to the BK at the first cycle
439439
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
440-
try {
441-
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bkp::DplProcessType::QC_TASK, "");
442-
} catch (std::runtime_error& error) {
443-
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
444-
}
440+
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bkp::DplProcessType::QC_TASK, "");
445441
}
446442
}
447443

Modules/TPC/include/TPC/CalPadClusterReductor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
#define QC_MODULE_TPC_CALPADCLUSTERDUCTOR_H
1818

1919
#include "QualityControl/ReductorTObject.h"
20+
#if __has_include("TPCBase/CalDet.h")
2021
#include "TPCBase/CalDet.h"
22+
#else
23+
#include "TPCBaseRecSim/CalDet.h"
24+
#endif
2125
#include "TPCBase/CalArray.h"
2226
#include "TPCQC/Clusters.h"
2327

Modules/TPC/include/TPC/ROCReductor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#define QC_MODULE_TPC_ROCREDUCTOR_H
1919

2020
#include "QualityControl/ReductorTObject.h"
21+
#if __has_include("TPCBase/CalDet.h")
2122
#include "TPCBase/CalDet.h"
23+
#else
24+
#include "TPCBaseRecSim/CalDet.h"
25+
#endif
2226
//#include "CCDB/TObjectWrapper.h"
2327

2428
namespace o2::quality_control_modules::tpc

Modules/TPC/include/TPC/Utility.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
#include "QualityControl/ObjectsManager.h"
2121
#include "QualityControl/CustomParameters.h"
2222

23+
#if __has_include("TPCBase/CalDet.h")
2324
#include "TPCBase/CalDet.h"
25+
#else
26+
#include "TPCBaseRecSim/CalDet.h"
27+
#endif
2428
#include "DataFormatsTPC/ClusterNative.h"
2529
#include "DataFormatsTPC/WorkflowHelper.h"
2630
#include "Framework/ProcessingContext.h"
@@ -114,4 +118,4 @@ void retrieveStatistics(std::vector<double>& values, std::vector<double>& errors
114118
/// \param stddev float&, reference to float that should store stddev of mean
115119
void calcMeanAndStddev(const std::vector<float>& values, float& mean, float& stddev);
116120
} // namespace o2::quality_control_modules::tpc
117-
#endif // QUALITYCONTROL_TPCUTILITY_H
121+
#endif // QUALITYCONTROL_TPCUTILITY_H

0 commit comments

Comments
 (0)