@@ -155,25 +155,35 @@ if workflow_has_parameter CALIB_PROXIES; then
155155 if [[ -n ${CALIBDATASPEC_BARREL_SPORADIC:- } ]]; then
156156 add_W o2-dpl-raw-proxy " --dataspec \" $CALIBDATASPEC_BARREL_SPORADIC \" $( get_proxy_connection barrel_sp input sporadic) " " " 0
157157 fi
158- elif [[ $AGGREGATOR_TASKS == TPC_IDCBOTH_SAC ]]; then
158+ elif [[ $AGGREGATOR_TASKS == TPC_IDCBOTH_SAC || $AGGREGATOR_TASKS == TPC_CMV ]]; then
159159 if [[ $EPNSYNCMODE != 1 ]]; then
160- echo " ERROR: TPC IDC / SAC calib workflow enabled without EPNSYNCMODE, please note that there will not be input data for it" 1>&2
160+ echo " ERROR: TPC IDC / SAC / CMV calib workflow enabled without EPNSYNCMODE, please note that there will not be input data for it" 1>&2
161161 fi
162162 CHANNELS_LIST=
163163 [[ $EPNSYNCMODE == 0 ]] && FLP_ADDRESS=" tcp://localhost:29950"
164164 if [[ -n ${CALIBDATASPEC_TPCIDC_A:- } ]] || [[ -n ${CALIBDATASPEC_TPCIDC_C:- } ]] || [[ -n ${CALIBDATASPEC_TPCCMV:- } ]]; then
165- # define port for FLP
166- : ${TPC_IDC_FLP_PORT:= 29950}
165+ # define port for FLP and channel prefix
166+ TPC_FLP_PORT=
167+ TPC_FLP_CHAN_PREFIX=
168+ if [[ $AGGREGATOR_TASKS == TPC_CMV ]] && [[ -n ${CALIBDATASPEC_TPCCMV:- } ]]; then
169+ TPC_FLP_PORT=29952
170+ TPC_FLP_CHAN_PREFIX=tpccmv
171+ elif [[ $AGGREGATOR_TASKS == TPC_IDCBOTH_SAC ]] && [[ -n ${CALIBDATASPEC_TPCIDC_A:- } || -n ${CALIBDATASPEC_TPCIDC_C:- } ]]; then
172+ TPC_FLP_PORT=29950
173+ TPC_FLP_CHAN_PREFIX=tpcidc
174+ fi
167175 # expand FLPs; TPC uses from 001 to 145, but 145 is reserved for SAC
168- if [[ " ${GEN_TOPO_DEPLOYMENT_TYPE:- } " == " ALICE_STAGING" ]]; then
169- FLP_ADDRESS=" tcp://alio2-cr1-mvs03-ib:${TPC_IDC_FLP_PORT} "
170- CHANNELS_LIST+=" type=pull,name=tpcidc_flp,transport=zeromq,address=$FLP_ADDRESS ,method=connect,rateLogging=10;"
171- else
172- for flp in $( seq -f " %03g" 1 144) ; do
173- [[ ! $FLP_IDS =~ (^| ,)" $flp " (,| $) ]] && continue
174- [[ $EPNSYNCMODE == 1 ]] && FLP_ADDRESS=" tcp://alio2-cr1-flp${flp} -ib:${TPC_IDC_FLP_PORT} "
175- CHANNELS_LIST+=" type=pull,name=tpcidc_flp${flp} ,transport=zeromq,address=$FLP_ADDRESS ,method=connect,rateLogging=10;"
176- done
176+ if [[ -n $TPC_FLP_PORT ]]; then
177+ if [[ " ${GEN_TOPO_DEPLOYMENT_TYPE:- } " == " ALICE_STAGING" ]]; then
178+ FLP_ADDRESS=" tcp://alio2-cr1-mvs03-ib:${TPC_FLP_PORT} "
179+ CHANNELS_LIST+=" type=pull,name=${TPC_FLP_CHAN_PREFIX} _flp,transport=zeromq,address=$FLP_ADDRESS ,method=connect,rateLogging=10;"
180+ else
181+ for flp in $( seq -f " %03g" 1 144) ; do
182+ [[ ! $FLP_IDS =~ (^| ,)" $flp " (,| $) ]] && continue
183+ [[ $EPNSYNCMODE == 1 ]] && FLP_ADDRESS=" tcp://alio2-cr1-flp${flp} -ib:${TPC_FLP_PORT} "
184+ CHANNELS_LIST+=" type=pull,name=${TPC_FLP_CHAN_PREFIX} _flp${flp} ,transport=zeromq,address=$FLP_ADDRESS ,method=connect,rateLogging=10;"
185+ done
186+ fi
177187 fi
178188 fi
179189 if [[ -n ${CALIBDATASPEC_TPCSAC:- } ]]; then
@@ -184,22 +194,25 @@ if workflow_has_parameter CALIB_PROXIES; then
184194 fi
185195 if [[ -n $CHANNELS_LIST ]]; then
186196 DATASPEC_LIST=
187- if [[ -n ${CALIBDATASPEC_TPCIDC_A:- } ]]; then
188- add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCIDC_A \" "
189- fi
190- if [[ -n ${CALIBDATASPEC_TPCIDC_C:- } ]]; then
191- add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCIDC_C \" "
192- fi
193- if [[ -n ${CALIBDATASPEC_TPCCMV:- } ]]; then
194- add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCCMV \" "
195- fi
196- if [[ -n ${CALIBDATASPEC_TPCSAC:- } ]]; then
197- add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCSAC \" "
197+ if [[ $AGGREGATOR_TASKS == TPC_CMV ]]; then
198+ if [[ -n ${CALIBDATASPEC_TPCCMV:- } ]]; then
199+ add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCCMV \" "
200+ fi
201+ else
202+ if [[ -n ${CALIBDATASPEC_TPCIDC_A:- } ]]; then
203+ add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCIDC_A \" "
204+ fi
205+ if [[ -n ${CALIBDATASPEC_TPCIDC_C:- } ]]; then
206+ add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCIDC_C \" "
207+ fi
208+ if [[ -n ${CALIBDATASPEC_TPCSAC:- } ]]; then
209+ add_semicolon_separated DATASPEC_LIST " \" $CALIBDATASPEC_TPCSAC \" "
210+ fi
198211 fi
199212 if [[ -z ${O2_TPC_IDC_CMV_IO_THREADS:- } ]]; then
200213 O2_TPC_IDC_CMV_IO_THREADS=4;
201- fi
202- add_W o2-dpl-raw-proxy " --proxy-name tpcidc --io-threads ${O2_TPC_IDC_CMV_IO_THREADS} --dataspec \" $DATASPEC_LIST \" --sporadic-outputs --channel-config \" $CHANNELS_LIST \" ${TIMEFRAME_SHM_LIMIT+--timeframes-shm-limit} $TIMEFRAME_SHM_LIMIT " " " 0
214+ fi
215+ add_W o2-dpl-raw-proxy " --proxy-name ${TPC_FLP_CHAN_PREFIX} --io-threads ${O2_TPC_IDC_CMV_IO_THREADS} --dataspec \" $DATASPEC_LIST \" --sporadic-outputs --channel-config \" $CHANNELS_LIST \" ${TIMEFRAME_SHM_LIMIT+--timeframes-shm-limit} $TIMEFRAME_SHM_LIMIT " " " 0
203216 fi
204217 elif [[ $AGGREGATOR_TASKS == CALO_TF ]]; then
205218 if [[ -n ${CALIBDATASPEC_CALO_TF:- } ]]; then
@@ -309,31 +322,34 @@ nTFs_SAC=$((10000 * 128 / ${NHBPERTF}))
309322nBuffer=$(( 100 * 128 / ${NHBPERTF} ))
310323nBuffer_cmv=$(( 50 * 128 / ${NHBPERTF} ))
311324lanesCMVaggregate=${O2_TPC_CMV_AGGREGATE_NLANES:- 8}
325+ cmvCompression=${O2_TPC_CMV_COMPRESSION:- --use-sparse --cmv-zero-threshold 1.0 --cmv-dynamic-precision-mean 1.0 --cmv-dynamic-precision-sigma 8.0 --use-compression-huffman}
326+ cmvTimeframes=${O2_TPC_CMV_TIMEFRAMES:- 2000}
312327IDC_DELTA=" --disable-IDCDelta true" # off by default
313328# deltas are on by default; you need to request explicitly to switch them off;
314329if [[ " ${DISABLE_IDC_DELTA:- } " == " 1" ]]; then IDC_DELTA=" " ; fi
315330if [[ " ${ENABLE_IDC_DELTA_FILE:- } " == " 1" ]]; then IDC_DELTA+=" --dump-IDCDelta-calib-data true --output-dir $CALIB_DIR --meta-output-dir $EPN2EOS_METAFILES_DIR " ; fi
316331
317332if [[ " ${DISABLE_IDC_PAD_MAP_WRITING:- } " == 1 ]]; then TPC_WRITING_PAD_STATUS_MAP=" " ; else TPC_WRITING_PAD_STATUS_MAP=" --enableWritingPadStatusMap true" ; fi
318333
319- if ! workflow_has_parameter CALIB_LOCAL_INTEGRATED_AGGREGATOR && [[ $AGGREGATOR_TASKS == TPC_IDCBOTH_SAC || $AGGREGATOR_TASKS == ALL ]]; then
320- if [[ $CALIB_TPC_IDC == 1 ]]; then
321- add_W o2-tpc-idc-distribute " --crus ${crus} --timeframes ${nTFs} --output-lanes ${lanesFactorize} --send-precise-timestamp true --condition-tf-per-query ${nTFs} --n-TFs-buffer ${nBuffer} "
322- add_W o2-tpc-idc-factorize " --n-TFs-buffer ${nBuffer} --input-lanes ${lanesFactorize} --crus ${crus} --timeframes ${nTFs} --nthreads-grouping ${threadFactorize} --nthreads-IDC-factorization ${threadFactorize} --sendOutputFFT true --enable-CCDB-output true --enablePadStatusMap true ${TPC_WRITING_PAD_STATUS_MAP} --use-precise-timestamp true $IDC_DELTA " " TPCIDCGroupParam.groupPadsSectorEdges=32211"
323- add_W o2-tpc-idc-ft-aggregator " --rangeIDC 200 --inputLanes ${lanesFactorize} --nFourierCoeff 40 --nthreads 8"
324- fi
325- if [[ $CALIB_TPC_CMV == 1 ]]; then
326- if [[ -z ${O2_TPC_CMV_COMPRESSION:- } ]]; then O2_TPC_CMV_COMPRESSION=" --use-sparse --cmv-zero-threshold 1.0 --cmv-dynamic-precision-mean 1.0 --cmv-dynamic-precision-sigma 8.0 --use-compression-huffman" ; fi
327- if [[ -z ${O2_TPC_CMV_TIMEFRAMES:- } ]]; then O2_TPC_CMV_TIMEFRAMES=" 2000" ; fi
328- add_W o2-tpc-cmv-distribute " --crus ${crus} --lanes 1 --output-lanes ${lanesCMVaggregate} --n-TFs-buffer ${nBuffer_cmv} --timeframes ${O2_TPC_CMV_TIMEFRAMES} --send-precise-timestamp "
329- add_W o2-tpc-cmv-aggregate " --crus ${crus} --input-lanes ${lanesCMVaggregate} --n-TFs-buffer ${nBuffer_cmv} --nthreads-compression 4 --timeframes ${O2_TPC_CMV_TIMEFRAMES} --use-precise-timestamp ${O2_TPC_CMV_COMPRESSION} --output-dir $CALIB_DIR --meta-output-dir $EPN2EOS_METAFILES_DIR "
330- fi
331- if [[ $CALIB_TPC_SAC == 1 ]]; then
332- add_W o2-tpc-sac-distribute " --timeframes ${nTFs_SAC} --output-lanes 1 "
333- add_W o2-tpc-sac-factorize " --timeframes ${nTFs_SAC} --nthreads-SAC-factorization 4 --input-lanes 1 --compression 2"
334- add_W o2-tpc-idc-ft-aggregator " --rangeIDC 200 --nFourierCoeff 40 --process-SACs true --inputLanes 1"
334+ if ! workflow_has_parameter CALIB_LOCAL_INTEGRATED_AGGREGATOR; then
335+ if [[ $AGGREGATOR_TASKS == TPC_IDCBOTH_SAC || $AGGREGATOR_TASKS == ALL ]]; then
336+ if [[ $CALIB_TPC_IDC == 1 ]]; then
337+ add_W o2-tpc-idc-distribute " --crus ${crus} --timeframes ${nTFs} --output-lanes ${lanesFactorize} --send-precise-timestamp true --condition-tf-per-query ${nTFs} --n-TFs-buffer ${nBuffer} "
338+ add_W o2-tpc-idc-factorize " --n-TFs-buffer ${nBuffer} --input-lanes ${lanesFactorize} --crus ${crus} --timeframes ${nTFs} --nthreads-grouping ${threadFactorize} --nthreads-IDC-factorization ${threadFactorize} --sendOutputFFT true --enable-CCDB-output true --enablePadStatusMap true ${TPC_WRITING_PAD_STATUS_MAP} --use-precise-timestamp true $IDC_DELTA " " TPCIDCGroupParam.groupPadsSectorEdges=32211"
339+ add_W o2-tpc-idc-ft-aggregator " --rangeIDC 200 --inputLanes ${lanesFactorize} --nFourierCoeff 40 --nthreads 8"
340+ fi
341+ if [[ $CALIB_TPC_SAC == 1 ]]; then
342+ add_W o2-tpc-sac-distribute " --timeframes ${nTFs_SAC} --output-lanes 1 "
343+ add_W o2-tpc-sac-factorize " --timeframes ${nTFs_SAC} --nthreads-SAC-factorization 4 --input-lanes 1 --compression 2"
344+ add_W o2-tpc-idc-ft-aggregator " --rangeIDC 200 --nFourierCoeff 40 --process-SACs true --inputLanes 1"
345+ fi
346+ elif [[ $AGGREGATOR_TASKS == TPC_CMV || $AGGREGATOR_TASKS == ALL ]]; then
347+ if [[ $CALIB_TPC_CMV == 1 ]]; then
348+ add_W o2-tpc-cmv-distribute " --crus ${crus} --lanes 1 --output-lanes ${lanesCMVaggregate} --n-TFs-buffer ${nBuffer_cmv} --timeframes ${cmvTimeframes} --send-precise-timestamp "
349+ add_W o2-tpc-cmv-aggregate " --crus ${crus} --input-lanes ${lanesCMVaggregate} --n-TFs-buffer ${nBuffer_cmv} --nthreads-compression 4 --timeframes ${cmvTimeframes} --use-precise-timestamp ${cmvCompression} --output-dir $CALIB_DIR --meta-output-dir $EPN2EOS_METAFILES_DIR "
350+ CCDB_POPULATOR_UPLOAD_PATH=none
351+ fi
335352 fi
336- [[ $AGGREGATOR_TASKS == TPC_IDCBOTH_SAC ]] && [[ $CALIB_TPC_IDC == 0 && $CALIB_TPC_SAC == 0 && $CALIB_TPC_CMV == 1 ]] && CCDB_POPULATOR_UPLOAD_PATH=" none"
337353fi
338354
339355# Calo cal
0 commit comments