Skip to content

Commit

Permalink
add error message for missing input files
Browse files Browse the repository at this point in the history
  • Loading branch information
Zehvogel authored and andresailer committed Oct 24, 2023
1 parent 4689c24 commit abf256a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CLDConfig/CLDReconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# limitations under the License.
#
import os
import sys
from Gaudi.Configuration import *

from Configurables import k4DataSvc, MarlinProcessorWrapper
Expand Down Expand Up @@ -65,12 +66,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"):
Expand Down

0 comments on commit abf256a

Please sign in to comment.