I am writing a program on random numbers where I will plot them using AMPT model with number of entries in TTree to be 10000. I tried it without random numbers on other examples , then its working okay. but when i am using the code below , it shows
Entries in tree: 1
I suspect one gets the result the OP got in the first place when one is copy-pasting the original quoted code snippet in a ROOT prompt.
the { of the for is on the next line so it seems as for ROOT-Cling, it’s a for-loop with an empty body (probably a collateral damage of the automatic ; insertion ?) followed by a scope containing the tree fill (so executed only once.)