Re: Lego2 drawing problem

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Oct 08 1999 - 10:44:42 MEST


Hi Nick, Martin,
I have been thinking a bit more on a possible solution to this problem.
I have implemented a full proof automatic solution.
If the user does not specify his own contours, the contours will always
be uptodate. Martin's problem is solved.

Rene Brun

Nick van Eijndhoven wrote:
> 
> Hi Rene and Martin,
> My suggestion (whatever it may be worth) is to add an option
> to TH1::Draw to force re-evaluation of the contour levels.
> This is the safest way and in control of the user.
> The automatic invokation of SetContour will to my opinion have
> some dangerous aspects  which might lead to (subtle) unwanted
> side effects.
> 
>                                              Cheers,
>                                               Nick.
> 
> Rene Brun wrote:
> >
> > 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             ;
> > > -----------------------------------------------------------------------
> 
>   ------------------------------------------------------------------------
> 
>                      Name: nick.vcf
>    nick.vcf          Type: VCard (text/x-vcard)
>                  Encoding: 7bit
>               Description: Card for Nick van Eijndhoven



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