The FRS Data Acquisition Manual Components:
[Introduction] [MBS Reference] [On-line Guide] [On-line Calibrations]

The FRS Data Acquisition Manual:
Part II: On-line Guide

by Margareta Hellström

Updated version 2.1, December 8, 1997
WARNING: the contents are partially obsolete!!!

MBS (Multi-Branch System):
[Booting the E7s] [Lynx system files] [Starting MBS] [Is everything OK?]
[Taping] [Magnet info] [CAMAC calls] [Troubleshooting] [Shutting down MBS]
GOOSY (The standard on-line analysis client):
[General] [Creating the GOOSY data base and environment] [Connecting to MBS] [Is everything OK?] [Troubleshooting] [Shutting down GOOSY]
Miscellaneous:
[Useful Lynx/Unix commands] [Some GOOSY commands] [Modifying the analysis] [Modifying the database]

The MBS (Multi Branch System)

Booting the E7s

Important considerations

  1. The E7s should only be booted in an emergency, that is the data aquisition system is in a state from which it cannot be recovered via software.
  2. Only reboot those E7s which show problems!
  3. In case of a power failure, the E7s should reboot themselves automatically when power is restored.

Examples of situations where a reboot probably is necessary:

Procedure

  1. Connect the E7 to the VT100 terminal (next to the DLT drive) via the gray cable.
  2. On the E7 front panel, press the "Reset/Abort" lever-switch downwards.
  3. The LED-display on the E7 should change to "0"
  4. Monitor the activity on the VT100 terminal: The text "Boot procedure finished" should appear, soon followed by "E7_x" (x=number of E7) in large letters and the prompt "User name:" The E7 front panel LED-display should read "8".
  5. Do not log in via the VT100 terminal, but establish a telnet connection to the E7 via the X-terminal next to AXP636.
  6. Proceed with rebooting the other E7s, if needed.

Back to index

Lynx System Files

Where are the files?

The files needed for the data acquisition are placed in the experiment-specific directory /nfs/usr/frs/usr/profi/mbsrun/runxx where xx is the run number assigned to the FRS experiment. The default directory after logging in on the E7s is /nfs/usr/frs/usr/profi.

The files needed by the Master processor (E7_11) are located in the directory mbsrun/runxx, whereas the FRS branch Slave (E7_5) files can be found in the subdirectory mbsrun/runxx/frsbranch. If the USR branch is being used, its Slave processor (E7_6) files sit in the mbsrun/runxx/usrbranch subdirectory.

Refer to Part I of the manual for detailed information on how to prepare these files for your experiment!

NOTE: All MBS files are stored on the same file system, and most of them are freely accessible from any Lynx account!!! Files can therefore be copied, edited, and also deleted by most anybody! For this reason, take great care when you modify files! Critical files can be protected with the help of the Lynx/Unix chmod command (see some Unix documentation).

Back to index

Starting up MBS

Logging in

  1. Create a terminal window on the X-terminal next to AXP636.
  2. Open a telnet connection to E7_11:
    $> telnet E7_11
  3. Log in as profi (no password currently required).
  4. Change to the working directory:
    E7_11 profi (..) cd mbsrun/runxx

Starting the Prompter

  1. Perform a "remote reset" of the whole system. For each E7, a "Reset node finished" message should eventually appear.
    E7_11 profi (..) remreset
  2. Check the status of the network connections. (This should be repeated until only the message "openlog error" appears.)
    E7_11 profi (..) net600
  3. Start the prompter (prm) "shell" program. Informational messages about the message logger server (E7_11) as well as clients (E7_5 and E7_6, as applicable) should appear, and the prompt should change to "E7_11>".
    E7_11 profi (..) prm
  4. The prompter shell can be exited at any time by typing exit or quit, and then reentered by again typing prm. NEVER type Ctrl-z unless you want to crash the prompter or the data acquisition...
NOTE: If any error messages appear, type Ctrl-Z and try the remote reset again.

Creating the MBS Environment

  1. Start the MBS data acquisition tasks (readouts, collector, transport,...):
    E7_11> @start
    A number of informational messages will appear on the screen. Watch for errors!
  2. Were the CAMAC crates turned off? If so, make sure they are initialized:
    E7_11> @caminit
  3. If needed, program the multi-wire detector CAMAC CFDs (thresholds/walk):
    E7_11> @cfdset

