Skip to content

Commit 90155e0

Browse files
slight change in logic
1 parent e9d4bea commit 90155e0

File tree

4 files changed

+38
-32
lines changed

4 files changed

+38
-32
lines changed

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

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
#!/bin/bash
22

3-
SEVERITY="detail"
4-
ENABLE_METRICS=1
3+
#SEVERITY="detail"
4+
#ENABLE_METRICS=1
55

6-
# the check on LIST_OF_DETECTORS should ensure that setenv.sh was not called before
7-
[[ -z ${LIST_OF_DETECTORS+z} ]] && source $O2DPG_ROOT/DATA/common/setenv.sh
8-
# the check on TRACK_SOURCES should ensure that workflow-setup.sh was not called before
9-
[[ -z ${TRACK_SOURCES+z} ]] && source $O2_ROOT/prodtests/full-system-test/workflow-setup.sh
10-
11-
# ---------------------------------------------------------------------------------------------------------------------
12-
# Set general arguments (only if not already defined, checked via ARGS_ALL)
13-
[[ -z ${ARGS_ALL+z} ]] && source $O2DPG_ROOT/DATA/common/getCommonArgs.sh
14-
15-
# Set up calibrations (if not already done, checked via SETUP_CALIB)
16-
[[ $SETUP_CALIB != 1 ]] && source $O2DPG_ROOT/DATA/common/setenv_calib.sh
6+
source $O2DPG_ROOT/DATA/common/setenv.sh
7+
source $O2_ROOT/prodtests/full-system-test/workflow-setup.sh
8+
source $O2DPG_ROOT/DATA/common/getCommonArgs.sh
9+
source $O2DPG_ROOT/DATA/common/setenv_calib.sh
1710

1811
# check that WORKFLOW_DETECTORS is needed, otherwise the wrong calib wf will be built
1912
if [[ -z $WORKFLOW_DETECTORS ]]; then echo "WORKFLOW_DETECTORS must be defined" 1>&2; exit 1; fi
2013

2114
# CCDB destination for uploads
22-
[[ -z ${CCDBPATH+x} ]] && CCDBPATH="http://o2-ccdb.internal"
23-
echo "CCDBPATH = $CCDBPATH" 1>&2
15+
[[ -z ${CCDB_POPULATOR_UPLOAD_PATH+x} ]] && CCDB_POPULATOR_UPLOAD_PATH="none"
16+
echo "CCDB_POPULATOR_UPLOAD_PATH = $CCDB_POPULATOR_UPLOAD_PATH" 1>&2
2417

2518
# Adding calibrations
2619
EXTRA_WORKFLOW_CALIB=
@@ -80,28 +73,32 @@ if [[ $CALIB_PHS_RUNBYRUNCALIB == 1 ]]; then
8073
fi
8174

8275
# starting with empty workflow
83-
if workflow_has_parameters CALIB_PROXIES; then
76+
if ! workflow_has_parameter CALIB_LOCAL_INTEGRATED_AGGREGATOR ; then
8477
WORKFLOW=
78+
fi
79+
80+
# adding output proxies
81+
if workflow_has_parameter CALIB_PROXIES; then
8582
if [[ ! -z $CALIBDATASPEC_BARREL ]]; then
86-
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel input) | "
83+
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel input) | "
8784
fi
8885
if [[ ! -z $CALIBDATASPEC_CALO ]]; then
89-
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_CALO\" $(get_proxy_connection calo input) | "
86+
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_CALO\" $(get_proxy_connection calo input) | "
9087
fi
9188
fi
9289

9390
WORKFLOW+=$EXTRA_WORKFLOW_CALIB
9491

95-
if [[ $CCDBPATH != "none" ]]; then WORKFLOW+="o2-calibration-ccdb-populator-workflow --ccdb-path $CCDBPATH $ARGS_ALL | "; fi
92+
if [[ $CCDB_POPULATOR_UPLOAD_PATH != "none" ]]; then WORKFLOW+="o2-calibration-ccdb-populator-workflow --ccdb-path $CCDB_POPULATOR_UPLOAD_PATH $ARGS_ALL | "; fi
9693

