special notes on PAMIGEN problem with ems



	let me warn you about one potential problem you might
have next. there's a bug in pamigen. craig tull knows 
about this problem but he may not have had a chance to fix 
it yet. this program is called by the staf makefiles to produce 
the file .../ems/src/ems_init.cc from the module idl files
in .../ems/idl. to produce just this file in one step, 
one could cd .../ems/src and then 'make ems_init.cc'.
	the problem is that one of the ems routines is called
ems_interface. as it turns out, the word interface is
also a keyword to pamigen, so ems_init.cc is always
produced incorrectly by pamigen. specifically, pamigen
does not write the following lines to ems_init.cc 
#include "ems_interface.h"
and
        ems_interface_load_ami(ami);

	the result of this is that staf doesn't recognize the
module ems_interface, so there's no way to take the g2t 
output tables and produce the tables needed by the ems 
analysis modules.

	a quick check is:

	prompt> emsStaf
	0
	STAF[1] ami/list
+---------------------------------------------------------------------
|************* AMI - Analysis Module Interface listing ***************
+-------+-----------------+-----------------+------+------------------
| IDREF | NAME            | TYPE            | RANK |
+-------+-----------------+-----------------+------+------------------
|     6 | tpg_main        | amiInvoker      |    1 |
|     7 | tfs_filt        | amiInvoker      |    1 |
|     8 | tfs_g2t         | amiInvoker      |    8 |
|     9 | tpt             | amiInvoker      |    4 |
|    10 | tpt_sts         | amiInvoker      |    5 |
|    11 | evr_am          | amiInvoker      |    6 |
|    12 | egr_fitter      | amiInvoker      |   11 |
|    14 | ems_egrid       | amiInvoker      |    4 |
|    15 | ems_elect       | amiInvoker      |    4 |
|    16 | ems_erj         | amiInvoker      |    4 |
|    17 | ems_fake_egr    | amiInvoker      |    2 |
|    18 | ems_lvl0        | amiInvoker      |    5 |
|    19 | ems_interface   | amiInvoker      |    8 |
+-------+-----------------+-----------------+------+------------------

so, you can see ems_interface, so that means this emsStaf
was built with a correct ems_init.cc.

ems_init.cc should look like this:

/* automatically generated file -- DO NOT EDIT */
#include "ems_egrid.h"
#include "ems_elect.h"
#include "ems_erj.h"
#include "ems_fake_egr.h"
#include "ems_lvl0.h"
#include "ems_interface.h"
extern "C" int ems_init(void), ems_start(void), ems_stop(void);
int ems_init() { return 1; }
int ems_start() {
    ems_egrid_load_ami(ami);
    ems_elect_load_ami(ami);
    ems_erj_load_ami(ami);
    ems_fake_egr_load_ami(ami);
    ems_lvl0_load_ami(ami);
    ems_interface_load_ami(ami);
return 1; }
int ems_stop() { return 1; }

if you need to 'make config', check ems_init.cc after 
it finishes. if it doesn't look like the above, just
add the two lines needed by hand.

i Cc:'d this message to craig, becuase he did
ask me to remind him about this problem. when he
fixes pamigen, then ems_init.cc will be made correctly 
every time...

good luck,
	bill