next up previous FTOOLS Home
Next: Host Task Integration Up: Task Integration Previous: Task Integration

IRAF Task Integration

One more file will be needed to complete the IRAF task integration for the fdummyftool task example. This is the online help file fdummyftool.hlp which is to be placed in the ~ftools/ftools/heasarc/doc/ directory. This IRAF help file will then be used to generate the Host help file. Use one of the existing help files as an example for your task. Here is as very basic skeleton for the fdummyftool task:

fdummyftool.hlp

.help fdummyftool Feb93 ftools.heasarc

.ih

NAME

fdummyftool - Dummy example FTOOLS task.

.ih

USAGE

fdummyftool string

.ih

DESCRIPTION

This is a simple example FTOOLS task to print a string.

.ih

PARAMETERS

.ls dummy [string]

A string to be read from parameter file and

printed at the terminal.

.le

.ih

EXAMPLES

1. Print the default string of "Hello World":

ft> fdummyftool

.fi

.ih

BUGS

Multi word strings must be enclosed in quotes.

.ih

SEE ALSO

fdump, etc.

.endhelp

The next step is to add the fdummyftool task to the IRAF spp main routine x_heasarc.x found in the ~ftools/ftools/heasarc/src/ directory. Simply append fdummyftool to the list of tasks in this file. Make sure that a comma and linefeed delimits each task.

The mkpkg file for the IRAF FTOOLS package must be updated to check the dependency of the executable on the source and instructed to build the fdummyftool task with the lower level mkpkg file found in the fdummyftool directory. Edit the mkpkg file in the ~ftools/ftools/heasarc/src directory and add the following two lines to the install: dependency:

$ifolder (heasarc$fdummyftool.par, fdummyftool/fdummyftool.par)

$copy fdummyftool/fdummyftool.par heasarc$fdummyftool.par $endif

Also, append a build command to the libpkg.a: dependency found lower in the same file:

@fdummyftool

Now save these changes to this mkpkg file.

There are 3 files under the ~ftools/ftools/heasarc/ directory which provide package information to IRAF that must also be updated. They are heasarc.cl, heasarc.hd and heasarc.men. The first of these, heasarc.cl contains the list of tasks available to the FTOOLS package. It must be appended to include the fdummyftool task. Simply append fdummyftool to the list of tasks found in this file using a comma linefeed delimiter where needed.

The second, heasarc.hd contains the list of help files available to the FTOOLS package. It must be appended to include the fdummyftool task. Move to the end of this file and append the line:

fdummyftool hlp=doc$fdummyftool.hlp, src=heasarc$src/fdummyftool/fdummyftool.f

The last file heasarc.men contains a one line brief description of each task in the package. This is the file that is read when help is enter after loading the ftools package in IRAF. Append the following one line description for fdummyftool:

fdummyftool - example FTOOLS/HEASARC task that prints a string

The final step in the IRAF task integration is to update the help database for the FTOOLS package to include the fdummyftool.hlp documentation. This can only be accomplished from within IRAF. If you have not set up the ftools account to use IRAF as discussed in "The Users' Guide" or in IRAF documentation, you must do so now. Start up IRAF from the iraf subdirectory under the ftools account:

>cl

Note that if you have multiple versions of FTOOLS on your system (for example a release and develop version) you may need to reset which one you are pointing at. As an example:

cl>reset ftools = /ftools/SUN/develop/

cl>task ftools.pkg = ftools$ftools.cl

Now, back to updating the help database. Load the softtools package:

cl>soft

Change to the ~ftools/ftools/lib/ directory which contains the two files root.hd and helpdb.mip. You will be creating a new helpdb.mip file:

so >cd ~ftools/ftools/lib

Execute the command to rebuild the help database for FTOOLS :

so>mkhelpdb root.hd helpdb.mip

The next step is to generate the Host version of the fdummyftool.txt help file using the IRAF help facility. Change to the help directory for the heasarc sub-package and load the ftools.heasarc sub-package:

so> cd ~ftools/ftools/heasarc/help/

so>ftools

ft>heasarc

Now generate a fdummyftool.txt file for the HOST version of help by redirecting the output of help:

he> help fdummyftool > fdummyftool.txt

This finishes the IRAF help database changes. You can logout of the IRAF session:

he>logout

This completes the changes to the files needed by the IRAF version of the FTOOLS package. You can now rebuild the FTOOLS package following the instruction in the IRAF installation Section of the ``Installation Guide''.


next up previous FTOOLS Home
Next: Host Task Integration Up: Task Integration Previous: Task Integration

Web Page Maintained by: Dr. Lawrence E. Brown elwin@redshift.gsfc.nasa.gov

FTOOLS HELP DESK

If FTOOLS has been useful in your research, please reference this site (http://heasarc.gsfc.nasa.gov/ftools) and use the ASCL reference for HEASoft [ascl:1408.004] or the ASCL reference for the original FTOOLs paper [ascl:9912.002]:

Blackburn, J. K. 1995, in ASP Conf. Ser., Vol. 77, Astronomical Data Analysis Software and Systems IV, ed. R. A. Shaw, H. E. Payne, and J. J. E. Hayes (San Francisco: ASP), 367.

Web page maintained by: Bryan K. Irby