Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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;
}
104 changes: 104 additions & 0 deletions prodtests/full-system-test/aggregator-workflow.sh
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
24 changes: 20 additions & 4 deletions prodtests/full-system-test/calib-workflow.sh
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)
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_parameters CALIB CALIB_LOCAL_INTEGRATED_AGGREGATOR && { source ${CALIB_AGGREGATOR_WF:-$MYDIR/aggregator-workflow.sh}; [[ $? != 0 ]] && exit 1; }

# ---------------------------------------------------------------------------------------------------------------------
# Event display
Expand Down
6 changes: 6 additions & 0 deletions prodtests/full-system-test/workflow-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# used to avoid sourcing this file 2x
if [[ -z $SOURCE_GUARD_WORKFLOW_SETUP ]]; then
SOURCE_GUARD_WORKFLOW_SETUP=1

# ---------------------------------------------------------------------------------------------------------------------
#Some additional settings used in this workflow

Expand Down Expand Up @@ -106,3 +110,5 @@ add_W() # Add binarry to workflow command USAGE: add_W [BINARY] [COMMAND_LINE_OP
[[ ! -z "$KEY_VALUES" ]] && KEY_VALUES="--configKeyValues \"$KEY_VALUES\""
WORKFLOW+="$1 $ARGS_ALL $2 ${!NAME_PROC_ARGS} $KEY_VALUES | "
}

fi # workflow-setup.sh sourced