Skip to content

Commit 5ce0df9

Browse files
dstoccomartenole
authored andcommitted
Use add_W to build MID bad channels calibration workflow
1 parent ef0e84d commit 5ce0df9

1 file changed

Lines changed: 29 additions & 9 deletions

File tree

DATA/production/calib/mid-badchannels.sh

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,50 @@
11
#!/usr/bin/env bash
22

33
# shellcheck disable=SC1091
4+
# Common environment. Notice that this sources common/gen_topo_helper_functions.sh
45
source common/setenv.sh
56

6-
# shellcheck disable=SC1091
7+
# Set general arguments
78
source common/getCommonArgs.sh
89

910
MID_PROXY_INSPEC_EOS="eos:***/INFORMATION"
1011
MID_PROXY_INSPEC_DD="dd:FLP/DISTSUBTIMEFRAME/0"
1112
MID_RAW_PROXY_INSPEC="A:MID/RAWDATA;$MID_PROXY_INSPEC_DD;$MID_PROXY_INSPEC_EOS"
1213
MID_DPL_CHANNEL_CONFIG="name=readout-proxy,type=pull,method=connect,address=ipc://@$INRAWCHANNAME,transport=shmem,rateLogging=1"
13-
CONSUL_ENDPOINT="alio2-cr1-hv-con01.cern.ch:8500"
14+
1415
if [[ -z $CTF_CONFIG ]]; then CTF_CONFIG="--report-data-size-interval 250"; fi
1516
if [[ -z $CTF_DIR ]]; then CTF_DIR="$FILEWORKDIR"; fi
1617
if [[ -z $CTF_MINSIZE ]]; then CTF_MINSIZE="2000000000"; fi
1718
if [[ -z $CTF_MAX_PER_FILE ]]; then CTF_MAX_PER_FILE="10000"; fi
1819
if [[ -z $EPN2EOS_METAFILES_DIR ]]; then EPN2EOS_METAFILES_DIR="/dev/null"; fi
1920
CONFIG_CTF="--output-dir \"$CTF_DIR\" $CTF_CONFIG --output-type ctf --min-file-size ${CTF_MINSIZE} --max-ctf-per-file ${CTF_MAX_PER_FILE} --onlyDet MID $CTF_MAXDETEXT --meta-output-dir $EPN2EOS_METAFILES_DIR"
2021

21-
WORKFLOW="o2-dpl-raw-proxy $ARGS_ALL --dataspec \"$MID_RAW_PROXY_INSPEC\" --channel-config \"$MID_DPL_CHANNEL_CONFIG\" | "
22-
WORKFLOW+="o2-mid-raw-to-digits-workflow $ARGS_ALL | "
23-
workflow_has_parameter CTF && WORKFLOW+="o2-mid-entropy-encoder-workflow $ARGS_ALL | o2-ctf-writer-workflow $ARGS_ALL $CONFIG_CTF | "
24-
WORKFLOW+="o2-mid-calibration-workflow $ARGS_ALL | "
25-
WORKFLOW+="o2-calibration-ccdb-populator-workflow $ARGS_ALL --configKeyValues \"$ARGS_ALL_CONFIG\" --ccdb-path=\"http://o2-ccdb.internal\" --sspec-min 0 --sspec-max 0 | "
26-
WORKFLOW+="o2-calibration-ccdb-populator-workflow $ARGS_ALL --configKeyValues \"$ARGS_ALL_CONFIG\" --ccdb-path=\"http://alio2-cr1-flp199.cern.ch:8083\" --sspec-min 1 --sspec-max 1 --name-extention dcs | "
27-
workflow_has_parameter QC && WORKFLOW+="o2-qc $ARGS_ALL --config consul-json://${CONSUL_ENDPOINT}/o2/components/qc/ANY/any/mid-calib-qcmn --local --host localhost | "
22+
# CCDB destination for uploads
23+
if [[ -z ${CCDB_POPULATOR_UPLOAD_PATH} ]]; then
24+
if [[ $RUNTYPE == "SYNTHETIC" || "${GEN_TOPO_DEPLOYMENT_TYPE:-}" == "ALICE_STAGING" ]]; then
25+
CCDB_POPULATOR_UPLOAD_PATH="http://ccdb-test.cern.ch:8080"
26+
CCDB_POPULATOR_UPLOAD_PATH_DCS="$CCDB_POPULATOR_UPLOAD_PATH"
27+
else
28+
CCDB_POPULATOR_UPLOAD_PATH="http://o2-ccdb.internal"
29+
CCDB_POPULATOR_UPLOAD_PATH_DCS="http://alio2-cr1-flp199.cern.ch:8083"
30+
fi
31+
fi
32+
if [[ "${GEN_TOPO_VERBOSE:-}" == "1" ]]; then
33+
echo "CCDB_POPULATOR_UPLOAD_PATH = $CCDB_POPULATOR_UPLOAD_PATH" 1>&2
34+
echo "CCDB_POPULATOR_UPLOAD_PATH_DCS = $CCDB_POPULATOR_UPLOAD_PATH_DCS" 1>&2
35+
fi
36+
37+
WORKFLOW=""
38+
add_W o2-dpl-raw-proxy "--dataspec \"$MID_RAW_PROXY_INSPEC\" --channel-config \"$MID_DPL_CHANNEL_CONFIG\"" "" 0
39+
add_W o2-mid-raw-to-digits-workflow "" "" 0
40+
workflow_has_parameter CTF && {
41+
add_W o2-mid-entropy-encoder-workflow "" "" 0
42+
add_W o2-ctf-writer-workflow "$CONFIG_CTF" "" 0
43+
}
44+
add_W o2-mid-calibration-workflow "" "" 0
45+
add_W o2-calibration-ccdb-populator-workflow "--ccdb-path=\"$CCDB_POPULATOR_UPLOAD_PATH\" --sspec-min 0 --sspec-max 0"
46+
add_W o2-calibration-ccdb-populator-workflow "--ccdb-path=\"$CCDB_POPULATOR_UPLOAD_PATH_DCS\" --sspec-min 1 --sspec-max 1 --name-extention dcs"
47+
workflow_has_parameter QC && add_QC_from_consul "/o2/components/qc/ANY/any/mid-calib-qcmn" "--local --host localhost"
2848
WORKFLOW+="o2-dpl-run $ARGS_ALL $GLOBALDPLOPT"
2949

3050
if [ "$WORKFLOWMODE" == "print" ]; then

0 commit comments

Comments
 (0)