Weird TPDF

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?

Cheers,Gang
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 ?

Hi, couet:

‘python 1.py’ will quit root automatically when it’s finished.

Cheers,Gang

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).

Hi,

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.

Cheers,
Wim

Hi, wlav:

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.

Cheers,Gang

[pcncu17] /afs/cern.ch/user/q/qing/public/forwlav > ls
1.py b.pdf SinglePhotonPt40_row0_LG.root

Hi,

thanks for the input file. I went through the steps and all looks fine to me …

Cheers,
Wim

Hi, wlav:

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.

Any idea?

Cheers,GAng
b.pdf (13.5 KB)

Hi,

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.

Cheers,
Wim