Controlling the acquisition

  1. Start the data acquisition (always via the E7_5 Slave processor!):
    E7_11> e7_5::start acq
    The collector task (on E7_11) and the respective readout tasks (on E7_5, E7_6) will acknowledge that a trigger type 14 was detected and that the acquisition is running.
  2. The data acquisition is stopped (always via the E7_5 Slave processor!):
    E7_11> e7_5::stop acq
    The collector task (on E7_11) and the respective readout tasks (on E7_5, E7_6) will acknowledge that a trigger type 15 was detected and that the acquisition is stopped.
NOTE: If any of these messages are missing, or if there are errors, the system must be reset. See the Troubleshooting section below!

Back to index

Is everything OK?

There are several useful (prompter) commands to check what is going on:

The taping can be monitored with:

For more experienced users:

Back to index

Taping

A DEC Linear Tape (DLT) drive, supporting compression, is directly connected to the Master E7 processor (E7_11) via a SCSI cable. The drive is usually placed next to the VT100 terminal used for direct communication with the E7s.

Initializing a new tape

  1. Insert a new tape into the DLT drive. (The handle should only be operated when the green light is on!)
  2. From the prompter, issue the initialization command. A label (max 6 letters/digits) must be provided. It is good practice to indicate the run number in the label, e.g., 'R56001'.
    E7_11> init tape label
  3. The initialization takes some time–be patient. If there is an error, try again!

Mounting the tape

  1. The tape is mounted with:
    E7_11> mount tape
  2. and correspondingly dismounted:
    E7_11> dismount tape
NOTE: The tape will be positioned at the EOT marker–if the tape already contains files it can take quite some time to reach this point. The names of the files already on the tape will be indicated on the screen.

Writing list-mode files

  1. Open list-mode file (the only type that the MBS system can write) by
    E7_11> open file name
  2. Alternatively, the command
    E7_11> @newfile
    can be used (see below).
  3. Files are closed with the corresponding command
    E7_11> close file
NOTE: There are a number of qualifiers available for the open file command:
sizeSets a maximum file size in megabytes (default = 50MB)
autoStarts the automatic file feature; creates consecutively numbered files.
firstDefines starting number for the automatically created files.
To make the taping more convenient, the command file newfile.scom is provided. Simply edit this file to supply a base name for your files and the size (in megabytes). The numbering is (somewhat inconveniently) governed by the contents of the file /frs/usr/profi/filenum.set. To start the numbering from zero, you can just delete this file - a new one will be created automatically.

Changing tapes

  1. To change tapes, just close the current file
    E7_11> close file or @closefile (which gives info on file size and time)
  2. and dismount the tape
    E7_11> dismount tape
  3. When the Prompter indicates that the tape has been rewound, press the unload button on the DLT drive front panel and, when the green light goes on, operate the handle. It is good practice to write protect the used tape immediately after removing it!
NOTES:
1. At the first sign of difficulties with the data acquisition, close the current file! (If there is no end-of-file (EOF) written at the end of the last file on the tape, the tape cannot be mounted again!)
2. The taping process is completely independent of any on-line analysis clients!
3. At present, with compression (default) about 30 Gbyte can be written to each tape. It is recommended to change tapes once each day (for safety)– don't put all your eggs in one basket!

Back to index

Storing magnet and feedthrough information

The GOOSY routine (GOOUFC) used to read out the FRS magnet and drive status is unfortunately not available on the Alpha or Lynx platforms. This means that, at this time, there is no easy way to write this information into the tape file headers. The best alternative is therefore to "manually" record the magnet/drive status each time a new file is opened.

This can be done with the help of a special GOOSY session running under the FRS account on the (HKR cluster) VAX workstation CLARA4. The procedure to obtain a text file containing the pertinent information on magnet currents (voltages) and fields as well as target and slit drive settings/positions is as follows:

  1. Connect to CLARA4, either via telnet OR by opening a DECterm window on, e.g., AXP636 and using the set host command.
  2. Log in as FRS. (Ask Klaus Sümmerer for the password!).
  3. Change directory to [FRS.UFC.RUNii], where ii is your experiment's run number.
  4. Create the special GOOSY environment needed:
    $> @create_goosy
  5. Enter GOOSY:
    $> g
  6. A text file US10$ROOT:[FRS.UFC.RUNii]RUNii_Fnnn.prop containing a "snap shot" of the magnet and drive settings is created via the command
    G> @status nnn
    where nnn should be the current tape file number (or any other identifier string!).
