[ROOT] scripting? (or whatever you call it?)

From: Michael Wiesmann (wiesmann@e18.physik.tu-muenchen.de)
Date: Thu May 10 2001 - 17:28:55 MEST


Hi!


Try to make an array of TCanvases, like c[0] to c[9]. Looping is then
simpler. Instead of "Do" for(;;) of course.

The "zone" can be done via c[i]->Divide(2,5).
The appropriate canvas can be chosen by c[i].cd(j) where i=0,9, j=1,10
(j=0 is the undivided canvas).

Make sure that all canvas are initialized asa pointers, I usually have
problems if I don't. (has probably to do with scope of variables ...)

have fun,
Michael




Ahmet Sedat Ayan writes:
 > 
 > Dear Rooters,
 > 
 > Let's assume I have 10 canvases (named c1, c2 ,...c10) each of
 > which has 10 pads (c1_1, c1_2,.., c1_10, c2_1, ......, c10_10). and I want
 > to plot histograms (lets say named as hh1_1,hh1_2, hh1_10, hh2_1,... etc)
 > on each pad. If it was PAW as in the old days, this would be as easy as, 
 > 
 > Do i=1,10
 >  Do j=1,10
 > 	hi/pl hh[j]_[i]
 > 	EndDo
 > 	EndDo
 > 
 > How one would do this by ROOT rather than typing 100 lines of code to
 > plot and the same amount for canvas and pad changing as c1_1.cd() ? Or
 > this is quite an irrelevant approach with ROOT ,i mean handling that many
 > histos this way?
 > 
 > 
 > ***************
 > 
 > Ahmet Sedat Ayan		
 > 
 > Physics & Astronomy Dept.
 > Van Allen Hall    
 > University of Iowa
 > Iowa City, IA, 52242
 >   
 > Voice      : (++ 1 319) 335-2832 (W) (GMT-6)      
 > Occupation : Ph.D Candidate (But still dreamer!)	
 > e-mail     : ayan@cms.physics.uiowa.edu
 > web        : http://home.cern.ch/ayan
 > 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:44 MET