From ec2142f8c49cd7112637f14368f44b1657b4d221 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Tue, 25 Mar 2025 11:18:42 +0100 Subject: [PATCH] Common: add has_detector(s)_gpu helpers --- DATA/common/gen_topo_helper_functions.sh | 10 ++++++++++ DATA/common/setenv.sh | 1 + 2 files changed, 11 insertions(+) diff --git a/DATA/common/gen_topo_helper_functions.sh b/DATA/common/gen_topo_helper_functions.sh index 4b0abb550..6791d797c 100755 --- a/DATA/common/gen_topo_helper_functions.sh +++ b/DATA/common/gen_topo_helper_functions.sh @@ -49,6 +49,11 @@ has_detector_matching() [[ $WORKFLOW_DETECTORS_MATCHING =~ (^|,)"ALL"(,|$) ]] || [[ $WORKFLOW_DETECTORS_MATCHING =~ (^|,)"$1"(,|$) ]] } +has_detector_gpu() +{ + has_detector $1 && [[ $WORKFLOW_DETECTORS_GPU =~ (^|,)"$1"(,|$) ]] +} + has_secvtx_source() { [[ $SVERTEXING_SOURCES =~ (^|,)"ALL"(,|$) ]] || [[ $SVERTEXING_SOURCES =~ (^|,)"$1"(,|$) ]] @@ -137,6 +142,11 @@ has_detectors_flp_processing() _check_multiple has_detector_flp_processing "$@" } +has_detectors_gpu() +{ + _check_multiple has_detector_gpu "$@" +} + workflow_has_parameters() { _check_multiple workflow_has_parameter "$@" diff --git a/DATA/common/setenv.sh b/DATA/common/setenv.sh index 2f11efdf8..2c75d9c66 100755 --- a/DATA/common/setenv.sh +++ b/DATA/common/setenv.sh @@ -43,6 +43,7 @@ if [[ ! -z ${WORKFLOW_DETECTORS_EXCLUDE:-} ]]; then done fi +if [[ -z "${WORKFLOW_DETECTORS_GPU+x}" ]]; then export WORKFLOW_DETECTORS_GPU="TPC"; fi if [[ -z "${WORKFLOW_DETECTORS_QC+x}" ]] || [[ "0$WORKFLOW_DETECTORS_QC" == "0ALL" ]]; then export WORKFLOW_DETECTORS_QC="$WORKFLOW_DETECTORS,$LIST_OF_GLORECO,TOF_MATCH"; fi if [[ -z "${WORKFLOW_DETECTORS_CALIB+x}" ]] || [[ "0$WORKFLOW_DETECTORS_CALIB" == "0ALL" ]]; then export WORKFLOW_DETECTORS_CALIB=$WORKFLOW_DETECTORS; fi if [[ -z "${WORKFLOW_DETECTORS_RECO+x}" ]] || [[ "0$WORKFLOW_DETECTORS_RECO" == "0ALL" ]]; then export WORKFLOW_DETECTORS_RECO=$WORKFLOW_DETECTORS; fi