We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a638f85 commit cd2138cCopy full SHA for cd2138c
source/Python/omegatomo/io/loadData.py
@@ -136,6 +136,17 @@ def loadROOT(options, store_coordinates = False):
136
else:
137
files = glob.glob(os.path.join(options.fpath, '*.root'))
138
nFiles = len(files)
139
+ if nFiles == 0:
140
+ print('No files found! Please select a ROOT file')
141
+ import tkinter as tk
142
+ from tkinter.filedialog import askopenfilename
143
+ root = tk.Tk()
144
+ root.withdraw()
145
+ filename = askopenfilename(title='Select first ROOT file',filetypes=([('ROOT Files','*.root')]))
146
+ if not filename:
147
+ raise ValueError('No file was selected')
148
+ files = glob.glob(os.path.join(os.path.split(filename)[0], '*.root'))
149
+ nFiles = len(files)
150
151
152
0 commit comments