-
Notifications
You must be signed in to change notification settings - Fork 0
6. Large ROOT files
Chloé Legué edited this page Jul 12, 2023
·
4 revisions
If you need to get the TOF data from large .root files, it is very likely that the GUI will crash. In order to avoid such problems, it is possible to run the TOF manually.
>>> import pint
>>> from ReadROOT import read_root as r
>>> from ReadROOT import merge as m
>>> file0 = "Full path to the start channel root file"
>>> file1 = "Full path to the stop channel root file"
>>> csv_file = r.generate_csv_name(file0, 0, 1, pint.Quantity(1,"us")) #Note that 0 and 1 are the channel numbers and can be changed.
>>> #The pint.Quantity is also something that can be changed.
>>>
>>> merger = m.Merger(file_ch0=file0, file_ch1=file1, window=int(1e6), tree="Data_R") #The window has to be an integer.
>>> data = merger.merge()
>>>
>>> convert = m.Converter(data)
>>> convert.save(csv_file)