Skip to content

Commit d30ec8a

Browse files
adding calib-workflow
1 parent 6593894 commit d30ec8a

File tree

3 files changed

+68
-5
lines changed

3 files changed

+68
-5
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
SEVERITY="detail"
4+
ENABLE_METRICS=1
5+
source $O2DPG_ROOT/DATA/common/setenv.sh
6+
source $O2_ROOT/prodtests/full-system-test/workflow-setup.sh
7+
8+
# ---------------------------------------------------------------------------------------------------------------------
9+
# Set general arguments
10+
source $O2DPG_ROOT/DATA/common/getCommonArgs.sh
11+
12+
# Set up calibrations
13+
source $O2DPG_ROOT/DATA/common/setenv_calib.sh
14+
15+
# Adding calibrations
16+
EXTRA_WORKFLOW=
17+
18+
echo "CALIB_PRIMVTX_MEANVTX = $CALIB_PRIMVTX_MEANVTX" 1>&2
19+
echo "CALIB_TOF_LHCPHASE = $CALIB_TOF_LHCPHASE" 1>&2
20+
echo "CALIB_TOF_CHANNELOFFSETS = $CALIB_TOF_CHANNELOFFSETS" 1>&2
21+
echo "CALIB_TOF_DIAGNOSTICS = $CALIB_TOF_DIAGNOSTICS" 1>&2
22+
23+
# PrimVertex
24+
if [[ $CALIB_PRIMVTX_MEANVTX == 1 ]]; then
25+
EXTRA_WORKFLOW+="o2-calibration-mean-vertex-calibration-workflow $ARGS_ALL | "
26+
fi
27+
28+
# TOF
29+
if [[ $CALIB_TOF_LHCPHASE == 1 ]] || [[ $CALIB_TOF_CHANNELOFFSETS == 1 ]]; then
30+
if [[ $CALIB_TOF_LHCPHASE == 1 ]]; then
31+
EXTRA_WORKFLOW+="o2-calibration-tof-calib-workflow $ARGS_ALL --do-lhc-phase --tf-per-slot 10 | "
32+
fi
33+
if [[ $CALIB_TOF_CHANNELOFFSETS == 1 ]]; then
34+
EXTRA_WORKFLOW+="o2-calibration-tof-calib-workflow $ARGS_ALL --do-channel-offset --update-at-end-of-run-only --min-entries 8 --range 100000 |"
35+
fi
36+
fi
37+
if [[ $CALIB_TOF_DIAGNOSTICS == 1 ]]; then
38+
EXTRA_WORKFLOW+="o2-calibration-tof-diagnostic-workflow $ARGS_ALL --tf-per-slot 26400 | "
39+
fi
40+
41+
WORKFLOW="o2-dpl-raw-proxy $ARGS_ALL --proxy-name aggregator-proxy --dataspec \"$CALIBDATASPEC\" --channel-config \"name=aggregator-proxy,method=bind,type=pull,rateLogging=1,transport=zeromq,address=tcp://localhost:30453\" |"
42+
WORKFLOW+=$EXTRA_WORKFLOW
43+
WORKFLOW+="o2-dpl-run $ARGS_ALL $GLOBALDPLOPT"
44+
45+
if [ $WORKFLOWMODE == "print" ]; then
46+
echo Workflow command:
47+
echo $WORKFLOW | sed "s/| */|\n/g"
48+
else
49+
# Execute the command we have assembled
50+
WORKFLOW+=" --$WORKFLOWMODE"
51+
eval $WORKFLOW
52+
fi
Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
#!/bin/bash
22

3+
# ---------------------------------------------------------------------------------------------------------------------
4+
# Get this script's directory and load common settings (use zsh first (e.g. on Mac) and fallback on `readlink -f` if zsh is not there)
5+
MYDIR="$(dirname $(realpath $0))"
6+
source $O2DPG_ROOT/DATA/common/setenv.sh
7+
source $O2DPG_ROOT/DATA/common/setenv_calib.sh
8+
39
if [[ -z "$WORKFLOW" ]] || [[ -z "$MYDIR" ]]; then
410
echo This script must be called from the dpl-workflow.sh and not standalone 1>&2
511
exit 1
612
fi
713

8-
if [[ $BEAMTYPE != "cosmic" ]]; then
9-
has_detector_calib TPC && has_detectors TPC ITS TRD TOF && add_W o2-tpc-scdcalib-interpolation-workflow "$DISABLE_ROOT_OUTPUT --disable-root-input --pipeline $(get_N tpc-track-interpolation TPC REST)" "$ITSMFT_FILES"
10-
has_detector_calib ITS && has_detectors ITS && has_detectors_reco ITS && has_detector_matching PRIMVTX && [[ ! -z "$VERTEXING_SOURCES" ]] && add_W o2-calibration-mean-vertex-calibration-workflow
11-
has_detector_calib TRD && has_detector ITS TPC TRD && add_W o2-calibration-trd-vdrift-exb
14+
# specific calibration workflows
15+
if [[ $CALIB_TPC_SCDCALIB == 1 ]]; then add_W o2-tpc-scdcalib-interpolation-workflow "$DISABLE_ROOT_OUTPUT --disable-root-input --pipeline $(get_N tpc-track-interpolation TPC REST)" "$ITSMFT_FILES"; fi
16+
17+
# output-proxy for aggregator
18+
if [[ ! -z $CALIBDATASPEC ]]; then
19+
WORKFLOW+="o2-dpl-output-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC\" --proxy-channel-name aggregator-proxy --channel-config \"name=aggregator-proxy,method=connect,type=push,transport=zeromq,rateLogging=1,address=tcp://localhost:30453\" | "
1220
fi
1321

1422
true # everything OK up to this point, so the script should return 0 (it is !=0 already if a has_detector check fails)

prodtests/full-system-test/dpl-workflow.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,10 @@ fi
386386

387387
# ---------------------------------------------------------------------------------------------------------------------
388388
# Calibration workflows
389-
workflow_has_parameter CALIB && { source $MYDIR/calib-workflow.sh; [[ $? != 0 ]] && exit 1; }
389+
if [[ -z $CALIB_WF ]]; then
390+
CALIB_WF=$MYDIR/calib-workflow.sh
391+
fi
392+
workflow_has_parameter CALIB && { source $CALIB_WF; [[ $? != 0 ]] && exit 1; }
390393

391394
# ---------------------------------------------------------------------------------------------------------------------
392395
# Event display

0 commit comments

Comments
 (0)