Skip to content

Commit 2378d99

Browse files
committed
Event display: Add option to not throw when no input
1 parent 5bf5bc7 commit 2378d99

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

EventVisualisation/Workflow/src/O2DPLDisplay.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
5353
{"display-tracks", VariantType::String, "TPC,ITS,ITS-TPC,TPC-TRD,ITS-TPC-TRD,TPC-TOF,ITS-TPC-TOF", {"comma-separated list of tracks to display"}},
5454
{"read-from-files", o2::framework::VariantType::Bool, false, {"comma-separated list of tracks to display"}},
5555
{"disable-root-input", o2::framework::VariantType::Bool, false, {"Disable root input overriding read-from-files"}},
56-
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
56+
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}},
57+
{"skipOnEmptyInput", o2::framework::VariantType::Bool, false, {"Just don't run the ED when no input is provided"}}};
5758

5859
std::swap(workflowOptions, options);
5960
}
@@ -138,6 +139,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
138139
GlobalTrackID::mask_t srcTrk = GlobalTrackID::getSourcesMask(cfgc.options().get<std::string>("display-tracks")) & allowedTracks;
139140
GlobalTrackID::mask_t srcCl = GlobalTrackID::getSourcesMask(cfgc.options().get<std::string>("display-clusters")) & allowedClusters;
140141
if (!srcTrk.any() && !srcCl.any()) {
142+
if (cfgc.options().get<bool>("skipOnEmptyInput")) {
143+
LOG(info) << "No valid inputs for event display, disabling event display";
144+
return std::move(specs);
145+
}
141146
throw std::runtime_error("No input configured");
142147
}
143148
std::shared_ptr<DataRequest> dataRequest = std::make_shared<DataRequest>();

prodtests/full-system-test/dpl-workflow.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ workflow_has_parameter CALIB && has_detector_calib TPC && has_detectors TPC ITS
467467
# RS this is a temporary setting
468468
[[ -z "$ED_TRACKS" ]] && ED_TRACKS=$TRACK_SOURCES
469469
[[ -z "$ED_CLUSTERS" ]] && ED_CLUSTERS=$TRACK_SOURCES
470-
workflow_has_parameter EVENT_DISPLAY && [[ $NUMAID == 0 ]] && [[ ! -z "$ED_TRACKS" ]] && [[ ! -z "$ED_CLUSTERS" ]] && add_W o2-eve-display "--display-tracks $ED_TRACKS --display-clusters $ED_CLUSTERS $EVE_CONFIG $DISABLE_MC" "$ITSMFT_FILES"
470+
workflow_has_parameter EVENT_DISPLAY && [[ $NUMAID == 0 ]] && [[ ! -z "$ED_TRACKS" ]] && [[ ! -z "$ED_CLUSTERS" ]] && add_W o2-eve-display "--display-tracks $ED_TRACKS --display-clusters $ED_CLUSTERS --skipOnEmptyInput $EVE_CONFIG $DISABLE_MC" "$ITSMFT_FILES"
471471

472472
# ---------------------------------------------------------------------------------------------------------------------
473473
# AOD

0 commit comments

Comments
 (0)