def get_data_statistics(interpreted_files):
print('<STR_LIT>')  <EOL>for interpreted_file in interpreted_files:<EOL><INDENT>with tb.open_file(interpreted_file, mode="<STR_LIT:r>") as in_file_h5:  <EOL><INDENT>n_hits = np.sum(in_file_h5.root.HistOcc[:])<EOL>measurement_time = int(in_file_h5.root.meta_data[-<NUM_LIT:1>]['<STR_LIT>'] - in_file_h5.root.meta_data[<NUM_LIT:0>]['<STR_LIT>'])<EOL><INDENT>mean_tot = np.average(in_file_h5.root.HistTot[:], weights=range(<NUM_LIT:0>,<NUM_LIT:16>) * np.sum(range(<NUM_LIT:0>,<NUM_LIT:16>)))<EOL>mean_bcid = np.average(in_file_h5.root.HistRelBcid[:], weights=range(<NUM_LIT:0>,<NUM_LIT:16>))<EOL><DEDENT>n_sr = np.sum(in_file_h5.root.HistServiceRecord[:])<EOL>n_bad_events = int(np.sum(in_file_h5.root.HistErrorCounter[<NUM_LIT:2>:]))<EOL>try:<EOL><INDENT>n_events = str(in_file_h5.root.Hits[-<NUM_LIT:1>]['<STR_LIT>'] + <NUM_LIT:1>)<EOL><DEDENT>except tb.NoSuchNodeError:<EOL><INDENT>n_events = '<STR_LIT>' + str(in_file_h5.root.meta_data[-<NUM_LIT:1>]['<STR_LIT>'] + (in_file_h5.root.meta_data[-<NUM_LIT:1>]['<STR_LIT>'] - in_file_h5.root.meta_data[-<NUM_LIT:2>]['<STR_LIT>']))<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT:|>', os.path.basename(interpreted_file), '<STR_LIT:|>', int(os.path.getsize(interpreted_file) / (<NUM_LIT> * <NUM_LIT>)), '<STR_LIT>', time.ctime(os.path.getctime(interpreted_file)), '<STR_LIT:|>', n_events, '<STR_LIT:|>', n_bad_events, '<STR_LIT:|>', measurement_time, '<STR_LIT>', n_sr, '<STR_LIT:|>', n_hits, '<STR_LIT:|>')<EOL><DEDENT><DEDENT><DEDENT>
Quick and dirty function to give as redmine compatible iverview table