Research Division EED/Controls Software<P> Design Note #118.0<P> Epicure Distributed Database System<P> Survey Retrieval Specification

Research Division EED/Controls Software

Design Note #118.0

Epicure Distributed Database System

Survey Retrieval Specification

Jith Meganathan

Contents

Revisions

This section lists the revisions that have occurred to the document since the last release.

118.0
July 23, 1992 - Initial release.

Introduction

This document is the design specification for the Survey Retrieval application. This application is used to place location property information about beamline devices extracted from AWN files into DEC command language interpreter (CLI) files.

References

Wehmann, A., ```Automatic' Earth's Curvature Corrections/BSHEET version of TRANSPORT,'' September 25, 1987.
Wehmann, A., ``Alignment beam sheets, Intermediate File,'' October 16, 1986.

Survey Retrieval

The Survey Retrieval application places location property information about beamline devices into CLI files for use by the Survey Converter application. All that is needed to run the Survey Retrieval application are one or more AWN files containing beamline device survey information, and a data file listing the names and locations of these AWN files.

When the Survey Retrieval application is run, it begins by checking whether the user has specified the name of a data file containing AWN file names, and if so, this file is opened. Otherwise, the application searches for a default data file and opens this instead. The application reads the AWN file names listed in the data file, and opens each one in turn for processing.

An AWN file is processed in the following manner: Each line is read and checked for a code corresponding to a device name or to location property information. If the code specifying device name is present, the application checks a hash table containing device names to see if information about a device with an identical name has already been written to a CLI file. If the device is not in the hash table, it is added to it and a CLI file corresponding to the beamline of the device ( meson_data.cli, neutrino_data.cli, proton_data.cli, or default_data.cli) is opened. If a code specifying location property information is present, the information associated with the code is written to the CLI file. If neither type of code is present, the application goes on to the next line. These operations continue until every line of the AWN file has been processed.

Using the Survey Retrieval Application

The first step in using the Survey Retrieval application is to be on the same node and in the same directory as the application. To do this, type:
        $ set def epicure_root:[work.ecdb.survey.retrieval]
The only other step necessary is to set up the project environment by typing:
        $ @project_setup
Instructions for using the Survey Retrieval application follow.

Data File Format

The data file containing the names of AWN files to be processed by the Survey Retrieval application must have a specific format if conversion to CLI is to be successful. Each line of the data file should contain one AWN file name, and if the specified AWN file is not on the same node and the same directory as the Survey Retrieval application, its location.

For example, to use the application on three AWN files, two of which, mc_awn.dat and nk_awn.dat, are located on disney::sys$login, and one, pc_awn.dat, which is located on the same node and in the same directory as the Survey Retrieval application, your AWN file would need to look like this:

        disney::sys$login:mc_awn.dat
        disney::sys$login:nk_awn.dat
        pc_awn.dat

Default Data File

If you do not specify a data file when running the Survey Retrieval application, it will automatically search for a file named AWN_filenames.dat to process. If you wish, you can create a file with this name and place the names of the AWN files you wish to convert to CLI in it. Afterwards, simply enter:
        $ srtv
to run the application. If AWN_filenames.dat is located on the same node and in the same directory as the Survey Retrieval application, this command will cause the location property information contained within the specified AWN files to be converted to CLI.

User-Specified Data File

If you wish, you can create your own data file containing AWN file names rather than using the default file name. The chief advantage of this is that your data file, unlike the default file, may be located anywhere. However, if it is not on the same node and in the same directory as the Survey Retrieval program, you must specify its location as well as its name when running the application.

To use the Survey Retrieval application on your own data file, simply type:

        $ srtv filename
For example, if test.dat were located on disney::sys$login, you would need to enter:
        $ srtv disney::sys$login:test.dat

Multiple Device Log File

As the Survey Retrieval application processes the AWN files, it writes each device name it encounters and a frequency of 1 to a specific node in a hash table. When it encounters a device name that has already been listed in the table, the frequency counter of the node is incremented by one.

After every AWN file listed in the data file has been processed, the application searches the hash table and writes the name and frequency of each device which appeared more than once in the AWN files to a log file named device_logs.txt. If you are on the same node and in the same directory as the Survey Retrieval application, simply enter:

        $ type device_logs.txt
to view this file.

Keywords: Epicure, controls, RDCS, database, EDDS

Distribution: normal

Security, Privacy, Legal

rwest@fsus04.fnal.gov