Dear ROOT expert:
I encountered something weird with TPDF. I have a program 1.py, I run it and produce a.pdf, then I change the output filename from a.pdf to b.pdf, then I rerun the program. I think a.pdf and b.pdf should be the same, but they are absolutely different.
Any idea on this?
Also how should I change my script to remove the first empty page?
b.pdf (13.5 KB)
a.pdf (13.5 KB)
1.py (3.78 KB)
Do you run the macro in the exact same conditions ? ie: restart ROOT after changing the name ?
‘python 1.py’ will quit root automatically when it’s finished.
I am not using Python, so it is difficult form me to try your macro right now.
Just one suggestion: Do you have also the problem if you use c1.Print(“a.pdf”) instead of opening the PDF file yourself ?
The name of the file should be totally irrelevant (at least it is with CINT).
can’t run the 1.py file w/o the .root input file, but as a general remark, the tex() function that is in 1.py is creating graphics objects that will go out-of-scope (and hence will be collected) after its call is done.
I put both the .py file and the root file under /afs/cern.ch/user/q/qing/public/forwlav/
You can run it directly on lxplus.
[pcncu17] /afs/cern.ch/user/q/qing/public/forwlav > ls
1.py b.pdf SinglePhotonPt40_row0_LG.root
thanks for the input file. I went through the steps and all looks fine to me …
Then why b.pdf looks so strange? It has 2 pages, the first is blank, the sencond is a dark one and shows only the title of the histogram.
b.pdf (13.5 KB)
no idea about b.pdf, as said I can’t reproduce it, and (when stripped down) I don’t see anything in 1.py that seems odd.
As for the blank page, I’d hope that Olivier would know where that’s coming from? I’ve been trying a couple of permutations of the code, but am not seeing what’s causing it.