On the PROFI account on the Alpha cluster, a command file GETSTATUS.COM has been provided which copies over the status file from CLARA4 and then prints it on the laser printer in the FRS Meßhütte.
  1. In a terminal window on AXP636, log in as PROFI (if needed) and change directory to FRS$ROOT:[PROFI.GOOSY.RUNii].
  2. Make sure the subdirectory FRS$ROOT:[PROFI.GOOSY.RUNii.STATUS] exists; if not, create it.
  3. Execute the command file:
    $> @getstatus nnn
    where nnn is the current tape file number. The status files will be copied over into the STATUS subdirectory. The printout header will contain the filename as well as the date and time.

As a compliment to these semi-automatically produced status printouts, it is recommended to "manually" record the slit and drive positions for each tape file on so-called file sheets (a LaTeX template for preparing file sheets can be found under FRS$ROOT:[PROFI...]). Each file sheet should be accompanied by a magnet status printout from the SD program.

NOTE: Some preparatory work is needed: on CLARA4, the subdirectory US10$ROOT:[FRS.UFC.RUNii] must be created, and the files CREATE_GOOSY.COM and STATUS.GCOM must be copied over from US10$ROOT:[FRS.UFC.???] and edited. Also note that if your experiment uses "non-standard" drives, or if it involves transmitting the beam to other caves (A, B, C, or the ESR) the list of devices must be updated. Ask Klaus Sümmerer or Karl-Heinz Behr for further information.

Back to index

Executing CAMAC function calls

Sometimes it is necessary to directly communicate with CAMAC electronics modules, e.g., to read status words, thresholds etc. This is made possible via the esone server tasks that run on the Slave processors, with which so-called CNAFs (crate, number, address, function) calls can be sent. Refer to the manual of the electronics module you want to address for what functions should be used. Example: Issue an F(2)A(0) read-and-clear command to the pattern unit in the FRS crate:
El_11> e7_5::camac cnaf 2 20 0 2
NOTE: The FRS crate is controlled via E7_5, hence the "e7_5::" prefix. The FRS standard crate has the number 2, and the pattern unit sits in slot 20.

Back to index

Troubleshooting

!!! At the first sign of difficulties with the data acquisition, close the current file !!!
If there is no end-of-file (EOF) written at the end of the last file on the tape, the tape cannot be mounted again by the prompter program! (However, all files (including the last one!) can be read from the tape later, so don't panic!)

Crash recovery

  1. Close the current file if one is open.
    E7_11> close file
  2. Stop the acquisition:
    E7_11> stop acq
  3. Make a note of the error: its symptoms, causes (if known) and consequences. Forward the information to Klaus or Maggie.
  4. Close any connection to on-line analysis clients and/or remote event servers. (See Connecting to MBS below for details.)
  5. Attempt to stop all running tasks (except the message logger and utility task) in a controlled fashion:
    a) E7_11> e7_5::stop task -all (note the minus sign!)
    b) E7_11> e7_6::stop task -all (if the user branch is in use)
    c) E7_11> stop task -all
If there were no errors and the system didn't hang up, proceed with a normal startup (see above). However, sometimes a task has terminated abnormally. Then the prompter usually hangs up and no further commands are accepted, and a more thorough "cleanup" procedure is needed...
  1. Exit the non-responding prompter with Ctrl-z.
  2. Perform a remote reset:
    E7_11 profi (..) remreset
  3. Check the status of all network connections:
    E7_11 profi (..) netstat

When tasks terminate abnormally, network connections can be left in an indeterminate state.The system tries to close these connections, indicated by the status (rightmost column) CLOSE_WAIT or TIME_WAIT. Just be patient! After 30-60 seconds, a repeated netstat should give only the "openlog error" message. If the status is FIN_WAIT or FIN_WAIT2, a reboot of the E7s in question might be needed, see Booting the E7s.

