Skip to content

Commit ff62b23

Browse files
committed
Simplify, add sending pedestal / threshold to DCS CCDB
1 parent de608aa commit ff62b23

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

DATA/production/calib/tpc-pedestal.sh

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,32 @@ HOST=localhost
2121
QC_CONFIG="components/qc/ANY/any/tpc-pedestal-calib-qcmn?run_type=${RUNTYPE:-}"
2222
CALIB_CONFIG="TPCCalibPedestal.ADCMin=20"
2323

24-
25-
max_events=50
26-
publish_after=400
27-
28-
if [[ ! -z ${TPC_CALIB_MAX_EVENTS:-} ]]; then
29-
max_events=${TPC_CALIB_MAX_EVENTS}
30-
fi
31-
32-
if [[ ! -z ${TPC_CALIB_PUBLISH_AFTER:-} ]]; then
33-
publish_after=${TPC_CALIB_PUBLISH_AFTER}
34-
fi
35-
24+
# ===| configuration from environment variables |===============================
25+
max_events=${TPC_CALIB_MAX_EVENTS:-50}
26+
publish_after=${TPC_CALIB_PUBLISH_AFTER:-400}
27+
sendToDCS=${TPC_CALIB_SEND_TO_DCS:-1}
28+
29+
# ===| ccdb populator setup |===================================================
30+
# the production CCDB populator will accept subspecs in this range
31+
CCDBPRO_SUBSPEC_MIN=0
32+
CCDBPRO_SUBSPEC_MAX=32767
33+
CCDBPATHPRO="http://o2-ccdb.internal"
34+
35+
# the DCS CCDB populator will accept subspecs in this range
36+
CCDBDCS_SUBSPEC_MIN=32768
37+
CCDBDCS_SUBSPEC_MAX=65535
38+
CCDBPATHDCS="$DCSCCDBSERVER_PERS"
3639

3740
#################################################################################################################################
3841

3942

4043
WORKFLOW=
4144
add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --inject-missing-data --channel-config \"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\"" "" 0
42-
add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36" "${CALIB_CONFIG}"
43-
add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"http://o2-ccdb.internal\" " "" 0
45+
add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36 --send-to-dcs-ccdb $sendToDCS" "${CALIB_CONFIG}"
46+
add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"$CCDBPATHPRO\" --sspec-min $CCDBPRO_SUBSPEC_MIN --sspec-max $CCDBPRO_SUBSPEC_MAX" "" 0
47+
if [[ $sendToDCS -eq 1 ]]; then
48+
add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"$CCDBPATHDCS\" --sspec-min $CCDBDCS_SUBSPEC_MIN --sspec-max $CCDBDCS_SUBSPEC_MAX --name-extention dcs" "" 0
49+
fi
4450
add_QC_from_apricot "${QC_CONFIG}" "--local --host localhost"
4551

4652
WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}"

0 commit comments

Comments
 (0)