Re: Lego2 drawing problem

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Oct 07 1999 - 18:06:01 MEST


Hi Martin,
When calling TH1::Draw with a "LEGO", "SURF" option, contour levels are
computed (by default 20 equidistant levels). Once the contours have been
computed, they are not computed again at the next TH1::Draw.
This is to avoid overwriting user-defined contour levels.
Currently, you have to force a new evaluation of the contour levels
by invoking TH1::SetContour.
I do not know the best solution to this problem. I could add an option
to TH1::Draw to force the reevaluation of the contour levels.
Another possibility would be to save the number of entries when the
contours
were computed and automatically invoke SetContour if the current number
of entries is different. However, this is not always safe.
Suggestions are welcome.

Rene Brun


Martin Purschke wrote:
> 
> Dear Rooters,
> 
> after we have started using the multi-threaded version of ROOT for the online
> monitoring in the PHENIX experiment, I came across a little problem drawing a
> 2-dim histogram with "LEGO2". It draws fine the first time you plot it. Then the
> background threads keeps filling the histogram. When you redraw the updated
> histogram, the updated bins stick out as black spikes, apparently because the
> mapping of colors to the (now changed) min-max range isn't updated. I put two
> pictures at
> 
> http://mlp.rhic.bnl.gov/lego2-root/index.html
> 
> to show the effect. It looks like the histogram doesn't realize that its
> contents have been modified after the last draw. The same goes for
> one-dimensional histos when plotted with "LEGO2".
> 
> This has nothing to do with the fact that we use multi-threading, by the way,
> except that we redraw updated histos frequently in our online monitoring
> application and the problem showed up here. If you just fill a histogram, draw
> it with lego2, fill some more, redraw it, you will see it.
> 
>         Thanks,
>                  Martin
> 
> --
> Martin L. Purschke               ;   purschke@bnl.gov
>                                  ;   http://www.phenix.bnl.gov/~purschke
>                                  ;
> Brookhaven National Laboratory   ;   phone: +1-516-344-5244
> Physics Department Bldg 510 C    ;   fax:   +1-516-344-3253
> Upton, NY 11973-5000             ;
> -----------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:40 MET