An alternative (for the advanced Lynx user!) is to create another connection to the E7 in question, list the active processes (with ps -axn) and then use the Lynx command kill -9 pid the offending processes. (Known as "killing the Zoombies and sending them to Hell"!)

Shutting down the system

After the experiment is over and all calibrations etc have been performed, it is good practice to shut down the data acquisition system in an orderly fashion. This makes it much easier for those people who come after you, and avoids unnecessary rebooting of the system components.
  1. Check the status of the taping: (no file open, no tape mounted):
    E7_11> show tape
    Close any open files, dismount the tape.
  2. Stop the acquisition if it is running:
    E7_11> e7_5::stop acq
  3. Disconnect any external analysis clients by stopping analysis processes etc.
  4. Stop all tasks on the respective E7 processors:
    E7_11> @stoptasks
    (This is equivalent to issuing the stop task -all command to each E7...) If something hangs up, use Ctrl-z to exit and then perform a remote reset...
  5. Log out from all E7 telnet processes:
    E7_11> logout
  6. Close the X-terminal sessions.
NOTE:Please do not turn off the power to the VME crate, but leave the processors running! The CAMAC crates can of course be turned off if you need to exchange modules etc., but they, too, should be left on!

Feedback!

Inform Maggie or Klaus about any problems you encountered during the run, as well as any suggestions for improvements you might have! Remember: if no one complains, nothing will be fixed!

Back to index

GOOSY (On-line analysis client)

General

Where are the files located?

The relevant files (*.COM, *.PPL, *.TXT, *.GCOM, etc.) should be placed in an experiment-specific subdirectory under the PROFI account on the GSI Alpha cluster: FRS$ROOT:[PROFI.GOOSY.RUNxx].

To ensure fast I/O operations, the data base is most conveniently placed on the local disk of AXP636, the FRS-owned Alpha station in the Meßhütte, in the provided subdirectory $36$DKA100:[PROFI.DATABASE].

Back to index

Creating the data base and GOOSY environment

  1. Log in as PROFI on AXP636. (Maggie recommends to use the "old" desktop setup.) Ask an FRS person for the password, unless you know it already. PLEASE: do not spread this password around to people not involved in the experiment!
  2. Change to the eperiment subdirectory:
    $> set def [profi.goosy.runxx]
  3. If needed, create the data base file:
    $> @create_base
    Watch carefully for error messages! If there are problems, you must locate and solve these before you go on! It is essential that the data base corresponds to the on-line analysis you want to use.
  4. Start up the GOOSY environment:
    $> @init_goosy
  5. Start GOOSY:
    $> g
The GOOSY environment should consist of the $SVR, $DBM, $DSP, $ANL, and $TMR subprocesses. What is running can be checked in DCL mode with
$> show proc/sub
During the initialization of the analysis subprocess, any discrepancies in definitions of spectra and conditions between the data base and the analysis program (MGOOANAL.EXE) will show up. All problems must be solved before you can go on!

Back to index

Connecting to MBS

There are several possibilities to set up a connection between GOOSY and the MBS system. Which one you chose could depend on desired sampling rate and whether more than one on-line analysis client wants to simultaneously sample data.

Direct connection

This is the simplest version. A direct (albeit asynchronous) connection is established between the E7_11 event server task and the GOOSY $TMR transport manager process. The connection can either be synchronous (the speed of GOOSY determines the overall performance) or asynchronous (only part of the data is passed on to GOOSY). The latter version is to be preferred.
  1. Connect to the E7_11 event server task:
    G> @start_e711
  2. Disconnect with
    G> @stop_e711

Remote event server (REVSERV)

