Design Note #118.0
Epicure Distributed Database System
Survey Retrieval Specification
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.
$ set def epicure_root:[work.ecdb.survey.retrieval]The only other step necessary is to set up the project environment by typing:
$ @project_setupInstructions for using the Survey Retrieval application follow.
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
$ srtvto 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.
To use the Survey Retrieval application on your own data file, simply type:
$ srtv filenameFor example, if test.dat were located on disney::sys$login, you would need to enter:
$ srtv disney::sys$login:test.dat
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.txtto view this file.
Keywords: Epicure, controls, RDCS, database, EDDS