next up previous contents
Next: Troubleshooting Up: More DASH Features Previous: Analysis Control and Bookkeeping

Using HIGZ Graphics

If you would like to make a module perform a graphic display using the CERN package HIGZ, you need to make some initialization calls and pass around a variable that records the workstation type. Since the initialization should happen only once, but you may have more than one display module, you should make the initialization calls in DASH_DECL. The workstation type can be reported to DASH via a call to DASH_DEPOSIT('KWTYPE',KWTYPE). Then, any analysis module that needs to know the value can call DASH_INQUIRE('KWTYPE',KWTYPE) and the value will be passed back.

In DASH_DECL, you should make the following calls:

      CALL IGINIT(0)		! Initialize HIGZ
      CALL IGWKTY(KWTYPE)	! Get workstation
      CALL IGSSE(6,KWTYPE)	! Errors go to Unit 6

If you wish to write a robust graphics module, you will want to use the value of KWTYPE to keep track of whether you are writing to an open graphics display or a metafile. See Colin Okada's MUAPICT module for example code; this is included in the Muon Analysis DST library (MADLIB) (see appendix D).

At the end of the program, you should shut down the graphics gracefully with IGEND. The best place to do this is in the main program after the call to DASH_CLI. These calls are in the example DASH_DECL in appendix A, but are commented out.