Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added error message for missing input files #8

Merged
merged 1 commit into from
Oct 24, 2023
Merged
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
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
Loading