previous.gif Internal features - Top - Data format next.gif

The Midas system provides several off-the-shelf programs to control, monitor, debug the data aquisition system. Starting with the main utility (odbedit) which provide access to the Online data base and run control.


Midas Frontend application

The purpose of the Midas Frontend application is to collect data from hardware and transmit this information to a central place where data logging and analysis can be performed. This task is achieved with a) a specific code written by the user describing the sequence of action to acquire the hardware data and b) a framework code handling the data flow control, data transmission and run control operation. From Midas version 1.9.5 a new argument (-i index) has been introduced to facilitate the multiple frontend configuration operation required for the Event Builder Functions.


odbedit task

odbedit refers to the Online DataBase Editor. This is the main application to interact with the different components of the Midas system.

See ODB Structure for more information.

[local:midas:Stopped]/>help
Database commands ([] are options, <> are placeholders):

alarm                   - reset all alarms
cd <dir>                - change current directory
chat                    - enter chat mode
chmod <mode> <key>      - change access mode of a key
                          1=read | 2=write | 4=delete
cleanup                 - delete hanging clients
copy <src> <dest>       - copy a subtree to a new location
create <type> <key>     - create a key of a certain type
create <type> <key>[n]  - create an array of size [n]
del/rm [-l] [-f] \<key>  - delete a key and its subkeys
  -l                      follow links
  -f                      force deletion without asking
exec <key>/<cmd>        - execute shell command (stored in key) on server
find <pattern>          - find a key with wildcard pattern
help/? [command]        - print this help [for a specific command]
hi [analyzer] [id]      - tell analyzer to clear histos
ln <source> <linkname>  - create a link to <source> key
load <file>             - load database from .ODB file at current position
ls/dir [-lhvrp] [<pat>] - show database entries which match pattern
  -l                      detailed info
  -h                      hex format
  -v                      only value
  -r                      show database entries recursively
  -p                      pause between screens
make [analyzer name]    - create experim.h
mem                     - show memeory <b> Usage </b>
mkdir <subdir>          - make new <subdir>
move <key> [top/bottom/[n]] - move key to position in keylist
msg [user] <msg>        - compose user message
old                     - display old messages
passwd                  - change MIDAS password
pause                   - pause current run
pwd                     - show current directory
resume                  - resume current run
rename <old> <new>      - rename key
rewind [channel]        - rewind tapes in logger
save [-c -s] <file>     - save database at current position
                          in ASCII format
  -c                      as a C structure
  -s                      as a #define'd string
set <key> <value>       - set the value of a key
set <key>[i] <value>    - set the value of index i
set <key>[*] <value>    - set the value of all indices of a key
set <key>[i..j] <value> - set the value of all indices i..j
scl [-w]                - show all active clients [with watchdog info]
shutdown <client>/all   - shutdown individual or all clients
sor                     - show open records in current subtree
start [number] [now] [-v]   - start a run [with a specific number], [without question]
                           [-v verbose the transaction to the different clients]
stop [-v]                   - stop current run
                           [-v verbose the transaction to the different clients]
trunc <key> <index>     - truncate key to [index] values
ver                     - show MIDAS library version
webpasswd               - change WWW password for mhttpd
wait <key>              - wait for key to get modified
quit/exit               - exit


mstat task

mstat is a simple ASCII status display. It presents in a compact form the most valuable information of the current condition of the Midas Acquisition system. The display is composed at the most of 5 sections depending on the current status of the experiment. The section displayed in order from top to bottom refer to:


analyzer task

analyzer is the main online / offline event analysis application. analyzer uses fully the ODB capabilities as all the analyzer parameters are dynamically controllable from the Online Database editor odbedit task.

For more detailed information see MIDAS Analyzer


mlogger task

