From 88e107f4ab38c7720152b2d224ab728ca5491898 Mon Sep 17 00:00:00 2001 From: Chiara Zampolli Date: Mon, 30 Oct 2023 09:26:34 +0100 Subject: [PATCH 1/2] Changes needed for split async reco workflow --- .../GlobalTrackingWorkflow/helpers/src/InputHelper.cxx | 2 +- Detectors/MUON/MCH/IO/src/digits-reader-workflow.cxx | 6 +++++- Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx | 6 +++++- Detectors/TRD/workflow/src/trd-tracking-workflow.cxx | 4 +++- prodtests/full-system-test/dpl-workflow.sh | 7 +++++-- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Detectors/GlobalTrackingWorkflow/helpers/src/InputHelper.cxx b/Detectors/GlobalTrackingWorkflow/helpers/src/InputHelper.cxx index 1069eb96c7938..7197b302b953d 100644 --- a/Detectors/GlobalTrackingWorkflow/helpers/src/InputHelper.cxx +++ b/Detectors/GlobalTrackingWorkflow/helpers/src/InputHelper.cxx @@ -176,7 +176,7 @@ int InputHelper::addInputSpecs(const ConfigContext& configcontext, WorkflowSpec& } if (maskClusters[GID::MCH]) { - specs.emplace_back(o2::mch::getClusterReaderSpec(maskClustersMC[GID::MCH], "mch-global-cluster-reader", true, false)); + specs.emplace_back(o2::mch::getClusterReaderSpec(maskClustersMC[GID::MCH], "mch-cluster-reader", true, false)); } return 0; diff --git a/Detectors/MUON/MCH/IO/src/digits-reader-workflow.cxx b/Detectors/MUON/MCH/IO/src/digits-reader-workflow.cxx index 6bcd53379583e..0ec46f2fc4d3b 100644 --- a/Detectors/MUON/MCH/IO/src/digits-reader-workflow.cxx +++ b/Detectors/MUON/MCH/IO/src/digits-reader-workflow.cxx @@ -46,10 +46,14 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cc) { bool useMC = !cc.options().get("disable-mc"); + auto name = fmt::format("mch-digit-reader-{}-{}", + cc.options().get("mch-output-digits-data-description"), + cc.options().get("mch-output-digitrofs-data-description")); + WorkflowSpec specs; specs.emplace_back(o2::mch::getDigitReaderSpec( useMC, - "mch-digit-reader", + name, cc.options().get("mch-output-digits-data-description"), cc.options().get("mch-output-digitrofs-data-description"))); diff --git a/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx b/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx index 566fc3d9f4101..3fa2f25978dec 100644 --- a/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx +++ b/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx @@ -56,9 +56,13 @@ void customize(std::vector& workflowOptions) WorkflowSpec defineDataProcessing(const ConfigContext& cc) { bool useMC = cc.options().get("enable-mc"); + auto name = fmt::format("mch-digit-writer-{}-{}", + cc.options().get("input-digits-data-description"), + cc.options().get("input-digits-data-description")); + return WorkflowSpec{o2::mch::getDigitWriterSpec( useMC, - "mch-digit-writer", + name, cc.options().get("mch-digit-outfile"), cc.options().get("input-digits-data-description"), cc.options().get("input-digitrofs-data-description"))}; diff --git a/Detectors/TRD/workflow/src/trd-tracking-workflow.cxx b/Detectors/TRD/workflow/src/trd-tracking-workflow.cxx index 125b39ca8d236..5fcbd09aec280 100644 --- a/Detectors/TRD/workflow/src/trd-tracking-workflow.cxx +++ b/Detectors/TRD/workflow/src/trd-tracking-workflow.cxx @@ -53,6 +53,7 @@ void customize(std::vector& workflowOptions) {"enable-qc", VariantType::Bool, false, {"enable tracking QC"}}, {"enable-pid", VariantType::Bool, false, {"Enable PID"}}, {"enable-ph", VariantType::Bool, false, {"Enable creation of PH plots"}}, + {"trd-digits-spec", VariantType::Int, 0, {"Input digits subspec, ignored if disable-root-input is false"}}, {"track-sources", VariantType::String, std::string{GTrackID::ALL}, {"comma-separated list of sources to use for tracking"}}, {"filter-trigrec", VariantType::Bool, false, {"ignore interaction records without ITS data"}}, {"strict-matching", VariantType::Bool, false, {"High purity preliminary matching"}}, @@ -83,6 +84,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) auto vdexb = configcontext.options().get("enable-vdexb-calib"); auto gain = configcontext.options().get("enable-gain-calib"); auto pulseHeight = configcontext.options().get("enable-ph"); + auto digitsSpec = configcontext.options().get("trd-digits-spec"); bool rootInput = !configcontext.options().get("disable-root-input"); GTrackID::mask_t srcTRD = allowedSources & GTrackID::getSourcesMask(configcontext.options().get("track-sources")); if (strict && (srcTRD & ~GTrackID::getSourcesMask("TPC")).any()) { @@ -120,7 +122,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) if (rootInput) { specs.emplace_back(o2::trd::getTRDDigitReaderSpec(useMC)); } - specs.emplace_back(o2::framework::getTRDPulseHeightSpec(srcTRD, rootInput)); + specs.emplace_back(o2::framework::getTRDPulseHeightSpec(srcTRD, rootInput ? 1 : digitsSpec)); } // output devices diff --git a/prodtests/full-system-test/dpl-workflow.sh b/prodtests/full-system-test/dpl-workflow.sh index f29450467ed0e..faac05f6c7a44 100755 --- a/prodtests/full-system-test/dpl-workflow.sh +++ b/prodtests/full-system-test/dpl-workflow.sh @@ -337,9 +337,11 @@ if [[ ! -z ${WORKFLOW_DETECTORS_USE_GLOBAL_READER} ]]; then has_detector FV0 && has_detector_from_global_reader FV0 && add_W o2-fv0-digit-reader-workflow "$DISABLE_MC --hbfutils-config o2_tfidinfo.root --fv0-digit-infile o2_fv0digits.root" has_detector MID && has_detector_from_global_reader MID && add_W o2-mid-digits-reader-workflow "$DISABLE_MC --hbfutils-config o2_tfidinfo.root --mid-digit-infile mid-digits-decoded.root" has_detector MCH && has_detector_from_global_reader MCH && add_W o2-mch-digits-reader-workflow "$DISABLE_MC --hbfutils-config o2_tfidinfo.root --infile mchdigits.root" + has_detector MCH && has_detector_from_global_reader MCH && add_W o2-mch-digits-reader-workflow "$DISABLE_MC --hbfutils-config o2_tfidinfo.root --infile mchfdigits.root --mch-output-digits-data-description F-DIGITS --mch-output-digitrofs-data-description TC-F-DIGITROFS" + has_detector MCH && has_detector_from_global_reader MCH && add_W o2-mch-errors-reader-workflow "--hbfutils-config o2_tfidinfo.root" "" 0 has_detector MCH && has_detector_from_global_reader MCH && add_W o2-mch-clusters-reader-workflow "--hbfutils-config o2_tfidinfo.root" "" 0 has_detector MCH && has_detector_from_global_reader MCH && add_W o2-mch-preclusters-reader-workflow "--hbfutils-config o2_tfidinfo.root" "" 0 - has_detector TRD && has_detector_from_global_reader TRD && add_W o2-trd-digit-reader-workflow "$DISABLE_MC --digit-subspec 0 --disable-trigrec --hbfutils-config o2_tfidinfo.root" + has_detector TRD && has_detector_from_global_reader TRD && add_W o2-trd-digit-reader-workflow "$DISABLE_MC --digit-subspec 0 --disable-trigrec --hbfutils-config o2_tfidinfo.root" && TRD_CONFIG+=" --trd-digits-spec 1 " has_detector TOF && has_detector_from_global_reader TOF && add_W o2-tof-reco-workflow "$DISABLE_MC --input-type digits --output-type NONE --hbfutils-config o2_tfidinfo.root" fi @@ -467,7 +469,7 @@ has_detector_reco TRD && (has_detector_matching ITSTPCTRD || has_detector_matchi has_detectors_reco ITS TPC && has_detector_matching ITSTPC && add_W o2-tpcits-match-workflow "$DISABLE_ROOT_INPUT $DISABLE_ROOT_OUTPUT $DISABLE_MC $SEND_ITSTPC_DTGL $TPC_CORR_SCALING --nthreads $ITSTPC_THREADS --pipeline $(get_N itstpc-track-matcher MATCH REST $ITSTPC_THREADS TPCITS)" "$ITSTPC_CONFIG_KEY;$INTERACTION_TAG_CONFIG_KEY;$ITSMFT_STROBES;$ITSEXTRAERR" has_detector_reco TRD && [[ ! -z "$TRD_SOURCES" ]] && add_W o2-trd-global-tracking "$DISABLE_ROOT_INPUT $DISABLE_ROOT_OUTPUT $DISABLE_MC $TRD_CONFIG $TRD_FILTER_CONFIG $TPC_CORR_SCALING --track-sources $TRD_SOURCES --pipeline $(get_N trd-globaltracking_TPC_ITS-TPC_ TRD REST 1 TRDTRK),$(get_N trd-globaltracking_TPC_FT0_ITS-TPC_ TRD REST 1 TRDTRK),$(get_N trd-globaltracking_TPC_FT0_ITS-TPC_CTP_ TRD REST 1 TRDTRK)" "$TRD_CONFIG_KEY;$INTERACTION_TAG_CONFIG_KEY;$ITSMFT_STROBES;$ITSEXTRAERR" has_detector_reco TOF && [[ ! -z "$TOF_SOURCES" ]] && add_W o2-tof-matcher-workflow "$DISABLE_ROOT_INPUT $DISABLE_ROOT_OUTPUT $DISABLE_MC $TPC_CORR_SCALING --track-sources $TOF_SOURCES --pipeline $(get_N tof-matcher TOF REST 1 TOFMATCH)" "$ITSMFT_STROBES;$ITSEXTRAERR" -has_detectors TPC && [[ -z "$DISABLE_ROOT_OUTPUT" && "${SKIP_TPC_CLUSTERSTRACKS_OUTPUT:-}" != 1 ]] && add_W o2-tpc-reco-workflow "--input-type pass-through --output-type clusters,tpc-triggers,tracks,send-clusters-per-sector $DISABLE_MC" +has_detectors TPC && [[ -z "$DISABLE_ROOT_OUTPUT" && "${SKIP_TPC_CLUSTERSTRACKS_OUTPUT:-}" != 1 ]] && ! has_detector_from_global_reader TPC && add_W o2-tpc-reco-workflow "--input-type pass-through --output-type clusters,tpc-triggers,tracks,send-clusters-per-sector $DISABLE_MC" # --------------------------------------------------------------------------------------------------------------------- # Reconstruction workflows normally active only in async mode in async mode ($LIST_OF_ASYNC_RECO_STEPS), but can be forced via $WORKFLOW_EXTRA_PROCESSING_STEPS @@ -502,6 +504,7 @@ has_detector_reco PHS && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output has_detector_reco FV0 && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output o2-fv0-digits-writer-workflow ) && ! has_detector_from_global_reader FV0 && add_W o2-fv0-digits-writer-workflow "$DISABLE_MC" has_detector_reco MID && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output o2-mid-decoded-digits-writer-workflow ) && ! has_detector_from_global_reader MID && add_W o2-mid-decoded-digits-writer-workflow "--mid-digits-tree-name o2sim" "" 0 has_detector_reco MCH && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output o2-mch-digits-writer-workflow ) && ! has_detector_from_global_reader MCH && add_W o2-mch-digits-writer-workflow "" "" 0 +has_detector_reco MCH && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output o2-mch-digits-writer-workflow ) && ! has_detector_from_global_reader MCH && add_W o2-mch-digits-writer-workflow "--input-digits-data-description F-DIGITS --input-digitrofs-data-description TC-F-DIGITROFS --mch-digit-outfile mchfdigits.root" "" 0 has_detector_reco MCH && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output o2-mch-clusters-writer-workflow ) && ! has_detector_from_global_reader MCH && add_W o2-mch-clusters-writer-workflow "" "" 0 has_detector_reco MCH && ( [[ -z "$DISABLE_ROOT_OUTPUT" ]] || needs_root_output o2-mch-preclusters-writer-workflow ) && ! has_detector_from_global_reader MCH && add_W o2-mch-preclusters-writer-workflow "" "" 0 From 6c70e94cddb0105187493d7698fa4db35d0dd14f Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 30 Oct 2023 08:28:33 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx b/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx index 3fa2f25978dec..bf88ce65391e3 100644 --- a/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx +++ b/Detectors/MUON/MCH/IO/src/digits-writer-workflow.cxx @@ -57,8 +57,8 @@ WorkflowSpec defineDataProcessing(const ConfigContext& cc) { bool useMC = cc.options().get("enable-mc"); auto name = fmt::format("mch-digit-writer-{}-{}", - cc.options().get("input-digits-data-description"), - cc.options().get("input-digits-data-description")); + cc.options().get("input-digits-data-description"), + cc.options().get("input-digits-data-description")); return WorkflowSpec{o2::mch::getDigitWriterSpec( useMC,