From e5ba51a65fd77485f8aebfd4ef25838f3fbe4856 Mon Sep 17 00:00:00 2001 From: Laurent Aphecetche Date: Fri, 17 Apr 2020 16:20:47 +0200 Subject: [PATCH 1/2] The MCHMappingFactory library will disappear in O2 This commit lets the MCH QC Module handle gracefully that removal. --- Modules/MUON/MCH/CMakeLists.txt | 11 +++++------ Modules/MUON/MCH/include/MCH/PedestalsTask.h | 1 - Modules/MUON/MCH/src/Mapping.cxx | 5 ++++- Modules/MUON/MCH/src/PedestalsTask.cxx | 6 ++++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Modules/MUON/MCH/CMakeLists.txt b/Modules/MUON/MCH/CMakeLists.txt index 094f92e2a7..010364d8f8 100644 --- a/Modules/MUON/MCH/CMakeLists.txt +++ b/Modules/MUON/MCH/CMakeLists.txt @@ -28,8 +28,10 @@ target_include_directories( PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ) -#target_link_libraries(${MODULE_NAME} PUBLIC QualityControl) -target_link_libraries(${MODULE_NAME} PUBLIC QualityControl O2::CommonDataFormat O2::GPUCommon O2::MCHMappingFactory O2::MCHMappingImpl3 O2::MCHMappingSegContour) +target_link_libraries(${MODULE_NAME} PUBLIC QualityControl O2::CommonDataFormat O2::GPUCommon + $ O2::MCHMappingImpl3 O2::MCHMappingSegContour) + +target_compile_definitions(${MODULE_NAME} PRIVATE $<$:MCH_HAS_MAPPING_FACTORY>) install( TARGETS ${MODULE_NAME} @@ -40,8 +42,6 @@ install( # ---- ROOT dictionary ---- -#generate_root_dict(MODULE_NAME ${MODULE_NAME} LINKDEF "include/MCH/LinkDef.h" DICT_CLASS "${MODULE_NAME}Dict") - add_root_dictionary(${MODULE_NAME} HEADERS include/MCH/Mapping.h include/MCH/Decoding.h @@ -49,8 +49,7 @@ add_root_dictionary(${MODULE_NAME} include/MCH/PhysicsTask.h include/MCH/PedestalsCheck.h include/MCH/sampa_header.h - LINKDEF include/MCH/LinkDef.h - BASENAME ${MODULE_NAME}) + LINKDEF include/MCH/LinkDef.h) # ---- Tests ---- diff --git a/Modules/MUON/MCH/include/MCH/PedestalsTask.h b/Modules/MUON/MCH/include/MCH/PedestalsTask.h index 52bb53f6d0..984c10ebe8 100644 --- a/Modules/MUON/MCH/include/MCH/PedestalsTask.h +++ b/Modules/MUON/MCH/include/MCH/PedestalsTask.h @@ -8,7 +8,6 @@ #include "QualityControl/TaskInterface.h" #include "MCH/Mapping.h" -#include "MCHMappingFactory/CreateSegmentation.h" #include "MCH/Decoding.h" #include "MCHBase/Digit.h" diff --git a/Modules/MUON/MCH/src/Mapping.cxx b/Modules/MUON/MCH/src/Mapping.cxx index fa0e004a6e..6a78149978 100644 --- a/Modules/MUON/MCH/src/Mapping.cxx +++ b/Modules/MUON/MCH/src/Mapping.cxx @@ -5,8 +5,11 @@ #include "QualityControl/QcInfoLogger.h" #include "MCH/Mapping.h" -//#include "MCHMappingInterface/Segmentation.h" +#ifdef MCH_HAS_MAPPING_FACTORY #include "MCHMappingFactory/CreateSegmentation.h" +#else +#include "MCHMappingInterface/Segmentation.h" +#endif using namespace std; diff --git a/Modules/MUON/MCH/src/PedestalsTask.cxx b/Modules/MUON/MCH/src/PedestalsTask.cxx index f6f7c10cdb..7e69da81a9 100644 --- a/Modules/MUON/MCH/src/PedestalsTask.cxx +++ b/Modules/MUON/MCH/src/PedestalsTask.cxx @@ -19,7 +19,9 @@ #include "MCHMappingInterface/Segmentation.h" #include "MCHMappingInterface/CathodeSegmentation.h" #include "MCHRawElecMap/Mapper.h" - +#ifdef MCH_HAS_MAPPING_FACTORY +#include "MCHMappingFactory/CreateSegmentation.h" +#endif //#define QC_MCH_SAVE_TEMP_ROOTFILE using namespace std; @@ -450,7 +452,7 @@ void PedestalsTask::monitorDataReadout(o2::framework::ProcessingContext& ctx) void PedestalsTask::monitorDataDigits(const o2::framework::DataRef& input) { - //QcInfoLogger::GetInstance() << "monitorDataDigits" << AliceO2::InfoLogger::InfoLogger::endm; +//QcInfoLogger::GetInstance() << "monitorDataDigits" << AliceO2::InfoLogger::InfoLogger::endm; #ifdef QC_MCH_SAVE_TEMP_ROOTFILE if ((count % 10) == 0 /*&& count <= 5000*/) { From dd1f9b979c67932d8a996e026c6478c95c913689 Mon Sep 17 00:00:00 2001 From: Laurent Aphecetche Date: Fri, 17 Apr 2020 17:11:44 +0200 Subject: [PATCH 2/2] clang-format --- Modules/MUON/MCH/src/PedestalsTask.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/MUON/MCH/src/PedestalsTask.cxx b/Modules/MUON/MCH/src/PedestalsTask.cxx index 7e69da81a9..9ea3bded63 100644 --- a/Modules/MUON/MCH/src/PedestalsTask.cxx +++ b/Modules/MUON/MCH/src/PedestalsTask.cxx @@ -452,7 +452,7 @@ void PedestalsTask::monitorDataReadout(o2::framework::ProcessingContext& ctx) void PedestalsTask::monitorDataDigits(const o2::framework::DataRef& input) { -//QcInfoLogger::GetInstance() << "monitorDataDigits" << AliceO2::InfoLogger::InfoLogger::endm; + //QcInfoLogger::GetInstance() << "monitorDataDigits" << AliceO2::InfoLogger::InfoLogger::endm; #ifdef QC_MCH_SAVE_TEMP_ROOTFILE if ((count % 10) == 0 /*&& count <= 5000*/) {