Error running plotG_*.C macros in chem6

I’m running ROOT6 built from source, tagged as 6.27/01, in Windows 10 with build options -A x64 -Thost=x64, and the ROOT macro plotG_LET.C and plotG_time.C at chem6 example are not starting. LET one are just exiting after several seconds without any messages, time one returns the assertion errors somewhere in LLVM module of ROOT. See attached picture

I strongly believe this is ROOT6 issues and this is not stable ROOT6 version that I’m using, but I decided to ask on Geant4 forum first as soon as these macro dedicated to Geant4 example.

Dr. Bertrand Bellenot on ROOT forum suggested these modifications to macros, which now runs properly as intended

plotG_LET.C.txt (4.9 KB)
plotG_time.C.txt (6.5 KB)

I suppose this should also affect some other example macros, that using the same structure, at least chem4 one, maybe others.

Thank you for sharing the improved versions!