Turning off graphics output but still save eps file

Hi All,

I have the following troubles. I want to run my executable several times with different input parameters. It produces plots and these plots automatically get saved.

Now the problem, how can I do that without all the plots appearing on screen? And if I do that with TApplication it of course waits at the end of the first executable till I kill it …

I know of some option called “goff” but where do i use it?

I always have this:
TCanvas* c1 = new TCanvas(“bla”, “bla”, 0, 0, 300, 300);

then i format it and fill it with graphic objects (histos, legends, aso.) and then I print it:
c1->Print(file.eps);

so now i want that to happen with no graphics on screen while it does it …

How is that possible? do I have to use “goff” in every draw() I use? how do I prevent the canvas from appearing?

Cheers
Andi

Andy

Run your application in batch mode, eg

myapp.exe -b

Rene

Hi Rene,

thx that turns the graphics off. However the job does not exit by itself (due to TApplication and theApp.run).

I commented the TApplication but now when I start the job it does not do anything at all - nothing.

Cheers
Andi

Remove
theApp.Run()

Rene

Dear Rene,

great - now it runs fine :slight_smile:

Thanks
Andi