97-
if workflow_has_parameters CALIB_PROXIES; then
94+
if ! workflow_has_parameter CALIB_LOCAL_INTEGRATED_AGGREGATOR; then
9895
WORKFLOW+="o2-dpl-run $ARGS_ALL $GLOBALDPLOPT -b"
9996
if [ $WORKFLOWMODE == "print" ]; then
100-
echo Workflow command adding aggregator:
101-
echo $WORKFLOW | sed "s/| */|\n/g"
97+
echo Workflow command adding aggregator:
98+
echo $WORKFLOW | sed "s/| */|\n/g"
10299
else
103-
# Execute the command we have assembled
104-
WORKFLOW+=" --$WORKFLOWMODE"
105-
eval $WORKFLOW
100+
# Execute the command we have assembled
101+
WORKFLOW+=" --$WORKFLOWMODE"
102+
eval $WORKFLOW
106103
fi
107104
fi

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#!/bin/bash
22

3-
# the check on LIST_OF_DETECTORS should ensure that setenv.sh was not called before
4-
[[ -z ${LIST_OF_DETECTORS+z} ]] && source $O2DPG_ROOT/DATA/common/setenv.sh
5-
6-
# Set up calibrations (if not already done, checked via SETUP_CALIB)
7-
[[ $SETUP_CALIB != 1 ]] && source $O2DPG_ROOT/DATA/common/setenv_calib.sh
3+
source $O2DPG_ROOT/DATA/common/setenv.sh
4+
source $O2DPG_ROOT/DATA/common/setenv_calib.sh
85

96
if [[ -z "$WORKFLOW" ]] || [[ -z "$MYDIR" ]]; then
107
echo This script must be called from the dpl-workflow.sh and not standalone 1>&2
118
exit 1
129
fi
1310

11+
# you cannot have a locally integrated aggregator with the proxies
12+
if workflow_has_parameters CALIB_LOCAL_INTEGRATED_AGGREGATOR CALIB_PROXIES; then
13+
echo "you cannot have a locally integrated aggregator with the proxies" 1>&2
14+
exit 2
15+
fi
16+
1417
# specific calibration workflows
1518
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
1619

1720
# output-proxy for aggregator
18-
if workflow_has_parameters CALIB_PROXIES; then
21+
if workflow_has_parameter CALIB_PROXIES; then
1922
if [[ ! -z $CALIBDATASPEC_BARREL ]]; then
2023
WORKFLOW+="o2-dpl-output-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel output) | "
2124
fi

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ fi
387387
# ---------------------------------------------------------------------------------------------------------------------
388388
# Calibration workflows
389389
workflow_has_parameter CALIB && { source ${CALIB_WF:-$MYDIR/calib-workflow.sh}; [[ $? != 0 ]] && exit 1; }
390-
workflow_has_parameter CALIB && workflow_has_parameters CALIB_LOCAL_AGGREGATOR && { source ${CALIB_AGGREGATOR_WF:-$MYDIR/aggregator-workflow.sh}; [[ $? != 0 ]] && exit 1; }
390+
workflow_has_parameters CALIB CALIB_LOCAL_INTEGRATED_AGGREGATOR && { source ${CALIB_AGGREGATOR_WF:-$MYDIR/aggregator-workflow.sh}; [[ $? != 0 ]] && exit 1; }
391391

392392
# ---------------------------------------------------------------------------------------------------------------------
393393
# Event display

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
# used to avoid sourcing this file 2x
4+
if [[ -z $SOURCE_GUARD_WORKFLOW_SETUP ]]; then
5+
SOURCE_GUARD_WORKFLOW_SETUP=1
6+
37
# ---------------------------------------------------------------------------------------------------------------------
48
#Some additional settings used in this workflow
59

@@ -106,3 +110,5 @@ add_W() # Add binarry to workflow command USAGE: add_W [BINARY] [COMMAND_LINE_OP
106110
[[ ! -z "$KEY_VALUES" ]] && KEY_VALUES="--configKeyValues \"$KEY_VALUES\""
107111
WORKFLOW+="$1 $ARGS_ALL $2 ${!NAME_PROC_ARGS} $KEY_VALUES | "
108112
}
113+
114+
fi # workflow-setup.sh sourced

0 commit comments

Comments
 (0)