Suzanne Panacek <spanacek@fnal.gov> writes: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0033_01C21E79.3A7E3160 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Hi Josh, > I am forwarding your message to roottalk. > Suzanne > ----- Original Message -----=20 > From: Joshua Dyer=20 > To: rootdoc@pcroot.cern.ch=20 > Sent: Thursday, June 27, 2002 4:00 PM > > > Hello root people > > I am trying to run a macro, and I keep running into a certain problem. > In the macro, I need the output saved as a post script file and the = > macro > needs to be run on many different data sets. I want to be able to input = > the > name I would like the .ps file to be saved as without editing the macro = > each > time. I tried: > > TString PostScriptName; //var for the name of the post script > =20 > cout << "What do you want to name the post script file?" << endl; > cout << "(Please include the .ps and quotes)" << endl; > cin >> PostScriptName; > > TPostScript *ps =3D new TPostScript(PostScriptName, 112); > > This does not work. I can't seem to figure out how to do such an input. > Please help. Thanks. > > Joshua M. Dyer > Hi Joshua, in principle it should work. Which version of root/compiler suite do you use? - if the above lines cause a segfault opening a canvas before using a TPostcript object could help. This is fixed in current versions - if PostScriptName contains garbage (cout << PostScriptName << endl to test) you are hit by missing operators <<,>> for iostreams+TString. This is a problem for certain compilers (gcc3, icc) in current version 3.03. It has not been solved so far. -- Jiri
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:58 MET