Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace o2::framework;
void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{
// option allowing to set parameters
workflowOptions.push_back(ConfigParamSpec{"run-number", o2::framework::VariantType::Int, -1, {"run number"}});
workflowOptions.push_back(ConfigParamSpec{"tof-dia-run-number", o2::framework::VariantType::Int, -1, {"run number"}});
}

// ------------------------------------------------------------------
Expand All @@ -28,7 +28,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
{
WorkflowSpec specs;
auto runnumber = configcontext.options().get<int>("run-number");
auto runnumber = configcontext.options().get<int>("tof-dia-run-number");
specs.emplace_back(getTOFDiagnosticCalibDeviceSpec(runnumber));
return specs;
}
107 changes: 107 additions & 0 deletions prodtests/full-system-test/aggregator-workflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/bin/bash

SEVERITY="detail"
ENABLE_METRICS=1

# the check on LIST_OF_DETECTORS should ensure that setenv.sh was not called before
[[ -z ${LIST_OF_DETECTORS+z} ]] && source $O2DPG_ROOT/DATA/common/setenv.sh
# the check on TRACK_SOURCES should ensure that workflow-setup.sh was not called before
[[ -z ${TRACK_SOURCES+z} ]] && source $O2_ROOT/prodtests/full-system-test/workflow-setup.sh

# ---------------------------------------------------------------------------------------------------------------------
# Set general arguments (only if not already defined, checked via ARGS_ALL)
[[ -z ${ARGS_ALL+z} ]] && source $O2DPG_ROOT/DATA/common/getCommonArgs.sh

# Set up calibrations (if not already done, checked via SETUP_CALIB)
[[ $SETUP_CALIB != 1 ]] && 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 ${CCDBPATH+x} ]] && CCDBPATH="http://o2-ccdb.internal"
echo "CCDBPATH = $CCDBPATH" 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_parameters CALIB_PROXIES; then
WORKFLOW=
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 [[ $CCDBPATH != "none" ]]; then WORKFLOW+="o2-calibration-ccdb-populator-workflow --ccdb-path $CCDBPATH $ARGS_ALL | "; fi

if workflow_has_parameters CALIB_PROXIES; 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
21 changes: 17 additions & 4 deletions prodtests/full-system-test/calib-workflow.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
#!/bin/bash

# the check on LIST_OF_DETECTORS should ensure that setenv.sh was not called before
[[ -z ${LIST_OF_DETECTORS+z} ]] && source $O2DPG_ROOT/DATA/common/setenv.sh

# Set up calibrations (if not already done, checked via SETUP_CALIB)
[[ $SETUP_CALIB != 1 ]] && 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
# 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_parameters 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)
3 changes: 2 additions & 1 deletion prodtests/full-system-test/dpl-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ fi

# ---------------------------------------------------------------------------------------------------------------------
# Calibration workflows
workflow_has_parameter CALIB && { source $MYDIR/calib-workflow.sh; [[ $? != 0 ]] && exit 1; }
workflow_has_parameter CALIB && { source ${CALIB_WF:-$MYDIR/calib-workflow.sh}; [[ $? != 0 ]] && exit 1; }
workflow_has_parameter CALIB && workflow_has_parameters CALIB_LOCAL_AGGREGATOR && { source ${CALIB_AGGREGATOR_WF:-$MYDIR/aggregator-workflow.sh}; [[ $? != 0 ]] && exit 1; }

# ---------------------------------------------------------------------------------------------------------------------
# Event display
Expand Down