diff --git a/CMakeLists.txt b/CMakeLists.txt index baf519751..4c4d11bd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -363,6 +363,7 @@ set(R3BROOT_MAJOR_VERSION 0) set(R3BROOT_MINOR_VERSION 0) set(R3BROOT_PATCH_VERSION 0) set(R3BROOT_VERSION "${FairRoot_VERSION}") +set(R3BROOTPATH ${CMAKE_BINARY_DIR}) if(NOT DEFINED ROOT_FOUND_VERSION) set(ROOT_FOUND_VERSION "${found_vers}") diff --git a/cmake/modules/WriteConfigFile_r3b.cmake b/cmake/modules/WriteConfigFile_r3b.cmake index b22da0acc..3088c9aaa 100644 --- a/cmake/modules/WriteConfigFile_r3b.cmake +++ b/cmake/modules/WriteConfigFile_r3b.cmake @@ -11,215 +11,201 @@ # or submit itself to any jurisdiction. # ############################################################################## -MACRO (WRITE_CONFIG_FILE filename) - - String(REGEX REPLACE "^.*(install).*$" "\\1" INSTALL_VERSION ${filename}) - String(COMPARE EQUAL "install" "${INSTALL_VERSION}" INSTALL_TRUE) - - List(REMOVE_ITEM LD_LIBRARY_PATH ${CMAKE_BINARY_DIR}/lib) - - If (INSTALL_TRUE) - SET(_INSTALLDIR ${CMAKE_INSTALL_PREFIX}) - SET(_BINDIR ${CMAKE_INSTALL_PREFIX}/bin) -# SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase) - SET(FAIRLIBDIR ${CMAKE_INSTALL_PREFIX}/lib) - SET(_LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH}) - Else (INSTALL_TRUE) - SET(_INSTALLDIR ${CMAKE_BINARY_DIR}) - SET(_BINDIR ${CMAKE_BINARY_DIR}) -# SET(VMCWORKDIR ${CMAKE_SOURCE_DIR}) - SET(FAIRLIBDIR ${CMAKE_BINARY_DIR}/lib) - SET(_LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH}) - EndIf (INSTALL_TRUE) - - If(NOT DEFINED FULL_CONFIG_FILE) - Set(FULL_CONFIG_FILE "true") - EndIf(NOT DEFINED FULL_CONFIG_FILE) - - - IF(CMAKE_SYSTEM_NAME MATCHES Linux) - IF(FAIRROOTPATH) - configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh - ) - configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system.csh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh - ) - ELSE(FAIRROOTPATH) - configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh - ) - configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system.csh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh - ) - ENDIF(FAIRROOTPATH) - - EXECUTE_PROCESS(COMMAND lsb_release -sd - OUTPUT_VARIABLE _linux_flavour - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - IF(_linux_flavour) - STRING(REGEX REPLACE "^\"" "" _linux_flavour ${_linux_flavour}) - STRING(REGEX REPLACE "\"$" "" _linux_flavour ${_linux_flavour}) - ENDIF(_linux_flavour) - - EXECUTE_PROCESS(COMMAND uname -m - OUTPUT_VARIABLE _system - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - ElseIf(CMAKE_SYSTEM_NAME MATCHES Darwin) - IF(FAIRROOTPATH) - configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system_mac.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh - ) - configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system_mac.csh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh - ) - ELSE(FAIRROOTPATH) - configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system_mac.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh - ) - configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system_mac.csh.in - ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh - ) - ENDIF(FAIRROOTPATH) - EXECUTE_PROCESS(COMMAND uname -sr - OUTPUT_VARIABLE _linux_flavour - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - EXECUTE_PROCESS(COMMAND uname -m - OUTPUT_VARIABLE _system - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux) - - - CONVERT_LIST_TO_STRING(${Geant4_INCLUDE_DIRS}) - Set(Geant4_INCLUDE_DIRS ${output}) - - CONVERT_LIST_TO_STRING(${Geant4VMC_INCLUDE_DIRS}) - Set(Geant4VMC_INCLUDE_DIRS ${output}) - - CONVERT_LIST_TO_STRING(${Geant4VMC_CMAKE_INSTALL_LIBDIR}) - Set(Geant4VMC_LIBRARY_DIR ${output}) - - CONVERT_LIST_TO_STRING(${Geant4VMC_MACRO_DIR}) - Set(Geant4VMC_MACRO_DIR ${output}) - - Write_Geant4Data_Variables_sh() - Write_Geant4Data_Variables_csh() - - CONVERT_LIST_TO_STRING(${PLUTO_LIBRARY_DIR}) - Set(PLUTO_LIBRARY_DIR ${output}) - - CONVERT_LIST_TO_STRING(${PLUTO_INCLUDE_DIR}) - Set(PLUTO_INCLUDE_DIR ${output}) - - CONVERT_LIST_TO_STRING(${PYTHIA6_LIBRARY_DIR}) - Set(PYTHIA6_LIBRARY_DIR ${output}) - - CONVERT_LIST_TO_STRING(${Geant3_SYSTEM_DIR}) - Set(G3SYS ${output}) - - CONVERT_LIST_TO_STRING(${Geant3_INCLUDE_DIRS}) - Set(Geant3_INCLUDE_DIRS ${output}) - - CONVERT_LIST_TO_STRING(${Geant3_LIBRARY_DIR}) - Set(Geant3_LIBRARY_DIR ${output}) - - CONVERT_LIST_TO_STRING(${Geant3_LIBRARIES}) - Set(Geant3_LIBRARIES ${output}) - - CONVERT_LIST_TO_STRING(${ROOT_LIBRARY_DIR}) - Set(ROOT_LIBRARY_DIR ${output}) - - CONVERT_LIST_TO_STRING(${ROOT_LIBRARIES}) - Set(ROOT_LIBRARIES ${output}) - - CONVERT_LIST_TO_STRING(${ROOT_INCLUDE_DIR}) - Set(ROOT_INCLUDE_DIR ${output} ) - -# Set(VMCWORKDIR ${C}) - - Set(FAIRLIBDIR ${FAIRLIBDIR}) - - List(REMOVE_DUPLICATES _LD_LIBRARY_PATH) - CONVERT_LIST_TO_STRING(${_LD_LIBRARY_PATH}) - - IF(CMAKE_SYSTEM_NAME MATCHES Linux) - Set(MY_LD_LIBRARY_PATH ${output}) - ELSE(CMAKE_SYSTEM_NAME MATCHES Linux) - IF(CMAKE_SYSTEM_NAME MATCHES Darwin) - Set(MY_DYLD_LIBRARY_PATH ${output}) - ENDIF(CMAKE_SYSTEM_NAME MATCHES Darwin) - ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux) - - Set(USE_VGM 1) - - SET(PYTHONPATH ${CMAKE_SOURCE_DIR}/python ${SIMPATH}/lib ${SIMPATH}/lib/root ${SIMPATH}/lib/Geant4 ${SIMPATH}/lib/g4py ${PYTHONPATH}) - UNIQUE(PYTHONPATH "${PYTHONPATH}") - CONVERT_LIST_TO_STRING(${PYTHONPATH}) - SET(MY_PYTHONPATH ${output}) +macro(WRITE_CONFIG_FILE filename) + + string(REGEX REPLACE "^.*(install).*$" "\\1" INSTALL_VERSION ${filename}) + string(COMPARE EQUAL "install" "${INSTALL_VERSION}" INSTALL_TRUE) + + list(REMOVE_ITEM LD_LIBRARY_PATH ${CMAKE_BINARY_DIR}/lib) + + if(INSTALL_TRUE) + set(_INSTALLDIR ${CMAKE_INSTALL_PREFIX}) + set(_BINDIR ${CMAKE_INSTALL_PREFIX}/bin) + # SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/fairbase) + set(FAIRLIBDIR ${CMAKE_INSTALL_PREFIX}/lib) + set(_LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH}) + else(INSTALL_TRUE) + set(_INSTALLDIR ${CMAKE_BINARY_DIR}) + set(_BINDIR ${CMAKE_BINARY_DIR}) + # SET(VMCWORKDIR ${CMAKE_SOURCE_DIR}) + set(FAIRLIBDIR ${CMAKE_BINARY_DIR}/lib) + set(_LD_LIBRARY_PATH ${FAIRLIBDIR} ${LD_LIBRARY_PATH}) + endif(INSTALL_TRUE) + + if(NOT DEFINED FULL_CONFIG_FILE) + set(FULL_CONFIG_FILE "true") + endif(NOT DEFINED FULL_CONFIG_FILE) + + if(CMAKE_SYSTEM_NAME MATCHES Linux) + if(FAIRROOTPATH) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system.csh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh) + else(FAIRROOTPATH) + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh) + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system.csh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh) + endif(FAIRROOTPATH) + + execute_process( + COMMAND lsb_release -sd + OUTPUT_VARIABLE _linux_flavour + OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(_linux_flavour) + string(REGEX REPLACE "^\"" "" _linux_flavour ${_linux_flavour}) + string(REGEX REPLACE "\"$" "" _linux_flavour ${_linux_flavour}) + endif(_linux_flavour) + + execute_process( + COMMAND uname -m + OUTPUT_VARIABLE _system + OUTPUT_STRIP_TRAILING_WHITESPACE) + + elseif(CMAKE_SYSTEM_NAME MATCHES Darwin) + if(FAIRROOTPATH) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system_mac.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/check_system_mac.csh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh) + else(FAIRROOTPATH) + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system_mac.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.sh) + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/check_system_mac.csh.in + ${CMAKE_CURRENT_BINARY_DIR}/check_system.csh) + endif(FAIRROOTPATH) + execute_process( + COMMAND uname -sr + OUTPUT_VARIABLE _linux_flavour + OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process( + COMMAND uname -m + OUTPUT_VARIABLE _system + OUTPUT_STRIP_TRAILING_WHITESPACE) + endif(CMAKE_SYSTEM_NAME MATCHES Linux) + + convert_list_to_string(${Geant4_INCLUDE_DIRS}) + set(Geant4_INCLUDE_DIRS ${output}) + + convert_list_to_string(${Geant4VMC_INCLUDE_DIRS}) + set(Geant4VMC_INCLUDE_DIRS ${output}) + + convert_list_to_string(${Geant4VMC_CMAKE_INSTALL_LIBDIR}) + set(Geant4VMC_LIBRARY_DIR ${output}) + + convert_list_to_string(${Geant4VMC_MACRO_DIR}) + set(Geant4VMC_MACRO_DIR ${output}) + + write_geant4data_variables_sh() + write_geant4data_variables_csh() + + convert_list_to_string(${PLUTO_LIBRARY_DIR}) + set(PLUTO_LIBRARY_DIR ${output}) + + convert_list_to_string(${PLUTO_INCLUDE_DIR}) + set(PLUTO_INCLUDE_DIR ${output}) + + convert_list_to_string(${PYTHIA6_LIBRARY_DIR}) + set(PYTHIA6_LIBRARY_DIR ${output}) + + convert_list_to_string(${Geant3_SYSTEM_DIR}) + set(G3SYS ${output}) + + convert_list_to_string(${Geant3_INCLUDE_DIRS}) + set(Geant3_INCLUDE_DIRS ${output}) + + convert_list_to_string(${Geant3_LIBRARY_DIR}) + set(Geant3_LIBRARY_DIR ${output}) + + convert_list_to_string(${Geant3_LIBRARIES}) + set(Geant3_LIBRARIES ${output}) + + convert_list_to_string(${ROOT_LIBRARY_DIR}) + set(ROOT_LIBRARY_DIR ${output}) + + convert_list_to_string(${ROOT_LIBRARIES}) + set(ROOT_LIBRARIES ${output}) + + convert_list_to_string(${ROOT_INCLUDE_DIR}) + set(ROOT_INCLUDE_DIR ${output}) + + # Set(VMCWORKDIR ${C}) + + set(FAIRLIBDIR ${FAIRLIBDIR}) + + list(REMOVE_DUPLICATES _LD_LIBRARY_PATH) + convert_list_to_string(${_LD_LIBRARY_PATH}) + + if(CMAKE_SYSTEM_NAME MATCHES Linux) + set(MY_LD_LIBRARY_PATH ${output}) + else(CMAKE_SYSTEM_NAME MATCHES Linux) + if(CMAKE_SYSTEM_NAME MATCHES Darwin) + set(MY_DYLD_LIBRARY_PATH ${output}) + endif(CMAKE_SYSTEM_NAME MATCHES Darwin) + endif(CMAKE_SYSTEM_NAME MATCHES Linux) + + set(USE_VGM 1) - # TODO: this should change to CMAKE_INSTALL_PREFIX/bin in the future - SET (PATH ${ROOTSYS}/bin ${CMAKE_BINARY_DIR}/bin ${PATH}) - UNIQUE(PATH "${PATH}") - CONVERT_LIST_TO_STRING(${PATH}) - Set(MY_PATH ${output}) - - If(FAIRSOFT_EXTERN) - Set(PYTHIA8DATA "${SIMPATH}/share/pythia8/xmldoc") - Else(FAIRSOFT_EXTERN) - Set(PYTHIA8DATA "${SIMPATH}/generators/pythia8/xmldoc") - EndIf(FAIRSOFT_EXTERN) - - CONVERT_LIST_TO_STRING($ENV{NEW_CLASSPATH}) - Set(MY_CLASSPATH ${output}) - - CONVERT_LIST_TO_STRING(${ROOT_INCLUDE_PATH}) - Set(ROOT_INCLUDE_PATH ${output}) - - IF(${filename} MATCHES "[.]csh.*$") - IF( R3BROOTPATH ) - configure_file( ${PROJECT_SOURCE_DIR}/cmake/scripts/config.csh.in ${CMAKE_CURRENT_BINARY_DIR}/${filename} ) - ELSEIF( R3BROOTPATH ) - configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/config.csh.in - ${CMAKE_CURRENT_BINARY_DIR}/${filename} - ) - ENDIF( R3BROOTPATH ) - - - ELSE(${filename} MATCHES "[.]csh.*$") - if( R3BROOTPATH ) - configure_file( ${PROJECT_SOURCE_DIR}/cmake/scripts/config.sh.in ${CMAKE_CURRENT_BINARY_DIR}/${filename} ) - ELSEIF( R3BROOTPATH ) - configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/config.sh.in - ${CMAKE_CURRENT_BINARY_DIR}/${filename} - ) - ENDIF( R3BROOTPATH ) - - ENDIF(${filename} MATCHES "[.]csh.*$") + set(PYTHONPATH ${CMAKE_SOURCE_DIR}/python ${SIMPATH}/lib ${SIMPATH}/lib/root + ${SIMPATH}/lib/Geant4 ${SIMPATH}/lib/g4py ${PYTHONPATH}) + unique(PYTHONPATH "${PYTHONPATH}") + convert_list_to_string(${PYTHONPATH}) + set(MY_PYTHONPATH ${output}) - -ENDMACRO (WRITE_CONFIG_FILE) - - -MACRO (CONVERT_LIST_TO_STRING) - - set (tmp "") - foreach (_current ${ARGN}) - - set(tmp1 ${tmp}) + # TODO: this should change to CMAKE_INSTALL_PREFIX/bin in the future + set(PATH ${ROOTSYS}/bin ${CMAKE_BINARY_DIR}/bin ${PATH}) + unique(PATH "${PATH}") + convert_list_to_string(${PATH}) + set(MY_PATH ${output}) + + if(FAIRSOFT_EXTERN) + set(PYTHIA8DATA "${SIMPATH}/share/pythia8/xmldoc") + else() + set(PYTHIA8DATA "${SIMPATH}/generators/pythia8/xmldoc") + endif() + + convert_list_to_string($ENV{NEW_CLASSPATH}) + set(MY_CLASSPATH ${output}) + + convert_list_to_string(${ROOT_INCLUDE_PATH}) + set(ROOT_INCLUDE_PATH ${output}) + + if(${filename} MATCHES "[.]csh.*$") + if(R3BROOTPATH) + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/config.csh.in + ${CMAKE_CURRENT_BINARY_DIR}/${filename}) + elseif(R3BROOTPATH) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/config.csh.in + ${CMAKE_CURRENT_BINARY_DIR}/${filename}) + endif(R3BROOTPATH) + + else() + if(R3BROOTPATH) + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/config.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/${filename}) + elseif(R3BROOTPATH) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/config.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/${filename}) + endif(R3BROOTPATH) + + endif() + +endmacro(WRITE_CONFIG_FILE) + +macro(CONVERT_LIST_TO_STRING) set(tmp "") - set(tmp ${tmp1}:${_current}) - - endforeach (_current ${ARGN}) - If(tmp) - STRING(REGEX REPLACE "^:(.*)" "\\1" output ${tmp}) - Else(tmp) - Set(output "") - EndIf(tmp) - -ENDMACRO (CONVERT_LIST_TO_STRING LIST) + foreach(_current ${ARGN}) + + set(tmp1 ${tmp}) + set(tmp "") + set(tmp ${tmp1}:${_current}) + + endforeach(_current ${ARGN}) + if(tmp) + string(REGEX REPLACE "^:(.*)" "\\1" output ${tmp}) + else(tmp) + set(output "") + endif(tmp) +endmacro(CONVERT_LIST_TO_STRING LIST) diff --git a/neuland/CMakeLists.txt b/neuland/CMakeLists.txt index bd8503ead..ffa0f3748 100644 --- a/neuland/CMakeLists.txt +++ b/neuland/CMakeLists.txt @@ -13,9 +13,6 @@ ############################################################################## # cmake-format: on -add_library(R3BNeuland INTERFACE) -add_library(R3B::Neuland ALIAS R3BNeuland) - add_subdirectory(calibration) add_subdirectory(clustering) add_subdirectory(digitizing) diff --git a/neuland/calibration/CMakeLists.txt b/neuland/calibration/CMakeLists.txt index b62d431f0..be0ffc8a7 100644 --- a/neuland/calibration/CMakeLists.txt +++ b/neuland/calibration/CMakeLists.txt @@ -17,3 +17,11 @@ add_subdirectory(legacy) add_subdirectory(share) add_subdirectory(map_to_cal) add_subdirectory(cal_to_hit) + +add_library(R3BNeulandCalibration INTERFACE) +target_link_libraries( + R3BNeulandCalibration + INTERFACE R3BNeulandCalibrationShare + R3BNeulandMapToCal + R3BNeulandCalToHit + R3BNeulandCalibrationLegacy) diff --git a/neuland/calibration/cal_to_hit/CMakeLists.txt b/neuland/calibration/cal_to_hit/CMakeLists.txt index 240139e06..0217eb5a0 100644 --- a/neuland/calibration/cal_to_hit/CMakeLists.txt +++ b/neuland/calibration/cal_to_hit/CMakeLists.txt @@ -13,39 +13,31 @@ ############################################################################## # cmake-format: on -project(NeulandCalToHit CXX) - set(LIBRARY_NAME R3BNeulandCalToHit) set(LINKDEF NeulandCalToHitLinkDef.h) set(SRCS # cmake-format: sortable engine/R3BNeulandLSQREngineAdaptor.cxx - R3BNeulandCalToHitTask.cxx + R3BNeulandCalToHitPar.cxx R3BNeulandCalToHitParTask.cxx - R3BNeulandCalToHitPar.cxx) - -set(INCLUDE_DIRECTORIES - # cmake-format: sortable - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/engine - ${R3BROOT_SOURCE_DIR}/neuland/calibration/legacy - ${R3BROOT_SOURCE_DIR}/neuland/calibration/map_to_cal - ${R3BROOT_SOURCE_DIR}/neuland/calibration/share - ${R3BROOT_SOURCE_DIR}/neuland/shared - ${R3BROOT_SOURCE_DIR}/r3bbase - ${R3BROOT_SOURCE_DIR}/r3bdata/neulandData) + R3BNeulandCalToHitTask.cxx) -set(DEPENDENCIES +set(HEADERS # cmake-format: sortable - R3BBase - R3BData - R3BNeulandCalibrationLegacy - R3BNeulandCalibrationShare - R3BNeulandMapToCal - R3BNeulandShared - range-v3::range-v3) + engine/R3BNeulandCosmicEngine.h + engine/R3BNeulandLSQREngineAdaptor.h + R3BNeulandCalToHitPar.h + R3BNeulandCalToHitParTask.h + R3BNeulandCalToHitTask.h) -generate_library() +add_library(R3BNeulandCalToHit SHARED ${SRCS}) target_include_directories(R3BNeulandCalToHit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} engine) -target_link_libraries(R3BNeuland INTERFACE R3BNeulandCalToHit) +target_link_libraries(R3BNeulandCalToHit PUBLIC R3BNeulandMapToCal R3BNeulandCalibrationLegacy) +root_generate_dictionary( + R3BNeulandCalToHit_dict + ${HEADERS} + MODULE + R3BNeulandCalToHit + LINKDEF + NeulandCalToHitLinkDef.h) diff --git a/neuland/calibration/legacy/CMakeLists.txt b/neuland/calibration/legacy/CMakeLists.txt index 16810ead2..c9a186b4f 100644 --- a/neuland/calibration/legacy/CMakeLists.txt +++ b/neuland/calibration/legacy/CMakeLists.txt @@ -13,27 +13,6 @@ ############################################################################## # cmake-format: on -set(LIBRARY_NAME R3BNeulandCalibrationLegacy) -set(LINKDEF NeulandCalibrationLinkDef.h) - -# set(CMAKE_CXX_STANDARD 14) - -set(DEPENDENCIES - # cmake-format: sortable - R3BBase - R3BData - R3BNeulandShared - R3BTCal) - -set(INCLUDE_DIRECTORIES - # cmake-format: sortable - ${INCLUDE_DIRECTORIES} - ${R3BROOT_SOURCE_DIR}/neuland/calibration/legacy - ${R3BROOT_SOURCE_DIR}/neuland/shared - ${R3BROOT_SOURCE_DIR}/r3bdata/losData - ${R3BROOT_SOURCE_DIR}/tcal) -include_directories(${INCLUDE_DIRECTORIES}) - set(SRCS # cmake-format: sortable LSQR.cxx @@ -59,11 +38,38 @@ set(SRCS R3BNeulandTacquilaMapped2QCalPar.cxx R3BNeulandTSyncer.cxx) -change_file_extension( - *.cxx - *.h - HEADERS - "${SRCS}") +set(HEADERS + # cmake-format: sortable + LSQR.h + R3BNeulandCal2Hit.h + R3BNeulandCal2HitPar.h + R3BNeulandCosmicTracker.h + R3BNeulandHitCalibrationBar.h + R3BNeulandHitCalibrationEngine.h + R3BNeulandHitHist.h + # R3BNeulandCalTest.h + R3BNeulandHitModulePar.h + R3BNeulandHitPar.h + R3BNeulandMapped2Cal.h + R3BNeulandMapped2CalPar.h + R3BNeulandMappedHist.h + R3BNeulandMappingPar.h + R3BNeulandParFact.h + R3BNeulandProvideTStart.h + R3BNeulandQCalFiller.h + R3BNeulandQCalPar.h + R3BNeulandTacquilaMapped2Cal.h + R3BNeulandTacquilaMapped2CalPar.h + R3BNeulandTacquilaMapped2QCalPar.h + R3BNeulandTSyncer.h) -generate_library() +add_library(R3BNeulandCalibrationLegacy SHARED ${SRCS}) target_include_directories(R3BNeulandCalibrationLegacy PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(R3BNeulandCalibrationLegacy PUBLIC R3BData R3BTCal R3BNeulandShared) +root_generate_dictionary( + R3BNeulandCalibrationLegacy_dict + ${HEADERS} + MODULE + R3BNeulandCalibrationLegacy + LINKDEF + NeulandCalibrationLinkDef.h) diff --git a/neuland/calibration/map_to_cal/CMakeLists.txt b/neuland/calibration/map_to_cal/CMakeLists.txt index 6af43469f..fd67ad573 100644 --- a/neuland/calibration/map_to_cal/CMakeLists.txt +++ b/neuland/calibration/map_to_cal/CMakeLists.txt @@ -13,11 +13,6 @@ ############################################################################## # cmake-format: on -project(NeulandMapToCal CXX) - -set(LIBRARY_NAME R3BNeulandMapToCal) -set(LINKDEF NeulandMapToCalLinkDef.h) - set(SRCS # cmake-format: sortable R3BFTCalEngine.cxx @@ -26,24 +21,23 @@ set(SRCS R3BNeulandMapToCalTask.cxx R3BTrigIDMappingFinder.cxx) -set(INCLUDE_DIRECTORIES +set(HEADERS # cmake-format: sortable - ${CMAKE_CURRENT_SOURCE_DIR} - ${R3BROOT_SOURCE_DIR}/neuland/calibration/share - ${R3BROOT_SOURCE_DIR}/neuland/shared - ${R3BROOT_SOURCE_DIR}/r3bbase - ${R3BROOT_SOURCE_DIR}/r3bdata/neulandData) + R3BFTCalEngine.h + R3BNeulandCalData2.h + R3BNeulandMapToCalPar.h + R3BNeulandMapToCalParTask.h + R3BNeulandMapToCalTask.h + R3BTrigIDMappingFinder.h) -set(DEPENDENCIES - # cmake-format: sortable - nlohmann_json::nlohmann_json - R3BBase - R3BData - R3BNeulandCalibrationShare - R3BNeulandShared - R3BTCal - range-v3::range-v3) - -generate_library() +add_library(R3BNeulandMapToCal SHARED ${SRCS}) target_include_directories(R3BNeulandMapToCal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(R3BNeuland INTERFACE R3BNeulandMapToCal) +target_link_libraries(R3BNeulandMapToCal PUBLIC R3BNeulandCalibrationShare nlohmann_json::nlohmann_json) + +root_generate_dictionary( + R3BNeulandMapToCal_dict + ${HEADERS} + MODULE + R3BNeulandMapToCal + LINKDEF + NeulandMapToCalLinkDef.h) diff --git a/neuland/calibration/share/CMakeLists.txt b/neuland/calibration/share/CMakeLists.txt index fe652b494..85ebff588 100644 --- a/neuland/calibration/share/CMakeLists.txt +++ b/neuland/calibration/share/CMakeLists.txt @@ -13,21 +13,23 @@ ############################################################################## # cmake-format: on -project(R3BNeulandCalibrationShare CXX) - -set(LIBRARY_NAME R3BNeulandCalibrationShare) -set(LINKDEF NeulandCalShareLinkDef.h) - set(SRCS # cmake-format: sortable R3BNeulandCalibrationTask.cxx R3BNeulandParSet.cxx) -set(INCLUDE_DIRECTORIES +set(HEADERS # cmake-format: sortable - ${CMAKE_CURRENT_SOURCE_DIR} ${R3BROOT_SOURCE_DIR}/neuland/shared ${R3BROOT_SOURCE_DIR}/r3bbase) -set(DEPENDENCIES # cmake-format: sortable - R3BBase range-v3::range-v3 Microsoft.GSL::GSL R3BNeulandShared) - -generate_library() + R3BNeulandCalibrationTask.h + R3BNeulandParDirCreator.h + R3BNeulandParSet.h + R3BNeulandTriggerTypes.h) -target_include_directories(R3BNeulandCalibrationShare PUBLIC .) -target_link_libraries(R3BNeuland INTERFACE R3BNeulandCalibrationShare) +add_library(R3BNeulandCalibrationShare SHARED ${SRCS}) +target_include_directories(R3BNeulandCalibrationShare PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(R3BNeulandCalibrationShare PUBLIC R3BNeulandShared) +root_generate_dictionary( + R3BNeulandCalibrationShare_dict + ${HEADERS} + MODULE + R3BNeulandCalibrationShare + LINKDEF + NeulandCalShareLinkDef.h) diff --git a/neuland/digitizing/CMakeLists.txt b/neuland/digitizing/CMakeLists.txt index 5cdbf04aa..c23189c09 100644 --- a/neuland/digitizing/CMakeLists.txt +++ b/neuland/digitizing/CMakeLists.txt @@ -40,7 +40,7 @@ set(HEADERS add_library(R3BNeulandDigitizing SHARED ${SRCS}) target_include_directories(R3BNeulandDigitizing PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(R3BNeulandDigitizing PUBLIC R3BData R3BNeulandShared R3BNeulandCalibration) +target_link_libraries(R3BNeulandDigitizing PUBLIC R3BNeulandShared R3BNeulandCalibrationLegacy) root_generate_dictionary( R3BNeulandDigitizing_dict ${HEADERS} diff --git a/neuland/executables/CMakeLists.txt b/neuland/executables/CMakeLists.txt index 5f7da4a8e..f3c0c889d 100644 --- a/neuland/executables/CMakeLists.txt +++ b/neuland/executables/CMakeLists.txt @@ -1,49 +1,22 @@ -add_subdirectory(templates) - -add_executable(neulandSim neulandSim.cxx) -target_link_libraries(neulandSim PUBLIC R3B::Neuland ExTestDetector) - -# set(EXE_NAME neulandSim) -# set(DEPENDENCIES -# R3BNeulandShared -# R3BNeulandSimulation -# R3BPassive -# R3BData -# R3BBase -# Gen -# ${Geant4_LIBRARIES} -# ${Geant4VMC_LIBRARIES} -# ExTestDetector -# Boost::program_options) - -# set(INCLUDE_DIRECTORIES -# ${INCLUDE_DIRECTORIES} ${R3BROOT_SOURCE_DIR}/passive ${R3BROOT_SOURCE_DIR}/neuland/executables -# ${R3BROOT_SOURCE_DIR}/neuland/simulation ${Geant4_INCLUDE_DIRS} ${Geant4VMC_INCLUDE_DIRS}) +# add_subdirectory(templates) add_executable(neulandSim neulandSim.cxx) -target_link_libraries(neulandSim PUBLIC R3BNeulandSimulation R3BNeulandShared ${Geant4_LIBRARIES} - ${Geant4VMC_LIBRARIES} ExTestDetector R3BTracking) +target_link_libraries(neulandSim PRIVATE R3BNeulandSimulation ExTestDetector R3BPassive ${Geant4_LIBRARIES} geant4vmc) add_executable(neulandAna neulandAna.cxx) -target_link_libraries(neulandAna PUBLIC R3BData R3BNeulandShared R3BNeulandDigitizing) +target_link_libraries(neulandAna PRIVATE R3BData R3BNeulandDigitizing) -# set(EXE_NAME neulandAna) -# set(DEPENDENCIES -# R3BNeulandShared -# R3BNeulandDigitizing -# R3BPassive -# R3BData -# R3BBase -# Gen -# Boost::program_options) +add_executable(neuland_lmd_to_map neuland_lmd_to_map.cxx) +target_link_libraries(neuland_lmd_to_map PRIVATE R3BNeulandCalibration R3BSource -pthread) -# set(INCLUDE_DIRECTORIES -# ${INCLUDE_DIRECTORIES} ${R3BROOT_SOURCE_DIR}/passive ${R3BROOT_SOURCE_DIR}/neuland/executables -# ${R3BROOT_SOURCE_DIR}/neuland/digitizing ${R3BROOT_SOURCE_DIR}/neuland/calibration) +add_executable(neuland_map_to_cal neuland_map_to_cal.cxx) +target_link_libraries(neuland_map_to_cal PRIVATE R3BNeulandCalibration R3BSource) -# include_directories(${INCLUDE_DIRECTORIES}) -# set(SRCS neulandAna.cxx) +add_executable(neuland_cal_to_hit neuland_cal_to_hit.cxx) +target_link_libraries(neuland_cal_to_hit PRIVATE R3BNeulandCalibration R3BSource) -# generate_executable() +add_executable(neuland_online_monitor neuland_online_monitor.cxx) +target_link_libraries(neuland_online_monitor PRIVATE R3BNeulandOnline R3BLos R3BSource -pthread) -# add_subdirectory(templates) +add_executable(neuland_par_merger neuland_par_merger.cxx) +target_link_libraries(neuland_par_merger PRIVATE R3BNeulandShared) diff --git a/neuland/executables/templates/neuland_cal_to_hit.cxx b/neuland/executables/neuland_cal_to_hit.cxx similarity index 100% rename from neuland/executables/templates/neuland_cal_to_hit.cxx rename to neuland/executables/neuland_cal_to_hit.cxx diff --git a/neuland/executables/templates/neuland_lmd_to_map.cxx b/neuland/executables/neuland_lmd_to_map.cxx similarity index 100% rename from neuland/executables/templates/neuland_lmd_to_map.cxx rename to neuland/executables/neuland_lmd_to_map.cxx diff --git a/neuland/executables/templates/neuland_map_to_cal.cxx b/neuland/executables/neuland_map_to_cal.cxx similarity index 100% rename from neuland/executables/templates/neuland_map_to_cal.cxx rename to neuland/executables/neuland_map_to_cal.cxx diff --git a/neuland/executables/templates/neuland_online_monitor.cxx b/neuland/executables/neuland_online_monitor.cxx similarity index 100% rename from neuland/executables/templates/neuland_online_monitor.cxx rename to neuland/executables/neuland_online_monitor.cxx diff --git a/neuland/executables/templates/neuland_par_merger.cxx b/neuland/executables/neuland_par_merger.cxx similarity index 100% rename from neuland/executables/templates/neuland_par_merger.cxx rename to neuland/executables/neuland_par_merger.cxx diff --git a/neuland/executables/templates/CMakeLists.txt b/neuland/executables/templates/CMakeLists.txt index 51540cc04..bc1d16bf5 100644 --- a/neuland/executables/templates/CMakeLists.txt +++ b/neuland/executables/templates/CMakeLists.txt @@ -1,78 +1,2 @@ -set(EXE_NAME ex_digi) -set(DEPENDENCIES - # cmake-format: sortable - Boost::program_options - Gen - R3B::Neuland - R3BBase - R3BData - R3BNeulandClustering - R3BNeulandDigitizing - R3BNeulandShared - R3BPassive) - -set(INCLUDE_DIRECTORIES - ${INCLUDE_DIRECTORIES} - ${R3BROOT_SOURCE_DIR}/passive - ${R3BROOT_SOURCE_DIR}/neuland/executables - ${R3BROOT_SOURCE_DIR}/neuland/digitizing - ${R3BROOT_SOURCE_DIR}/neuland/calibration) - -include_directories(${INCLUDE_DIRECTORIES}) -set(SRCS ex_digi.cxx) - -generate_executable() -# ============================================================================ - -# set(EXE_NAME ex_reader) set(DEPENDENCIES # cmake-format: sortable Gen R3B::Neuland R3BBase R3BData -# R3BNeulandCalibration R3BNeulandShared R3BPassive R3Bsource R3BTCal UCESB) - -# set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${R3BROOT_SOURCE_DIR}/passive -# ${R3BROOT_SOURCE_DIR}/tcal) - -# include_directories(${INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIRS}) set(SRCS ex_reader.cxx) - -# generate_executable() -# ==================================================================== - -add_executable(neuland_lmd_to_map neuland_lmd_to_map.cxx) -target_link_libraries(neuland_lmd_to_map PUBLIC R3B::Neuland R3Bsource -pthread) - -add_executable(neuland_map_to_cal neuland_map_to_cal.cxx) -target_link_libraries(neuland_map_to_cal PUBLIC R3B::Neuland) - -add_executable(neuland_cal_to_hit neuland_cal_to_hit.cxx) -target_link_libraries(neuland_cal_to_hit PUBLIC R3B::Neuland) - -add_executable(neuland_online_monitor neuland_online_monitor.cxx) -target_link_libraries( - neuland_online_monitor - PUBLIC R3B::Neuland - R3Bsource - R3BLos - -pthread) - -add_executable(neuland_par_merger neuland_par_merger.cxx) -target_link_libraries(neuland_par_merger PUBLIC R3B::Neuland) -# ==================================================================== - -set(EXE_NAME ex_test) -set(DEPENDENCIES - R3Bsource - R3BNeulandCalibrationLegacy - R3BNeulandShared - R3BPassive - R3BData - R3BBase - R3BTCal - Gen - UCESB - range-v3::range-v3) - -set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${R3BROOT_SOURCE_DIR}/passive - ${R3BROOT_SOURCE_DIR}/tcal) - -include_directories(${INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIRS}) -set(SRCS ex_test.cxx) -generate_executable() -# ==================================================================== +add_executable(ex_digi ex_digi.cxx) +target_link_libraries(ex_digi PUBLIC R3B::Neuland) diff --git a/neuland/online/CMakeLists.txt b/neuland/online/CMakeLists.txt index fdb7e435e..93fd759a5 100644 --- a/neuland/online/CMakeLists.txt +++ b/neuland/online/CMakeLists.txt @@ -42,8 +42,8 @@ set(HEADERS R3BNeulandOnlineSpectra2.h) add_library(R3BNeulandOnline SHARED ${SRCS}) -target_include_directories(R3BNeulandOnline PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(R3BNeulandOnline PUBLIC R3BTCal R3BNeulandShared) +target_include_directories(R3BNeulandOnline PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} canvases) +target_link_libraries(R3BNeulandOnline PUBLIC R3BNeulandCalibration #[[ R3BTCal R3BNeulandShared ]]) root_generate_dictionary( R3BNeulandOnline_dict ${HEADERS} diff --git a/neuland/shared/CMakeLists.txt b/neuland/shared/CMakeLists.txt index 9783fbc44..3c7d377d7 100644 --- a/neuland/shared/CMakeLists.txt +++ b/neuland/shared/CMakeLists.txt @@ -19,6 +19,7 @@ set(SRCS R3BNeulandGeoPar.cxx R3BNeulandContFact.cxx R3BProgramOptions.cxx + R3BNeulandSignalMatcher.cxx R3BNeulandVisualizer.cxx) set(HEADERS @@ -38,7 +39,12 @@ set(HEADERS add_library(R3BNeulandShared SHARED ${SRCS}) target_include_directories(R3BNeulandShared PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(R3BNeulandShared PUBLIC R3BData Boost::program_options) +target_link_libraries( + R3BNeulandShared + PUBLIC R3BData + Boost::program_options + Microsoft.GSL::GSL + range-v3::range-v3) root_generate_dictionary( R3BNeulandShared_dict ${HEADERS} diff --git a/neuland/simulation/CMakeLists.txt b/neuland/simulation/CMakeLists.txt index b37d317f6..25c6f6479 100644 --- a/neuland/simulation/CMakeLists.txt +++ b/neuland/simulation/CMakeLists.txt @@ -19,6 +19,6 @@ set(HEADERS R3BNeuland.h R3BNeulandMCMon.h R3BNeulandPrimaryClusterFinder.h add_library(R3BNeulandSimulation SHARED ${SRCS}) target_include_directories(R3BNeulandSimulation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(R3BNeulandSimulation PUBLIC R3BNeulandShared R3BPassive) +target_link_libraries(R3BNeulandSimulation PUBLIC R3BNeulandShared #[[ R3BPassive ]]) root_generate_dictionary(R3BNeulandSimulation_dict ${HEADERS} MODULE R3BNeulandSimulation LINKDEF NeulandSimulationLinkDef.h) diff --git a/r3bbase/CMakeLists.txt b/r3bbase/CMakeLists.txt index d3987a12a..9fdbf9b3c 100644 --- a/r3bbase/CMakeLists.txt +++ b/r3bbase/CMakeLists.txt @@ -78,6 +78,6 @@ target_link_libraries( target_link_directories(R3BBase PUBLIC ${FAIRROOTPATH}/lib) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) - target_link_libraries(R3BBase PRIVATE -lstdc++fs) + target_link_libraries(R3BBase PUBLIC -lstdc++fs) endif() root_generate_dictionary(R3BBase_dict ${HEADERS} MODULE R3BBase LINKDEF BaseLinkDef.h) diff --git a/r3bdata/CMakeLists.txt b/r3bdata/CMakeLists.txt index 3fca7d5a7..a5001a005 100755 --- a/r3bdata/CMakeLists.txt +++ b/r3bdata/CMakeLists.txt @@ -91,6 +91,7 @@ set(SRCS strawtubesData/R3BStrawtubesCalData.cxx strawtubesData/R3BStrawtubesHitData.cxx neulandData/R3BPaddleTamexMappedData.cxx + neulandData/R3BPaddleTamexMappedData2.cxx tofData/R3BTofdMappedData.cxx tofData/R3BTofdCalData.cxx tofData/R3BTofdHitData.cxx @@ -237,6 +238,7 @@ set(HEADERS strawtubesData/R3BStrawtubesCalData.h strawtubesData/R3BStrawtubesHitData.h neulandData/R3BPaddleTamexMappedData.h + neulandData/R3BPaddleTamexMappedData2.h tofData/R3BTofdMappedData.h tofData/R3BTofdCalData.h tofData/R3BTofdHitData.h diff --git a/r3bsource/CMakeLists.txt b/r3bsource/CMakeLists.txt index 88ec741cf..3cb92f385 100644 --- a/r3bsource/CMakeLists.txt +++ b/r3bsource/CMakeLists.txt @@ -13,8 +13,11 @@ set(SRCS ./base/R3BUcesbSource.cxx + ./base/R3BUcesbSource2.cxx ./base/R3BReader.cxx ./base/R3BUnpackReader.cxx + ./base/utils/R3BUcesbLauncher.cxx + ./base/utils/R3BUcesbStructInfo.cxx ./wr/R3BWhiterabbitMasterReader.cxx ./califa/R3BWhiterabbitCalifaReader.cxx ./neuland/R3BWhiterabbitNeulandReader.cxx @@ -57,11 +60,13 @@ set(SRCS ./califa/R3BCalifaJulichReader.cxx ./tofd/R3BPtofReader.cxx ./neuland/R3BNeulandTamexReader.cxx + ./neuland/R3BNeulandTamexReader2.cxx ./neuland/R3BNeulandTacquilaReader.cxx ./stubes/R3BStrawtubesReader.cxx ./ams/R3BAmsReader.cxx ./foot/R3BFootReader.cxx ./foot/R3BFootSiReader.cxx + ./pspx/R3BS515PspxReader.cxx ./alpide/R3BAlpideReader.cxx ./music/R3BMusicReader.cxx ./rpc/R3BRpcReader.cxx @@ -72,6 +77,7 @@ set(SRCS set(HEADERS ./base/R3BUcesbSource.h + ./base/R3BUcesbSource2.h ./base/R3BReader.h ./base/R3BUnpackReader.h ./base/utils/R3BUcesbDecl.h @@ -121,6 +127,7 @@ set(HEADERS ./califa/R3BCalifaJulichReader.h ./tofd/R3BPtofReader.h ./neuland/R3BNeulandTamexReader.h + ./neuland/R3BNeulandTamexReader2.h ./neuland/R3BNeulandTacquilaReader.h ./stubes/R3BStrawtubesReader.h ./ams/R3BAmsReader.h @@ -232,5 +239,5 @@ set(DIRS add_library(R3BSource SHARED ${SRCS}) target_include_directories(R3BSource PUBLIC ${DIRS}) -target_link_libraries(R3BSource PUBLIC R3BData MbsAPI Ucesb) +target_link_libraries(R3BSource PUBLIC R3BData MbsAPI Ucesb Microsoft.GSL::GSL range-v3::range-v3) root_generate_dictionary(R3BSource_dict ${HEADERS} MODULE R3BSource LINKDEF SourceLinkDef.h) diff --git a/r3bsource/pspx/R3BS515PspxReader.cxx b/r3bsource/pspx/R3BS515PspxReader.cxx index a8595e683..14fac016a 100644 --- a/r3bsource/pspx/R3BS515PspxReader.cxx +++ b/r3bsource/pspx/R3BS515PspxReader.cxx @@ -18,7 +18,6 @@ #include "R3BLogger.h" #include "R3BPspxMappedData.h" -#include "R3BPspxMappedPar.h" #include "R3BS515PspxReader.h" #include "TClonesArray.h"