[Prev][Next][Index][Thread]

answer to your 22/07 mail





     Hello 

  Sorry to answer so late to you mail of the 22 of July.
 I was in holiday when you message arrived and miss 
 it in the flow when I look to my mail back from holiday. 

  I am going to answer to all your points :

Q: the label for the y-axis can not be set. It is
   always "Events per bin". (You already answered
   me that it's not yet possible). 

A:  this is fixed in a recent Xo patch. I have
 a resource vAxisTitle that handle the y label.

Q: the fonts used for axis text and labels 
   can not be modified. It seems that they are
   implemented as soft fonts even if there are
   resources for them (labelFontList, textFontList).

A:  In fact the text drawing in the Go package 
 is not done with the X system. I am using
 the "Hersey" font tables. I have put a resource
 "textScale" on XoPlotter that permits to 
 resize all texts. You set it to "2." to
 double the size, etc...

Q: the size of the histogram title can not be
   modified.

A:  "textScale" resource does the job.

Q: with HBOOK histograms a lot of things do not
   work like in the examples in XoPlotterT.odb 
   using histograms from ntuples:

   - Auto scale can not be switched off
   - Zoom after collect (via magnifyPlot)
     does not work
   - Different markers can not be set

A:   I have to work on it. Plenty of improvement
  has been done working with HBOOK and
  the XzPlotter but not with XoPlotter. 

Q: We realized the histogram zoom example
   in XoPlotter.odb. This zoom seems to be 
   based on collected objects. Is there
   also a zoom possible based on the
   coordinates of the rubber-band box?

A:  It would be nice if you briefly could
   explain what is possible with the
   build-in zoom. Maybe there are other
   ways. I put "... magnifyPlot $widget ..."
   directly in the collect callback, but then
   I can not zoom out easily etc. Maybe 
   something like for 'rotate' or other key
   bindings could be useful.

A:   Answer is tricky. In fact you are 
  speaking of rebinning, or changing the
  booking min/max. In the context of the 
  tuple viewing I have the control on the
  histo booking then I am able to rebin
  or change min/max so that it appear like
  a zoom. If the XoPlotter is connected 
  to an OHistogram or an HBOOK. booked and filled
  by someone else, the "zooming" is more limited.
  Here I do not think I have some logic to handle it.
  I have to check...

Q: Is it possible to draw only a range of bins
   for HBOOK histograms e.g. the PAW equivalent
   to "h/list 10(20:45).

A:   Same answer than previous one. I have to look.

Q: The statistic box is quite inflexible especially
   the size or font can not be modified. For rather
   small plots it hides more or less the histogram.

A:   The XmText widgets that handle the stats has a name 
  "PLOT_STATS" then with a global resource setting like :
    *PLOT_STATS.fontList:....
  you should be able to change font.
  The XmText widgets that hanlde fit result has the 
  name "PLOT_FITS".
    The file Wo/usr/Xo.xres is loaded at startup
  and contain some PLOT_... resource setting. You have
  to fight a little to averride these setting in your
  application. In NA48 monitoring I put something like:
!----------------------------
begin OInterface
 version = v6r0
 prefix = Vis_
 resources = \
...\
Wo*PLOT_STATS.fontList:*courier*-r-*--11-*
end
  that does the job.

Q: Are there primitives to put and place additional strings
   (text) directly into a XoPlotter widget (or XoCamera).

A:   No, but it could be fine to have it. 

There are a view other things we wanted to mention:

Q: In v1 it was not possible to fill circles. Therefore 
   I made a small fix to Go/v1/src/GRec.c

   /* added to allow filled circles, 18/3/96 WG */
   if (GAtbModelingType(GAtbStatReference())==GModelingSolid)
     GRepPolygon (a_obj,points);
   else
     GRepPolyLine (a_obj,points);

   I realized that it is the same in version 2 e.g.
   GoAddCircleToNode in Go/v2/src/Go.c.

A:   I put it in a patch.

Q: Is it possible to run a Tk widget in a "o" widget
   or even better, can I execute osh commands from
   Tcl. Are there any plans? 
  
A:   What I have done today is only to test the
  declaration of a tcl interpreter to Wo.
  there are include Wotcl.h/Wotcl.c that you can put
  in you application in conjonction with "-DHAS_TCL"
  that does the job. Other things with tcl are to be 
  explored.

Q: As far as we found out it is not possible to
   define global variables or let's better say
   macros in osh. This could avoid repeated osh
   code. For example if we want to display/delete
   display objects e.g. the calorimeter hits via
   toggle button we need the same osh code in
   various callbacks. This make modifications/
   corrections quite cumbersome.
 
A:  There is a patch that permit to execute
 an osh callback in a "source" mode. Then
 variables are globals in this context. You have
 to do :
  *my_button.activateCallback:.osh>xxx='my global string'  
 The "." in front "osh" does the job.

Q: There is a problem with nested conditions. When 
   we use:
   "test condition1 && test condition2 && command", 
   we expect the logic to be: 
   if "condition1" and "condition2" are fulfilled
   execute "command". In reality the logic is: 
   if "condition1" isn't fulfilled or "condition2" 
   is fulfilled execute "command".

A: see below.

Q: Is there a way to use "while" and/or "for" loops 
   or something similar? Or are there even plans to
   extend osh with if/else, procedures and arithmetic/
   boolean expressions? Well ... I guess this is
   against the general (OO) concept and purpose.

A:   Two above questions have the same answer. I have
  to "yacc" osh, then all these will be possible. 


Q: There is the known problem with HBOOK histograms
   stored on shared memory for HP-UX and OSF1 e.g. 
   it is simply not possible (FORTRAN problem/bug).
   Do you know a workaround? I guess for NA48 you
   are using a private histogram format to store
   data on shared memory. 

A:   No I don't know. In NA48 we have chosen to
  use a communication package to transmit histogram
  from servers to clients.

   
   I shall be at CERN next week for HEPVIS (2,3,4/09),
 if you are around we could meet...

     
       Best whishes

   
       Guy Barrand