The preferred method, as it puts less strain on the Master E7 processor. If more than one on-line analysis client is to independently sample the data stream, the data must be distributed via a remote process! A connection is set up between the stream server task on E7_11 and a Remote Event Server process running on a separate Alpha station. Up to three independent analysis clients can then then simultaneously connect to the remote server.
  1. Make sure the stream server task is running on the E7_11 (default as of August 1997).
    NOTE: If the event server task is running, it must first be stopped! (E7_11> stop task m_event_serv)
  2. Log in as PROFI on for example AXP604.
  3. Set default to the experimental account FRS$ROOT:[PROFI.GOOSY.RUNxx].
  4. Start the remote event server task:
    $> @revserver
    (This will "block" the terminal window used.) A connection will be established to port 6002 (default port number for the stream server task) on E7_11. Check for messages: the remote event server port number (default: 6003) will be indicated. At the same time, the MBS prompter process should indicate that a client has been connected.
  5. From the GOOSY process, connect to the remote event server via
    G> @start_mbs
    NOTE: This presupposes that the remote event server is running on AXP604 and that its port number is 6003. If this changes, update the START_MBS.GCOM file!!
  6. The connection is broken with
    G> @stop_mbs
  7. If the E7 need to be restarted, you must first kill the remote event server process, or the stream server task will hang up:
    a) Select the remote event server terminal window and interrupt the process with Ctrl-c
    b) Stop the interrupted process with $> stop
    NOTE: If you forget the second step, the E7_11 stream server task will hang up, causing problems with stopping and restarting the prompter...

Back to index

Is everything OK?

To see if GOOSY is sampling any data, use the show anal command. This displays information of the number of analyzed events since the analysis was last started. By repeating this command and comparing the total number of VME events (the numbers of the first analyzed event and the current event are listed) with the number of events actually analyzed by GOOSY, the sampling efficiency is easily calculated. Note that this number is strongly dependent on the overall event rate!
To continuously (every 10 seconds?) display the number of events analyzed per second, use show anal/rate which can be stopped by reentering the command with the /norate qualifier: show anal/norate.

Back to index

Troubleshooting

Sometimes GOOSY subprocesses crash or start behaving "strangely", either because a user-induced error wasn't handled properly or, e.g., because of memory problems. This section tries to suggest possible ways to recover, but sometimes it is just better to crash everything and start from scratch (see the section Crashburn! below).

Subproces $XXX disconnected...

A GOOSY subprocess that has crashed (or is behaving strangely) can be restarted at any time with the help of command files RESTART_xxx.GCOM, where xxx=ANL, DBM, and DSP. To restart e.g. the display process, simply type
  1. G> @restart_dsp

This deletes the present DSP subprocess (if there is one) and starts a new one.
NOTE: Whenever the analysis process is restarted, the link to the E7s must be re-established (with @start_e711)!!!

Spectra are no longer being updated or behave funnily

Check the following:
  1. Is the data acquisition on the E7s running?
  2. Are valid triggers coming into the system?
  3. Is the link to the MBS still open?

If the answer to any of these questions is "no", fix the problem. If it is "yes", then there is a GOOSY problem. Try the following:

  1. Check the corresponding .PPL code to see if any conditions are required and, if so, whether these are fulfilled. (Most common error!)
  2. Check if the relevant analysis subpackage is enabled (its B_Anal_Enable bit is '1'B) and was properly initialized (its B_Anal_Init bit is '1'B) by typing
    G> @show_anal
  3. Try restarting the analysis process $ANL. (See above!)
  4. Try restarting the data base manager process $DBM. (See above!)
  5. In a separate terminal window, recompile the entire GOOSY analysis program (DCL command @compile_all) and restart the analysis process $ANL.

Crashburn!

If nothing else helps, you may have to stop GOOSY and dismount & delete the data base!
NOTE: Make sure that all condition window limits have been recorded (in the corresponding CREATE_SPEC*.GCOM files) before you delete the base, as these values will otherwise be lost!
  1. Exit GOOSY with Ctrl-Z.
  2. At the DCL prompt, type @crashburn. This will do the following:
  3. If any errors occur, try the manual procedure detailed in the next section.

Back to index

Shutting down the system

After all the run is finished and the calibrations are done, the following procedure should be followed in order to shut everything down in a controlled manner:

Back to index

Miscellaneous

Useful Lynx/Unix commands

NOTE: Lynx and Unix are case sensitive—lower case is most commonly used!!!

General

Below are listed just a few commonly used commands—for a complete description of Lynx/Unix commands, see e.g. the GSI Benutzerberatung for suitable manuals, or check with a nearby library!

Back to index

Editors

