Re: [ROOT] Trivial questions

From: Olivier Couet (Olivier.Couet@cern.ch)
Date: Wed Feb 04 2004 - 17:39:51 MET


On Wed, 4 Feb 2004, Simioni Eduard wrote:

> Dear Rooters
> 
> I have two questions:
> 
> * What's the statements for print a ps or eps file with the name 
> equal to the value of an integer variable?

Do you mean something like that ?

{
   TCanvas* canvas = new TCanvas("canvas");
   char psname[20];
   for(int i=1; i<9; i++) {
      sprintf(psname,"file%d.ps",i);
      canvas->Print(psname);
   }
}

Cheers,       O.Couet

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet@cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7677155



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET