running root application in the batch mode(postscript only)

From: Artur G. Vaitaitis (arturv@cuphy3.phys.columbia.edu)
Date: Wed Oct 21 1998 - 20:22:53 MEST


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET