Skip to content

Commit 2c337e3

Browse files
committed
Update workflow example shell script and clean up default ARGS_ALL_CONFIG
1 parent 23ad223 commit 2c337e3

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

DATA/common/getCommonArgs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [[ -z $SEVERITY || -z $NUMAID || -z $SHMSIZE || -z $FILEWORKDIR || -z $EPNSYN
1010
fi
1111

1212
ARGS_ALL="--session ${OVERRIDE_SESSION:-default} --severity $SEVERITY --shm-segment-id ${O2JOBSHMID:-$NUMAID} --shm-segment-size $SHMSIZE ${ARGS_ALL_EXTRA:-} --early-forward-policy noraw"
13-
ARGS_ALL_CONFIG="NameConf.mDirGeom=$FILEWORKDIR;NameConf.mDirGRP=$FILEWORKDIRRUN;keyval.input_dir=$FILEWORKDIR;keyval.output_dir=/dev/null;${ALL_EXTRA_CONFIG:-}"
13+
ARGS_ALL_CONFIG="keyval.input_dir=$FILEWORKDIR;keyval.output_dir=/dev/null;${ALL_EXTRA_CONFIG:-}"
1414
if [[ $EPNSYNCMODE == 1 ]]; then
1515
ARGS_ALL+=" --infologger-severity $INFOLOGGER_SEVERITY"
1616
ARGS_ALL+=" --monitoring-backend influxdb-unix:///tmp/telegraf.sock --resources-monitoring 15"
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
#!/usr/bin/env bash
22

3+
# Make common arguments and helper functions such as add_W available
34
source common/setenv.sh
4-
5-
SEVERITY=warning
65
source common/getCommonArgs.sh
6+
source common/gen_topo_helper_functions.sh
77

8+
# Define input data required by DPL (in this case all RAWDATA from TPC)
89
PROXY_INSPEC="A:TPC/RAWDATA;dd:FLP/DISTSUBTIMEFRAME/0;eos:***/INFORMATION"
910

10-
o2-dpl-raw-proxy $ARGS_ALL \
11-
--dataspec "$PROXY_INSPEC" --inject-missing-data \
12-
--readout-proxy "--channel-config 'name=readout-proxy,type=pull,method=connect,address=ipc://@$INRAWCHANNAME,transport=shmem,rateLogging=1'" \
13-
| o2-tpc-raw-to-digits-workflow $ARGS_ALL \
14-
--input-spec "$PROXY_INSPEC" \
15-
--remove-duplicates \
16-
--configKeyValues "$ARGS_ALL_CONFIG;TPCDigitDump.LastTimeBin=1000;" \
17-
| o2-dpl-run $ARGS_ALL $GLOBALDPLOPT --dds ${WORKFLOWMODE_FILE}
11+
# Start with an empty workflow
12+
WORKFLOW=
13+
# Add required workflows via add_W helper (usage: add_W [BINARY] [COMMAND_LINE_OPTIONS] [CONFIG_KEY_VALUES] [Add ARGS_ALL_CONFIG, optional, default = 1])
14+
add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --inject-missing-data --readout-proxy \"--channel-config \\\"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\\\"\"" "" 0
15+
add_W o2-tpc-raw-to-digits-workflow "--input-spec \"$PROXY_INSPEC\" --remove-duplicates" "TPCDigitDump.LastTimeBin=1000"
16+
17+
# Finally add the o2-dpl-run workflow manually, allow for either printing the workflow or creating a topology (default)
18+
WORKFLOW+="o2-dpl-run $GLOBALDPLOPT $ARGS_ALL"
19+
[[ $WORKFLOWMODE != "print" ]] && WORKFLOW+=" --${WORKFLOWMODE} ${WORKFLOWMODE_FILE:-}"
20+
[[ $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')
21+
if [[ $WORKFLOWMODE != "print" ]]; then eval $WORKFLOW; else true; fi

0 commit comments

Comments
 (0)