I have a script that reads a TTree from an input file and uses it to create and fill a histogram. I have several different input files produced under various conditions, any one of which could be used with this script.
What is the easiest way of superimposing the histograms produced by repeatedly running the script on all of these input files ?
With a PAW kumac, this was easy. I just ran the .kumac once. Then edited the script to change the input file and use an “s” option for drawing the histogram. And then ran the script again and again.
With ROOT, it seems to be much more painful. The histograms are deleted when the script exits. So I must put the loop over the input files inside the script (meaning that it can no longer be used for looking at individual input files). Furthermore, when I book the histograms inside this loop, I believe I am required to give each one a seperate “name”. So I must generate the histogram names from the index of the loop, which is also rather painful.
Am I missing a simple trick ?
Thanks, Ian Tomalin