Re: [ROOT] TCanvas Arrays

From: Valeri Fine (fine@bnl.gov)
Date: Thu Apr 25 2002 - 00:31:57 MEST


> Hello again-
> 
> I was wondering how to create arrays of Canvases.  With my now 
> working (thanks!)  multi-dim histogram arrays it turns out I need multiple 
> canvases.  Is it possible to create an array of canvases?
> 
  May be you should consider an array of TCanvas pointers instead.

  I am 

TCanvas *myComingCanvases[10];


The you can 

 myComingCanvases[0]= new TCanvas("My first canvas");
 . . . 
 myComingCanvases[5]= new TCanvas("My fifth canvas");

etc

Of course instead of the plain array of TCanvas pointers one can use some sort 
 of C++ container: TObjArray or stl (vector, set etc).
 This will allow you to postpone the final defintion of the size of your array
(of course it is not only advantage)

  Best regards, Valeri


> Thanks,
> 
> Pete Karpius
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET