I have a question about time stamp and file name in the graph. I want to write the time stamp (current date and time) and the file name in the graph which I draw by ROOT automatically.
I create pdf and png format graphs and I occasionally update them. So, I need the date, time and the file name of the graph. Otherwise, I am confused which is latest version data and files.
I do not know how to do these even though I am searching the website for that so far.
Would someone tell me how to write the time stamp and the file name automatically by ROOT for me?
see: root.cern.ch/root/html514/TStyle … SetOptDate
Thank you very much and it works.
However, I draw 2 graphs in one page.
can1 -> Divide(1,2);
can1 -> cd(1);
can2 -> cd(2);
then, the timestamp is under the graph, that means root overwrites the graph (the canvas) on the timestamp. How can I fix it?
In addition, how can I write the filename on the graph page automatically such as pdf files or png files?
You can enlarge the bottom margin when you divide the canvas:
For the file name you should draw a TText in normalized coordinates:
TText *t = new TText()
Thank you very much and I could write the timestamp and the file name on the graph.
I think we do not have the command to write the file name automatically like the timestamp in root system. Is it right?
You are right, there is nothing automatic for the file name.
I see, and thank you for your reply!