def process_runs(main_path, save_ims=False) -> pd.DataFrame: """Process all runs and return a dataframe of all results""" all_files = get_event_files(main_path=main_path, save_ims=False) all_dict = {} for files in tqdm(all_files, total=len(all_files)): try: # Process each file using the EventAccumulator and save to a dictionary event_acc = EventAccumulator(files) event_acc.Reload() temp_dict = process_event_acc(event_acc, save_ims=save_ims) all_dict[files] = temp_dict except IndexError: pass return pd.DataFrame.from_records(all_dict).T.reset_index()