Dear Root Talk,
sorry if this has already been covered - I just couldn’t come up with good search terms.
I have multiple data files labeled 1.evt, 2.evt, 3.evt… This naming convention easily lends itself to creating a for loop which reads in a particular data file and then displays it in a TH2I.
My problem is that the histogram is only displayed once the macro has finished executing - hence it only shows the last #.evt file data.
Is there a way around this? I would like to have the histogram of the particular event file displayed for two seconds (I can do that easily with time.h), but I still have problems with displaying it. The histogram only shows up after the macro has finished.