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..9ea3bded63 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;