From 426d1114c07675b9cf3df013cc66f750e05fe3c9 Mon Sep 17 00:00:00 2001 From: Ole Schmidt Date: Thu, 19 Oct 2023 23:48:19 +0200 Subject: [PATCH] Add TRD krypton run workflow --- DATA/testing/detectors/TRD/trd-krypton.sh | 51 +++++++++++++++++++++++ DATA/testing/detectors/TRD/workflows.desc | 1 + 2 files changed, 52 insertions(+) create mode 100644 DATA/testing/detectors/TRD/trd-krypton.sh diff --git a/DATA/testing/detectors/TRD/trd-krypton.sh b/DATA/testing/detectors/TRD/trd-krypton.sh new file mode 100644 index 000000000..fd786f116 --- /dev/null +++ b/DATA/testing/detectors/TRD/trd-krypton.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Make common arguments and helper functions such as add_W available +source common/setenv.sh +source common/getCommonArgs.sh +source common/gen_topo_helper_functions.sh + + +# Define input data required by DPL (in this case all RAWDATA from TRD) +PROXY_INSPEC="A:TRD/RAWDATA;dd:FLP/DISTSUBTIMEFRAME/0;eos:***/INFORMATION" + +# Allow for setting external options + +: ${TRD_N_READERS:=16} +: ${TRD_N_ENCODER:=4} + +: ${EPN2EOS_METAFILES_DIR:="/data/epn2eos_tool/epn2eos"} +: ${CTF_DIR:="/data/tf/compressed"} +: ${CALIB_DIR:="/data/calibration"} + +: ${RANS_OPT:="--ans-version 1.0 --ctf-dict none"} + +: ${CTF_MINSIZE:="10000000000"} # accumulate CTFs until file size reached +: ${CTF_MAX_PER_FILE:="40000"} # but no more than given number of CTFs per file +: ${CTF_FREE_DISK_WAIT:="10"} # if disk on EPNs is close to full, wait X seconds before retrying to write +: ${CTF_MAX_FREE_DISK_WAIT:="600"} # if not enough disk space after this time throw error +: ${CTF_OUTPUT_TYPE:="ctf"} + +CTF_CONFIG="--report-data-size-interval 1000" +CTF_CONFIG+=" --output-dir $CTF_DIR --output-type $CTF_OUTPUT_TYPE --min-file-size $CTF_MINSIZE --max-ctf-per-file ${CTF_MAX_PER_FILE} --onlyDet TRD --meta-output-dir $EPN2EOS_METAFILES_DIR" +CTF_CONFIG+=" --require-free-disk 53687091200 --wait-for-free-disk $CTF_FREE_DISK_WAIT --max-wait-for-free-disk $CTF_MAX_FREE_DISK_WAIT" + + +# Start with an empty workflow +WORKFLOW= +add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --readout-proxy \"--channel-config \\\"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\\\"\"" "" 0 +add_W o2-trd-datareader "--disable-root-output --pipeline trd-datareader:$TRD_N_READERS" +add_W o2-trd-kr-clusterer "--meta-output-dir $EPN2EOS_METAFILES_DIR --output-dir $CALIB_DIR --autosave-interval 105000 --pipeline trd-kr-clusterer:8" +if workflow_has_parameter QC && has_detector_qc TRD; then + add_QC_from_consul "/o2/components/qc/ANY/any/trd-full-qcmn-test" "--local --host epn -b" +fi +if workflow_has_parameter CTF; then + add_W o2-trd-entropy-encoder-workflow "$RANS_OPT --mem-factor ${TRD_ENC_MEMFACT:-1.5} --pipeline trd-entropy-encoder:$TRD_N_ENCODER" + add_W o2-ctf-writer-workflow "$CONFIG_CTF" +fi + +# Finally add the o2-dpl-run workflow manually, allow for either printing the workflow or creating a topology (default) +WORKFLOW+="o2-dpl-run $GLOBALDPLOPT $ARGS_ALL" +[[ $WORKFLOWMODE != "print" ]] && WORKFLOW+=" --${WORKFLOWMODE} ${WORKFLOWMODE_FILE:-}" +[[ $WORKFLOWMODE == "print" || "${PRINT_WORKFLOW:-}" == "1" ]] && echo "#Workflow command:\n\n${WORKFLOW}\n" | sed -e "s/\\\\n/\n/g" -e"s/| */| \\\\\n/g" | eval cat $( [[ $WORKFLOWMODE == "dds" ]] && echo '1>&2') +if [[ $WORKFLOWMODE != "print" ]]; then eval $WORKFLOW; else true; fi diff --git a/DATA/testing/detectors/TRD/workflows.desc b/DATA/testing/detectors/TRD/workflows.desc index 859fad1e2..b0624af62 100644 --- a/DATA/testing/detectors/TRD/workflows.desc +++ b/DATA/testing/detectors/TRD/workflows.desc @@ -1 +1,2 @@ TRD-noise: "O2PDPSuite" reco,1,1,"SHMSIZE=$((128 << 30)) testing/detectors/TRD/trd-noise.sh" +TRD-krypton: "O2PDPSuite" reco,40,35,"SHMSIZE=$((128 << 30)) testing/detectors/TRD/trd-kryptona.sh"