running root application in the batch mode(postscript only)

Artur G. Vaitaitis (arturv@cuphy3.phys.columbia.edu)
Wed, 21 Oct 1998 14:22:53 -0400


Hi All,
I might reinvented the wheel,
but in case someone does not know...
Sometimes one needs to run an application without
graphics being displayed, say in the background or in the batch.
I for example wanted my application to run without opening a
graphics window and to make a postscript file in the end.
The example that have been showed in the tuutorial explains how
to run an application with graphics.
To switch it to a graphics-less mode instead of calling
"tutorial" TROOT constructor:
TROOT my_root("simple","Apply Cuts",initfuncs);
call
TROOT my_root("simple","Apply Cuts");
and also comment out the application run method :
//theApp.Run();
then the standart call of postscript class will do the rest:
TPostScript* ps = new TPostScript(psfile,-111);
ps->Off();
ps->On();
ps->NewPage();
c1->Update();
ps->Off();
ps->Close();

regards Artur