DataFile from grand.dataio returns type int for source_datetime instead of datetime.
Here is an example :
import grand.dataio as groot
file="/sps/grand/prod_grand/data/gp80/GrandRoot/2025/02/exp_GP80_20250219_164828_RUN146_MD_RAW-ChanXYZ-20dB-GP43-20hz-X2FLOAT-Y2Z-0050_0000/run_146_L0_0000.root"
rfile=groot.DataFile(file)
for key, val in rfile.get_tree_info('trun').items():
print(f'type of {key} {val} is {type(val)}')
will output:
type of evt_cnt 1 is <class 'int'>
type of name trun is <class 'str'>
type of type TRun is <class 'str'>
type of comment Generated by GtoT 0.45 from file /sps/grand/data/gp80/raw/2025/02/GP80_20250219_164828_RUN146_MD_RAW-ChanXYZ-20dB-GP43-20hz-X2FLOAT-Y2Z-0050.bin is <class 'str'>
type of creation_datetime 2025-03-17 21:15:34 is <class 'datetime.datetime'>
type of modification_history is <class 'str'>
type of modification_software is <class 'str'>
type of modification_software_version is <class 'str'>
type of analysis_level 0 is <class 'int'>
type of source_datetime 0 is <class 'int'>
Tested on branch dev_sim2root_merge__merge_with_dev_fix_fields