The "traditional" editor vi is of course available on the Lynx platform -- if you like it and know what you are doing, please use it by all means! However, for most people who are used to the EDT editor on VMS, the SEDT (Screen EDiTor) editor available under Lynx is a better choice. It is very similar to EDIT/EDT and has extensive on-line help. It is invoked by typing e filename. The keypad diagram is shown by pressing the Help button (normally "/" on the numeric keypad).Some useful commands:
Gold . Move to mark
Gold B Move to end of text
Gold E Edit new file in current buffer (asks whether to save the old one)
Gold F Save and exit
Gold G Insert contents of file at current position
Gold M Set mark
Gold Q Quit (exit without saving)
Gold S Save current buffer in file different from output file

Back to index

Common GOOSY commands

In the following are listed some of the most common GOOSY commands used to display, integrate and fit spectra and pictures, and how to work with data elements. Refer to the official GOOSY manuals or to the GOOSY on-line help for more details!

In addition to these GOOSY commands, there are a number of useful "script files" (.GCOM extension). These are called from GOOSY by prefix "@". An important example is @pk "comment" which automatically plots the displayed spectrum or picture to the postscript printer (p60) in the FRS Meßhütte. The text string comment will be printed along the top border.

Back to index

Modifying the analysis code

Updating MGOOANL.EXE

Sometimes the analysis program must be changed. If you are unfamiliar with GOOSY, and looking at some old files doesn't help you solve the problem, ask some experienced FRS person (e.g., Klaus Sümmerer).
  1. In a terminal window (DCL), edit the relevant .PPL files and, if needed, the .TXT (global variable declarations), SET_MEM*.GCOM (data elements) and CREATE_SPEC*.GCOM (spectrum, picture and condition definitions) files.
  2. Recompile and relink:
    a) $> @compile_all (if several .PPL routines were changed at the same time) OR
    b) $> @process name (if only the individual routine X$ANL_name.PPL was changed)
  3. Carefully check the compiler messages–all errors must be corrected before proceeding!

NOTE: The above command files also update the text library PRIVLIB.TLB (and the object library).

Restarting the $ANL subprocess

NOTE: If the changes involved adding spectra, conditions and/or data elements, the data base must be modified before restarting the analysis routine, see the next section.
  1. Stop the input from MBS:
    G> @stop_mbs (OR @stop_e711)
  2. Stop the old analysis and restart it. The latest version of MGOOANL.EXE will be used.
    G> @restart_anl
  3. Discrepancies between the data base and the analysis code will result in errors during the initialization–check for error messages! If there are problems, you can revert to the previous version of the analysis code:
    a) Outside GOOSY, delete the latest version of MGOOANL.EXE.
    b) In GOOSY, restart the analysis with
    G> @restart_anl
  4. If needed, clear spectra and conditions:
    G> @clear
  5. Resume input from MBS:
    G> @start_mbs node port (OR @start_e711)

Back to index

Modifying the data base "on the fly"

Sometimes one may want to slightly modify the definition of a spectrum or add a data element "on the fly", i.e., without crashing the present data base and creating a new one. It is in principle possible to do this, but sometimes it doesn't work at all! If severe problems occur, it is best to implement the desired changes by updating the relevant CREATE_SPEC_*.GCOM files, dismount and delete the data base, and create a new base from scratch (see above).

Adding new or modifying existing spectra and pictures

  1. In a terminal window, edit the file NEW_SPECTRA.GCOM: insert the spectrum and/or picture definitions. Already existing elements MUST be deleted before they can be redefined! Remember to update the corresponding CREATE_SPEC*.GCOM files!
  2. Stop the input from MBS:
    G> @stop_mbs (OR @stop_e711)
  3. Implement the changes:
    G> @new_spectra
  4. Restart the analysis process:
    G> @restart_anl
  5. Resume input from MBS:
    G>@start_mbs node port

Adding data elements

  1. Make sure the text library PRIVLIB.TLB has been updated (done automatically during recompilation as described in the previous section).
  2. Stop the input from MBS:
    G> @stop_mbs (OR @stop_e711)
  3. Replace the data base entry corresponding to the declarations file name.TXT:
    G> @new_element name
  4. Restart the analysis process:
    G> @restart_anl
  5. Resume input from MBS:
    G>@start_mbs node port (OR @start_e711)

Back to index


Concluding remarks

This concludes the "On-line Guide" part of the FRS data acquisition manual. If you want more detailed information, please refer to the suggested reference litterature or contact the "experts"! If you have suggestions for improvements and/or updates, please contact Klaus Sümmerer or the author.