-
Notifications
You must be signed in to change notification settings - Fork 483
Calib workflow #8736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Calib workflow #8736
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d30ec8a
adding calib-workflow
chiarazampolli c666a06
PHS + EMC + aggregator
chiarazampolli 39c5b18
Using function for proxies
chiarazampolli 3911ef5
adding TRD to aggregator
chiarazampolli a7185a1
run calib w/o proxies in main workflow
chiarazampolli 0ebeacd
fixes in logic
chiarazampolli 8421876
to avoid conflict with same options in other wf's
chiarazampolli c8ecd39
fixes
chiarazampolli e9d4bea
making aggregator independent of proxies
chiarazampolli 90155e0
slight change in logic
chiarazampolli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| #!/bin/bash | ||
|
|
||
| #SEVERITY="detail" | ||
| #ENABLE_METRICS=1 | ||
|
|
||
| source $O2DPG_ROOT/DATA/common/setenv.sh | ||
| source $O2_ROOT/prodtests/full-system-test/workflow-setup.sh | ||
| source $O2DPG_ROOT/DATA/common/getCommonArgs.sh | ||
| source $O2DPG_ROOT/DATA/common/setenv_calib.sh | ||
|
|
||
| # check that WORKFLOW_DETECTORS is needed, otherwise the wrong calib wf will be built | ||
| if [[ -z $WORKFLOW_DETECTORS ]]; then echo "WORKFLOW_DETECTORS must be defined" 1>&2; exit 1; fi | ||
|
|
||
| # CCDB destination for uploads | ||
| [[ -z ${CCDB_POPULATOR_UPLOAD_PATH+x} ]] && CCDB_POPULATOR_UPLOAD_PATH="none" | ||
| echo "CCDB_POPULATOR_UPLOAD_PATH = $CCDB_POPULATOR_UPLOAD_PATH" 1>&2 | ||
|
|
||
| # Adding calibrations | ||
| EXTRA_WORKFLOW_CALIB= | ||
|
|
||
| echo "CALIB_PRIMVTX_MEANVTX = $CALIB_PRIMVTX_MEANVTX" 1>&2 | ||
| echo "CALIB_TOF_LHCPHASE = $CALIB_TOF_LHCPHASE" 1>&2 | ||
| echo "CALIB_TOF_CHANNELOFFSETS = $CALIB_TOF_CHANNELOFFSETS" 1>&2 | ||
| echo "CALIB_TOF_DIAGNOSTICS = $CALIB_TOF_DIAGNOSTICS" 1>&2 | ||
| echo "CALIB_EMC_CHANNELCALIB = $CALIB_EMC_CHANNELCALIB" 1>&2 | ||
| echo "CALIB_PHS_ENERGYCALIB = $CALIB_PHS_ENERGYCALIB" 1>&2 | ||
| echo "CALIB_PHS_BADMAPCALIB = $CALIB_PHS_BADMAPCALIB" 1>&2 | ||
| echo "CALIB_PHS_TURNONCALIB = $CALIB_PHS_TURNONCALIB" 1>&2 | ||
| echo "CALIB_PHS_RUNBYRUNCALIB = $CALIB_PHS_RUNBYRUNCALIB" 1>&2 | ||
| echo "CALIB_TRD_VDRIFTEXB = $CALIB_TRD_VDRIFTEXB" 1>&2 | ||
|
|
||
| # PrimVertex | ||
| if [[ $CALIB_PRIMVTX_MEANVTX == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-calibration-mean-vertex-calibration-workflow $ARGS_ALL | " | ||
| fi | ||
|
|
||
| # TOF | ||
| if [[ $CALIB_TOF_LHCPHASE == 1 ]] || [[ $CALIB_TOF_CHANNELOFFSETS == 1 ]]; then | ||
| if [[ $CALIB_TOF_LHCPHASE == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-calibration-tof-calib-workflow $ARGS_ALL --do-lhc-phase --tf-per-slot 10 | " | ||
| fi | ||
| if [[ $CALIB_TOF_CHANNELOFFSETS == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-calibration-tof-calib-workflow $ARGS_ALL --do-channel-offset --update-at-end-of-run-only --min-entries 8 --range 100000 | " | ||
| fi | ||
| fi | ||
| if [[ $CALIB_TOF_DIAGNOSTICS == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-calibration-tof-diagnostic-workflow $ARGS_ALL --tf-per-slot 26400 | " | ||
| fi | ||
|
|
||
| # TRD | ||
| if [[ $CALIB_TRD_VDRIFTEXB == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-calibration-trd-vdrift-exb $ARGS_ALL | " | ||
| fi | ||
|
|
||
| # Calo cal | ||
| # EMC | ||
| if [[ $CALIB_EMC_CHANNELCALIB == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-calibration-emcal-channel-calib-workflow --calibMode timeCalib $ARGS_ALL | " | ||
| fi | ||
|
|
||
| # PHS | ||
| if [[ $CALIB_PHS_ENERGYCALIB == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-phos-calib-workflow --energy $ARGS_ALL | " | ||
| fi | ||
| if [[ $CALIB_PHS_BADMAPCALIB == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-phos-calib-workflow --badmap --mode 0 $ARGS_ALL | " | ||
| fi | ||
| if [[ $CALIB_PHS_TURNONCALIB == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-phos-calib-workflow --turnon $ARGS_ALL | " | ||
| fi | ||
| if [[ $CALIB_PHS_RUNBYRUNCALIB == 1 ]]; then | ||
| EXTRA_WORKFLOW_CALIB+="o2-phos-calib-workflow --runbyrun $ARGS_ALL | " | ||
| fi | ||
|
|
||
| # starting with empty workflow | ||
| if ! workflow_has_parameter CALIB_LOCAL_INTEGRATED_AGGREGATOR ; then | ||
| WORKFLOW= | ||
| fi | ||
|
|
||
| # adding output proxies | ||
| if workflow_has_parameter CALIB_PROXIES; then | ||
| if [[ ! -z $CALIBDATASPEC_BARREL ]]; then | ||
| WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel input) | " | ||
| fi | ||
| if [[ ! -z $CALIBDATASPEC_CALO ]]; then | ||
| WORKFLOW+="o2-dpl-raw-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_CALO\" $(get_proxy_connection calo input) | " | ||
| fi | ||
| fi | ||
|
|
||
| WORKFLOW+=$EXTRA_WORKFLOW_CALIB | ||
|
|
||
| if [[ $CCDB_POPULATOR_UPLOAD_PATH != "none" ]]; then WORKFLOW+="o2-calibration-ccdb-populator-workflow --ccdb-path $CCDB_POPULATOR_UPLOAD_PATH $ARGS_ALL | "; fi | ||
|
|
||
| if ! workflow_has_parameter CALIB_LOCAL_INTEGRATED_AGGREGATOR; then | ||
| WORKFLOW+="o2-dpl-run $ARGS_ALL $GLOBALDPLOPT -b" | ||
| if [ $WORKFLOWMODE == "print" ]; then | ||
| echo Workflow command adding aggregator: | ||
| echo $WORKFLOW | sed "s/| */|\n/g" | ||
| else | ||
| # Execute the command we have assembled | ||
| WORKFLOW+=" --$WORKFLOWMODE" | ||
| eval $WORKFLOW | ||
| fi | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,30 @@ | ||
| #!/bin/bash | ||
|
|
||
| source $O2DPG_ROOT/DATA/common/setenv.sh | ||
| source $O2DPG_ROOT/DATA/common/setenv_calib.sh | ||
|
|
||
| if [[ -z "$WORKFLOW" ]] || [[ -z "$MYDIR" ]]; then | ||
| echo This script must be called from the dpl-workflow.sh and not standalone 1>&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ $BEAMTYPE != "cosmic" ]]; then | ||
| has_detector_calib TPC && has_detectors TPC ITS TRD TOF && add_W o2-tpc-scdcalib-interpolation-workflow "$DISABLE_ROOT_OUTPUT --disable-root-input --pipeline $(get_N tpc-track-interpolation TPC REST)" "$ITSMFT_FILES" | ||
| has_detector_calib ITS && has_detectors ITS && has_detectors_reco ITS && has_detector_matching PRIMVTX && [[ ! -z "$VERTEXING_SOURCES" ]] && add_W o2-calibration-mean-vertex-calibration-workflow | ||
| has_detector_calib TRD && has_detector ITS TPC TRD && add_W o2-calibration-trd-vdrift-exb | ||
| # you cannot have a locally integrated aggregator with the proxies | ||
| if workflow_has_parameters CALIB_LOCAL_INTEGRATED_AGGREGATOR CALIB_PROXIES; then | ||
| echo "you cannot have a locally integrated aggregator with the proxies" 1>&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| # specific calibration workflows | ||
| if [[ $CALIB_TPC_SCDCALIB == 1 ]]; then add_W o2-tpc-scdcalib-interpolation-workflow "$DISABLE_ROOT_OUTPUT --disable-root-input --pipeline $(get_N tpc-track-interpolation TPC REST)" "$ITSMFT_FILES"; fi | ||
|
|
||
| # output-proxy for aggregator | ||
| if workflow_has_parameter CALIB_PROXIES; then | ||
| if [[ ! -z $CALIBDATASPEC_BARREL ]]; then | ||
| WORKFLOW+="o2-dpl-output-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_BARREL\" $(get_proxy_connection barrel output) | " | ||
| fi | ||
| if [[ ! -z $CALIBDATASPEC_CALO ]]; then | ||
| WORKFLOW+="o2-dpl-output-proxy ${ARGS_ALL} --dataspec \"$CALIBDATASPEC_CALO\" $(get_proxy_connection calo output) | " | ||
| fi | ||
| fi | ||
|
|
||
| true # everything OK up to this point, so the script should return 0 (it is !=0 already if a has_detector check fails) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.