This EDMWORK directory contains files copied from the "current/working" directory:

     /usr/local/lcls/tools/edm/display/event

My goal is to manually edit a given file "evnt_in20_llr.edl" in this directory such that:

1) Copy and remove the "header portion" from this file and paste this into its own file "evnt_in20_llrf_header_template.edl".

2) Copy and remove the "footer portion" from this file and paste this into its own file "evnt_in20_llrf_footer_template.edl".

3) Rename the remaining text in this file as "evnt_in20_llrf_body_template.edl".

4) Place macrotags in the form "$(tagname)" into each of the above template files by comparing the current set of values in these files with:

  a) The values in Pelham's "new" file "/home/iocegr/keahey/edm/display/event/evnt_in20_llrf.edl".
  b) The set of tags in Arturo's sample file "IOC-IN20-MP01trig.substitutions" (located in /afs/slac/g/lcls/tools/edm/display/templates/automated-display-generation-trigs).
  c) Note that there will likely be values in Pelham's "new" file (in a) for which no corresponding tags exist in Arturo's sample (in b).  For example, Pelahm's "new" file, when run by EDM, shows a "header" section and a new column name.  However, the "current/working" file above, when run by EDM, does not show a "header" section and it has a different column name.

     To handle these differences, I need to manually add new macrotags in the appropriate templates created in [1], [2], [3].

5) Create a single substitution file "evnt_in20_llrf_substitution.msi" that will contain 3 sets of "msi" formatted pattern/value sections, one for each of the 3 templates: header, body, and footer.  Each section will reference the above created template files and will contain the appropriate macrotags and values.

   Note that any new tags added in [4c] will be *NOT* be included in this substitution file.  Instead, these new tags and their values will be placed on the msi command line when the msi tool is eventually invoked.  The reason for this is to simulate how .edl files will be generated in the final production processing.  New macrotags and their values will need to be included on the msi command line.

6) Finally, invoke the msi tool, passing it the name of the output file "evnt_in20_llrf_new.edl" and the above substitution file "evnt_in20_llrf_substitution.msi" and any new macrotags/values, as in:

     msi -oevnt_in20_llrf_new.edl -Sevnt_in20_llrf_substitution.msi -M"tag1=tag1val,tag2=tag2val,tag3=tag3val"

7) Run EDM with this newly generated .edl file "evnt_in20_llrf_new.edl" and compare to Pelham's "new" EDM screen (that uses his "new" file in 4a).  They *should* be identical.
