Hello,
I’m a new member and also new with ROOT. I have a problem that I have tried to google it, but I dont find the solution.
I want to make a C++ program that make plots in time evolution (per day). So everytime you give a new input, it makes one plot. The input file is in ascii format, but for research purpose the output file must be in ROOT.
So, I want my program does like this:
- Open a ROOT file,
- Load the histograms from the previous data into the memory,
- Add new data from a new input file,
- Save it.
I use command TFile f(“thefile.root”, “recreate”) and in the end use f.Write() and f.Close(). (I also have tried “update” option.)
But, everytime I give a new input, the program always destroy the previous histogram and only plot the latest one.
I hope I describe my problem clearle and seek help from the comunity. Thank you very much.