Skip to content

Commit e9d4bea

Browse files
making aggregator independent of proxies
1 parent c8ecd39 commit e9d4bea

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
SEVERITY="detail"
44
ENABLE_METRICS=1
5-
source $O2DPG_ROOT/DATA/common/setenv.sh
6-
source $O2_ROOT/prodtests/full-system-test/workflow-setup.sh
5+
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
710

811
# ---------------------------------------------------------------------------------------------------------------------
9-
# Set general arguments
10-
source $O2DPG_ROOT/DATA/common/getCommonArgs.sh
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
1114

12-
# Set up calibrations
13-
source $O2DPG_ROOT/DATA/common/setenv_calib.sh
15+
# Set up calibrations (if not already done, checked via SETUP_CALIB)
16+
[[ $SETUP_CALIB != 1 ]] && source $O2DPG_ROOT/DATA/common/setenv_calib.sh
1417

1518
# check that WORKFLOW_DETECTORS is needed, otherwise the wrong calib wf will be built
1619
if [[ -z $WORKFLOW_DETECTORS ]]; then echo "WORKFLOW_DETECTORS must be defined" 1>&2; exit 1; fi
@@ -80,10 +83,10 @@ fi
8083
if workflow_has_parameters CALIB_PROXIES; then
8184
WORKFLOW=
8285
if [[ ! -z $CALIBDATASPEC_BARREL ]]; then
83-
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel input) | "
86+
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel input) | "
8487
fi
8588
if [[ ! -z $CALIBDATASPEC_CALO ]]; then
86-
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_CALO\" $(get_proxy_connection calo input) | "
89+
WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_CALO\" $(get_proxy_connection calo input) | "
8790
fi
8891
fi
8992

@@ -94,11 +97,11 @@ if [[ $CCDBPATH != "none" ]]; then WORKFLOW+="o2-calibration-ccdb-populator-work
9497
if workflow_has_parameters CALIB_PROXIES; then
9598
WORKFLOW+="o2-dpl-run $ARGS_ALL $GLOBALDPLOPT -b"
9699
if [ $WORKFLOWMODE == "print" ]; then
97-
echo Workflow command adding aggregator:
98-
echo $WORKFLOW | sed "s/| */|\n/g"
100+
echo Workflow command adding aggregator:
101+
echo $WORKFLOW | sed "s/| */|\n/g"
99102
else
100-
# Execute the command we have assembled
101-
WORKFLOW+=" --$WORKFLOWMODE"
102-
eval $WORKFLOW
103+
# Execute the command we have assembled
104+
WORKFLOW+=" --$WORKFLOWMODE"
105+
eval $WORKFLOW
103106
fi
104107
fi

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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
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
88

99
if [[ -z "$WORKFLOW" ]] || [[ -z "$MYDIR" ]]; then
1010
echo This script must be called from the dpl-workflow.sh and not standalone 1>&2

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_PROXIES && { source ${CALIB_AGGREGATOR_WF:-$MYDIR/aggregator-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; }
391391

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

0 commit comments

Comments
 (0)