RE: [ROOT] Event handling or graphing huge datasets PLUS a couple new TH2 questions

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Feb 26 2002 - 23:26:54 MET


Hi Tony,

On Tue, 26 Feb 2002, Colley, Tony wrote:

> I must apologize... I don't know exactly what I did before (that was too
> many iterations of code ago) to get a nonresponsive graph, but TGraph *does*
> handle 10^7 points just fine. Thanks, Eddy, for making me try it again!

Did you really try with 10^7 points? This requires 160 Mbytes of memory!
Eddy did a nice work in implementing the algorithm not displaying
graphics structures less than one pixel.

> 
> New question:  plotting a 1024x1024 2d histogram takes too long with any of
> the 3d plotting modes, when grid lines are plotted (eg "SURF") they are too
> close together (everything is black), when lego blocks are plotted they are
> too small.
> I define "too long" as more than a couple of seconds... actually it takes
> about 25 seconds everytime the canvas needs to redraw itself (closer to 45
> seconds when doing Gouraud). Is there currently a way to have the TH2
> subsample itself when doing a 3d plot and when it is "too large" to be
> responsive?

this could be hard work. If you have an interesting idea to solve this
problem, it is welcome. Obviously, one can always implement an algorithm
displaying only 10% or less of the bins. The best solution is to rebin
the original histogram.

You also know that a set of image processing classes will soon be
introduced in the system. This is probably what you need.

> 
> One more question/comment: I plot two 2d histograms, each in its own canvas,
> each with its own palette. They display fine initially, but as soon as the
> canvas containing the first drawn histogram redraws itself, it uses the
> palette for the second drawn histogram. Is there currently a way to have a
> TH2 automatically remember the palette with which it was drawn so that when
> it redraws itself, it always uses that palette (unless it is told explicitly
> to change palettes)?

Graphics objects know only one color number. When painting the pad, the
current color definition is used. One could imagine a simple solution
to this problem: Create an object (say class TColorPalette).
The only function of the class could be the Paint function. This function 
will simply select a given color palette. You could draw this (these)
objects in the same pad or different pads to guarantee that the original
palette is used. An alternative is ti use the TExec class or a signal.

Rene Brun


>
> Cheers, > Tony
> 
> -----Original Message-----
> From: Colley, Tony [mailto:Tony.Colley@itt.com]
> Sent: Tuesday, February 26, 2002 11:20
> To: root talk list
> Subject: [ROOT] Event handling or graphing huge datasets
> 
> 
> Hi Rooters.
> 
> I have two questions... a specific one and a general one.
> 
> Specific: I am trying to write an extension of TGraph, i.e., a derived class
> (DvatGraph) which (for now) simply overrides the ExecuteEvent function. I
> have done this, but only Button 1 events seem to be passed to this
> ExecuteEvent function. I have tried to find where in the ROOT code it is
> specified that TGraph shall only handle Button 1 events, but I seem to be
> lost in a maze of twisty passages all looking alike. So... the specific
> question is, how do I route other button events to TGraph (or at least to my
> DvatGraph)?
> 
> General: The reason I want to do this is that I have a time series of 10^7
> data points that I want to plot. Actually, I want to initially plot an
> overview of the data series (sampled or averaged in some way), and then have
> the user specify a range to zoom in on. I tried just doing this with a TH1
> or a TGraph, but they seem to choke when given 10^7 data points
> (specifically, they take forever to respond... at least I assume it's
> forever... I have waited for over an hour and nothing happened). So, what I
> am planning to do is have DvatGraph plot only some small number of points
> (less than 1000) taken from the time series, with the endpoints and the
> sampling rate initially set to draw an overview of the entire series.
> Zooming in, then, would have DvatGraph use different endpoints and sampling
> rate to select the <1000 points to actually draw. So, the basic difference
> between my proposed DvatGraph and TGraph is the sampling rate concept...
> TGraph already handles (via some magic with TAxis) the endpoint stuff. So my
> general question is: Is there already some way to do this easily in ROOT
> that I have missed or has anyone already created a ROOT add-on that does
> this?
> 
> Thanks,
> 
> Tony Colley
> ITT Industries A/CD
> Fort Wayne, IN  USA
> 
> Using ROOT 3.03/00, last CVS update on 18 Feb 2002, on RedHat Linux 7.2
> 
> 
> ************************************ 
> If this email is not intended for you, or you are not responsible for the
> delivery of this message to the addressee, please note that this message may
> contain ITT Privileged/Proprietary Information.  In such a case, you may not
> copy or deliver this message to anyone.  You should destroy this message and
> kindly notify the sender by reply email.  Information contained in this
> message that does not relate to the business of ITT is neither endorsed by
> nor attributable to ITT. 
> ************************************ 
> 



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