Unable to update text using TLatex when calling through functions

Dear Experts,
I have a macro that creates a PS file with a number of plots and on each page I want a different heading corresponding to the plots.
To do that I simply have a function that is called say twice with different parameters according to which the heading and plots should change in the PS file that I create.
Howsoever, the plots are updated but the text is not and I am unable to see the reason why that happens.
Can someone please help me understand? Uploaded is the example code.

Thanks a lot and best regards
PlotDumper.C (2.5 KB)

running your macro I get:

Error in <TFile::TFile>: file toto_125.root does not exist

Unfortunately I can’t upload it, the file size is bigger than allowed.
Here is the link to it on cern box :

Thanks . I am looking now.

Thanks a lot Couet. Looking forward to hear back soon.

this one is ok.
DoSingleChannelPlots.C (2.5 KB)

Thanks a lot Couet. As I understand it is mainly the definition of TLatex with “name” everytime and deleting it at the same time once job done…

also deleting the pad seem to be critical … you had also a bit of a mixture in the PS file management.

Yes, OK. Thanks Couet.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.