Skip to content

Commit 4f32188

Browse files
martenoleBenedikt Volkel
authored andcommitted
Add TRD krypton run workflow (#1286)
1 parent 9813fd4 commit 4f32188

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
3+
# Make common arguments and helper functions such as add_W available
4+
source common/setenv.sh
5+
source common/getCommonArgs.sh
6+
source common/gen_topo_helper_functions.sh
7+
8+
9+
# Define input data required by DPL (in this case all RAWDATA from TRD)
10+
PROXY_INSPEC="A:TRD/RAWDATA;dd:FLP/DISTSUBTIMEFRAME/0;eos:***/INFORMATION"
11+
12+
# Allow for setting external options
13+
14+
: ${TRD_N_READERS:=16}
15+
: ${TRD_N_ENCODER:=4}
16+
17+
: ${EPN2EOS_METAFILES_DIR:="/data/epn2eos_tool/epn2eos"}
18+
: ${CTF_DIR:="/data/tf/compressed"}
19+
: ${CALIB_DIR:="/data/calibration"}
20+
21+
: ${RANS_OPT:="--ans-version 1.0 --ctf-dict none"}
22+
23+
: ${CTF_MINSIZE:="10000000000"} # accumulate CTFs until file size reached
24+
: ${CTF_MAX_PER_FILE:="40000"} # but no more than given number of CTFs per file
25+
: ${CTF_FREE_DISK_WAIT:="10"} # if disk on EPNs is close to full, wait X seconds before retrying to write
26+
: ${CTF_MAX_FREE_DISK_WAIT:="600"} # if not enough disk space after this time throw error
27+
: ${CTF_OUTPUT_TYPE:="ctf"}
28+
29+
CTF_CONFIG="--report-data-size-interval 1000"
30+
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"
31+
CTF_CONFIG+=" --require-free-disk 53687091200 --wait-for-free-disk $CTF_FREE_DISK_WAIT --max-wait-for-free-disk $CTF_MAX_FREE_DISK_WAIT"
32+
33+
34+
# Start with an empty workflow
35+
WORKFLOW=
36+
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
37+
add_W o2-trd-datareader "--disable-root-output --pipeline trd-datareader:$TRD_N_READERS"
38+
add_W o2-trd-kr-clusterer "--meta-output-dir $EPN2EOS_METAFILES_DIR --output-dir $CALIB_DIR --autosave-interval 105000 --pipeline trd-kr-clusterer:8"
39+
if workflow_has_parameter QC && has_detector_qc TRD; then
40+
add_QC_from_consul "/o2/components/qc/ANY/any/trd-full-qcmn-test" "--local --host epn -b"
41+
fi
42+
if workflow_has_parameter CTF; then
43+
add_W o2-trd-entropy-encoder-workflow "$RANS_OPT --mem-factor ${TRD_ENC_MEMFACT:-1.5} --pipeline trd-entropy-encoder:$TRD_N_ENCODER"
44+
add_W o2-ctf-writer-workflow "$CONFIG_CTF"
45+
fi
46+
47+
# Finally add the o2-dpl-run workflow manually, allow for either printing the workflow or creating a topology (default)
48+
WORKFLOW+="o2-dpl-run $GLOBALDPLOPT $ARGS_ALL"
49+
[[ $WORKFLOWMODE != "print" ]] && WORKFLOW+=" --${WORKFLOWMODE} ${WORKFLOWMODE_FILE:-}"
50+
[[ $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')
51+
if [[ $WORKFLOWMODE != "print" ]]; then eval $WORKFLOW; else true; fi
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
TRD-noise: "O2PDPSuite" reco,1,1,"SHMSIZE=$((128 << 30)) testing/detectors/TRD/trd-noise.sh"
2+
TRD-krypton: "O2PDPSuite" reco,40,35,"SHMSIZE=$((128 << 30)) testing/detectors/TRD/trd-kryptona.sh"

0 commit comments

Comments
 (0)