Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Documented new offline_ami program. Removed instructions for the old method of doing offline monitoring.

...

Anchor
XTC playback
XTC playback

XTC playback

To test, you need to log on to There is a DAQ Offline Monitoring program that operates just like the Online Monitoring program except that it includes an additional section at the top of the user interface that allows one to select offline runs stored in directories. To use it, log onto a machine that has access to the xtc file
directories you would like to use as input data. Then, run:

/reg/g/pcds/dist/pds/2x.12x.0x/build/pdsappami/bin/i386-linux-optdbg/xtcmonserver
-f <xtc file> -s 0x800000 -p <user id> -r <event rate,Hz> -n 2 &

This begins serving data from the file into shared memory with a tag
derived from the <user id> string. The event rate is an upper limit; i.e.
if the program runs faster, it will sleep to to achieve the limited event
rate. The "-n" argument provides the number of shared memory buffers to use
for events. More is better, but you may need to alter the linux system parameters
to allow it (/proc/sys/fs/mqueue/msg_max).

Next run the shared memory client applications. The instructions below are for
running the core online monitoring client software (to test a plug-in module, for
example).

/reg/g/pcds/dist/pds/2.12.0/build/ami/bin/i386-linux-opt/ami -p <user id>
-i lo -s 239.255.36.<index> -L <libamiusr path> &

where <user id> is the same string as above, <index> is a unique number from 0 to 255, and <libamiusr path>
is the full path name to any plug-in module (libamiusr.so) you might want. This program creates a
process that parses the data from shared memory, performs analysis directed from the GUI (next executable),
and sends the resulting plots to the GUI.

Finally,

offline_ami

where x.x.x should be the most version in the pds directory (3.2.13 as of this writing). 

Wiki Markup
Then click the Select button and the gui will bring up a "Select Directory" dialog. Use that to navigate to the directory containing the xtc files you are interested in. For example:
&nbsp;
<image001.png>
&nbsp;
Then, select the run number you want from the drop-down, and press Run. The run will be processed as fast as possible unless the Throttle slider is moved to some value such as 60 Hz or 5 Hz, in which case a delay will be inserted after each datagram to keep the playback rate at the requested throttle rate.
&nbsp;
<image002.png>
&nbsp;
&nbsp;
The rest of the GUI (starting with the Setup section) is the same as the online_ami program.
&nbsp;
There are some options that can be specified on the command line. These are listed when the --h option is given:
&nbsp;
(psexport01./reg/g/pcds/dist/pds/3.2.
12.0
13/build
/
)$ ami/bin/i386-linux-dbg/offline_ami \-h
Usage: ami/bin/i386-linux-dbg/offline_ami \-p <xtc path>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-i <interface address>\]
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-s <server mcast group>\]
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-L <user plug-in path>\]
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-o <filename for debugging messages>\]
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-e <filename for error messages>\]
&nbsp;
If no options are given, the following defaults are used:
&nbsp;
Interface address: 127.0.0.1 (aka localhost/loopback)
Server mcast group: 239.255.242.0
User plug-in paths: none
Debugging messages go to console
Error messages go to console
&nbsp;
&nbsp;
I have some more recent changes that haven’t made it into a build yet, most noticeably the progress bar that you can drag back and forwards (I’m still finishing that up).
Click the Select button and the program will bring up a "Select Directory" dialog. Use that to navigate to the directory containing the xtc files you are interested in. For example: !image-1.jpg|border=1!
Then, select the run number you want from the drop-down, and press Run. The run will be processed as fast as possible unless the Throttle slider is moved to some value such as 60 Hz or 5 Hz, in which case a delay will be inserted after each datagram to keep the playback rate at the requested throttle rate. The program will display the progress as the run is processed: !image-3.jpg|border=1!
The rest of the program (starting with the Setup section) functions the same as the&nbsp;Online Monitoring program, documented earlier on this page.

There are some options that can be specified on the command line. These are listed when the --h option is given:

$ ami/bin/i386-linux-dbg/offline_ami -h

Usage: ami/bin/i386-linux-dbg/offline_ami -p <xtc path>

Wiki Markup
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-i <interface address>\]

Wiki Markup
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-s <server mcast group>\]

Wiki Markup
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-L <user plug-in path>\]

Wiki Markup
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-o <filename for debugging messages>\]

Wiki Markup
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\[-e <filename for error messages>\]

If no options are given, the following defaults are used:

  • Interface address: 127.0.0.1 (aka localhost/loopback)
  • Server mcast group: 239.255.242.0
  • User plug-in paths: none
  • Debugging messages go to console
  • Error messages go to console

In a future release, there will be a progress bar that can be dragged backwards to repeat a section of the run, or forwards to skip to a later part of the runopt/online-ami -I lo -i lo -s 239.255.36.<index> Wiki Markupwhere <index> is the same number (\[0..255\]) as above. This launches the GUI for display and analysis. The resulting three processes \{xtcmonserver, ami, online_ami\} work together to read, analyze, and display the data. If you need to restart any one of them, then you must restart them all.