From bd990528083b180e3c45137796fdff895e676731 Mon Sep 17 00:00:00 2001 From: Leonhard Reichenbach Date: Wed, 18 Oct 2023 18:03:48 +0200 Subject: [PATCH] add error message for missing input files --- CLDConfig/CLDReconstruction.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CLDConfig/CLDReconstruction.py b/CLDConfig/CLDReconstruction.py index 78548e1..b2705cd 100644 --- a/CLDConfig/CLDReconstruction.py +++ b/CLDConfig/CLDReconstruction.py @@ -1,4 +1,5 @@ import os +import sys from Gaudi.Configuration import * from Configurables import k4DataSvc, MarlinProcessorWrapper @@ -47,12 +48,18 @@ output_basename = my_opts.outputBasename -input_files = [""] +# Set input files here or via --inputFiles +input_files = [] + if my_opts.inputFiles is not None: input_files = my_opts.inputFiles print(f"opts: {my_opts}") print(f"input_files: {input_files}") +if not input_files: + print("Error: missing input files, set them via --inputFiles") + sys.exit(1) + if input_files[0].endswith(".slcio"): CONFIG["InputMode"] = "LCIO" elif input_files[0].endswith(".root"):