next up previous contents index
Next: Memory communication Up: Global sections and Previous: Global sections and

Sharing histograms in memory on remote machines

   

When HBOOK is used in a data acquisition system environment, global sections can be an interesting alternative to disk input/output. The following example is a simple illustration of this facility.

Let us assume two processes exist:

  1. PFILL, the process filling some histograms in COMMON/PAWC/ directly.   
  2. PRESENT, a process activated from time to time to visualize the histograms created and filled by PFILL.

No hand-shaking mechanism is required. A global section is created (this is system dependent).    This global section is mapped to COMMON/PAWC/ in process PFILL and to COMMON/PAWMAP/PAWM(nwords) in PRESENT.      This process has also a COMMON/PAWC/, which will be used as a working space common.

A call CALL HRFILE (PAWM,'PFILL','GN') in process PRESENT will open a HBOOK global section. The current directory is now set to //PFILL. Routine HCDIR may be used to change the current directory to lower level directories. Using HRIN (described below) a histogram can now be copied from PFILL to /PAWC/ of process PRESENT and invoke the printing or plotting routines of either HBOOK or HPLOT.    

Tools exist (for example in PAW) to dynamically map global sections. It should be noted however that this mechanism does not allow to write (e.g. using routine HROUT) from process PRESENT into PFILL.

It is possible to open more than one global section (several processes PFILL).



Last update: Tue May 16 09:09:27 METDST 1995