|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
| 3 | +# Make common arguments and helper functions such as add_W available |
3 | 4 | source common/setenv.sh |
4 | | - |
5 | | -SEVERITY=warning |
6 | 5 | source common/getCommonArgs.sh |
| 6 | +source common/gen_topo_helper_functions.sh |
7 | 7 |
|
| 8 | +# Define input data required by DPL (in this case all RAWDATA from TPC) |
8 | 9 | PROXY_INSPEC="A:TPC/RAWDATA;dd:FLP/DISTSUBTIMEFRAME/0;eos:***/INFORMATION" |
9 | 10 |
|
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