mlogger is the main application to collect data from the different frontends under certain conditions and store them onto physical device such as disk or tape. It also acts as a history event collector if either the history flags are enabled in the frontend equipment (see The Equipment structure or if the ODB tree /History/Links is defined (See History system). See the ODB /Logger Tree for reference on the tree structure.


lazylogger task

lazylogger is an application which decouples the data aquisition from the data logging mechanism. The need of such application has been dictated by the slow response time of some of the media logging devices (Tape devices). Delay due to tape mounting, retension, reposition implies that the data acquisition has to hold until operation completion. By using mlogger to log data to disk in a first stage and then using lazylogger to copy or move the stored files to the "slow device" we can keep the acquisition running without interruption.

Self-explanatory the Settings and Statistics contains the running operation of the channel. While the List- will have a dynamic list of run number which has been sucessfully manipulated by the Lazylogger channel. This list won't exist until the first successful operation of the channel is completed.


mdump task

This application allows to "peep" into the data flow in order to display a snap-shot of the event. Its use is particularly powerful during experiment setup. In addition mdump has the capability to operate on data save-set files stored on disk or tape. The main mdump restriction is the fact that it works only for events formatted in banks (i.e.: MIDAS, YBOS bank).


mevb task

mevb is an event builder application taking several frontends Midas data source and assembles a new overall Midas event.

In the case where overall data collection is handled by multiple physically separated frontends, it could be necessary to assemble these data fragments into a dedicated event. The synchonization of the fragment collection is left to the user which is done usually through specific hardware mechanism. Once the fragments are composed in each frontend, they are sent to the "Event Builder" (eb) where the serial number (pheader->serial_number) of each fragment is compared one event at a time for serial match. In case of match, a new event will be composed with its own event ID and serial number followed by all the expected fragments. The composed event is then sent to the next stage which is usually the data logger (mlogger).

The mhttpd task will present the status of the event builder as an extra equipment with its corresponding statistical information.


mspeaker, mlxspeaker tasks

mspeaker, mlxspeaker are utilities which listen to the Midas messages system and pipe these messages to a speech synthesizer application. mspeaker is for the Windows based system and interface to the FirstByte/ProVoice package. The mlxspeaker is for Linux based system and interface to the Festival. In case of use of either package, the speech synthesis system has to be installed prior to the activation of the mspeaker, mlxspeaker.


mcnaf task

mcnaf is an interactive CAMAC tool which allows "direct" access to the CAMAC hardware. This application is operational under either of the two following conditions:
  1. mcnaf has been built against a particular CAMAC driver (see CAMAC drivers).
  2. A user frontend code using a valid CAMAC driver is currently active. In this case the frontend acts as a RPC CAMAC server and will handle the CAMAC request. This last option is only available if the frontend code (mfe.c) from the Building Options has included the HAVE_CAMAC pre-compiler flag.

Thu> cd /midas/utils
Thu> make -f makefile.mcnaf DRIVER=kcs2927
gcc -O3 -I../include -DOS_LINUX -c -o mcnaf.o mcnaf.c
gcc -O3 -I../include -DOS_LINUX -c -o kcs2927.o ../drivers/bus/kcs2927.c
gcc -O3 -I../include -DOS_LINUX -o miocnaf mcnaf.o kcs2927.o  ../linux/lib/libmidas.a -lutil
gcc -O3 -I../include -DOS_LINUX -c -o wecc32.o ../drivers/bus/wecc32.c
gcc -O3 -I../include -DOS_LINUX -o mwecnaf mcnaf.o wecc32.o  ../linux/lib/libmidas.a -lutil 
gcc -O3 -I../include -DOS_LINUX -c -o camacrpc.o ../drivers/bus/camacrpc.c
gcc -O3 -I../include -DOS_LINUX -o mcnaf mcnaf.o camacrpc.o  ../linux/lib/libmidas.a -lutil 
gcc -O3 -I../include -DOS_LINUX -c -o camaclx.o ../drivers/bus/camaclx.c
gcc -O3 -I../include -DOS_LINUX -o mdrvcnaf mcnaf.o camaclx.o  ../linux/lib/libmidas.a -lutil 
rm *.o


melog task

Electronic Log utility. Submit full Elog entry to the specified Elog port.


mhist task

History data retriever.

   mhist -e 5 -v "I-WC1+_Anode" -t 3600 -s 240400 -p 250400
  Apr 24 00:00:09 2000    160
  Apr 24 01:00:12 2000    160
  Apr 24 02:00:13 2000    160
  Apr 24 03:00:14 2000    160
  Apr 24 04:00:21 2000    180
  Apr 24 05:00:26 2000    0
  Apr 24 06:00:31 2000    160
  Apr 24 07:00:37 2000    160
  Apr 24 08:00:40 2000    160
  Apr 24 09:00:49 2000    160
  Apr 24 10:00:52 2000    160
  Apr 24 11:01:01 2000    160
  Apr 24 12:01:03 2000    160
  Apr 24 13:01:03 2000    0
  Apr 24 14:01:04 2000    0
  Apr 24 15:01:05 2000    -20
  Apr 24 16:01:11 2000    0
  Apr 24 17:01:14 2000    0
  Apr 24 18:01:19 2000    -20
  Apr 24 19:01:19 2000    0
  Apr 24 20:01:21 2000    0
  Apr 24 21:01:23 2000    0
  Apr 24 22:01:32 2000    0
  Apr 24 23:01:39 2000    0


mchart task

mchart is a periodic data retriever of a specific path in the ODB which can be used in conjunction with a stripchart graphic program.

Two possible stripchart available are:

Once the configuration file has been created, it is possible to apply any valid operation (equation) to the parameters of the file following the gstripchart syntax.

In the case of the use of the stripchart from G.Hofman, only the "filename", "pattern", "maximum", "minimum" fields are used.

When using mchart with -D Argument, it is necessary to have the MCHART_DIR defined in order to allow the daemon to find the location of the configuration and data files (see Environment variables).

chaos:~/chart> more trigger.conf 
#Equipment:            >/equipment/kos_trigger/statistics
menu:                   on
slider:                 on
type:                   gtk
minor_ticks:            12
major_ticks:            6
chart-interval:         1.000
chart-filter:           0.500
slider-interval:        0.200
slider-filter:          0.200
begin:        Events_sent
  filename:     /home/chaos/chart/trigger
  fields:       2
  pattern:      Events_sent
  equation:     \$2
  color:        \$blue
  maximum:      1083540.00
  minimum:      270885.00
  id_char:      1
end:            Events_sent
begin:        Events_per_sec.
  filename:     /home/chaos/chart/trigger
  fields:       2
  pattern:      Events_per_sec.
  equation:     $2
  color:        \$red
  maximum:      1305.56
  minimum:      326.39
  id_char:      1
end:            Events_per_sec.
begin:        kBytes_per_sec.
  filename:     /home/chaos/chart/trigger
  fields:       2
  pattern:      kBytes_per_sec.
  equation:     $2
  color:        \$brown
  maximum:      898.46
  minimum:      224.61
  id_char:      1
end:            kBytes_per_sec.

A second file (data file) will be updated a fixed interval by the {mchart} utility.

  chaos:~/chart> more trigger
    Events_sent 6.620470e+05
    Events_per_sec. 6.463608e+02
    kBytes_per_sec. 4.424778e+02


mtape task

Tape manipulation utility.


dio task

Direct I/O task provider (LINUX).

If no particular Linux driver is installed for the CAMAC access, the dio- program will allow you to access the I/O ports to which the CAMAC interface card is connected to.


stripchart.tcl file

Graphical stripchart data display. Operates on mchart task data or on Midas history save-set files. (see also History system).

stripchart.tcl mhist mode: main window with pull-downs.
stripchart1.jpg

stripchart.tcl Online data, running in conjunction with mchart
stripchart2.jpg


rmidas task

Root/Midas remote GUI application for root histograms and possible run control under the ROOT. environment.

rmidas display sample. Using the example/experiment/ demo setup.
rmidas.jpg


hvedit task

High Voltage editor, graphical interface to the Slow Control System. Originally for Windows machines, but recently ported on Linux under Qt by Andreas Suter.


Midas Remote server

mserver provides remote access to any midas client. This task usually runs in the background and doesn't need to be modified. In the case where debugging is required, the mserver can be started with the -d flag which will write an entry for each transaction appearing onto the mserver. This log entry contains the time stamp and RPC call request.


Midas DOC Version 1.9.5 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk