Low-Energy Muon (LEM) Experiment
0.5.2
|
After installation of Midas, Root, and the Kernel driver for the VME-PCI interface (see Installation page) the following steps will start the Midas experiment on lem00.
Login as local user nemu on lem00, start a terminal and enter
[nemu@lem00]$ nemu_start_midas
to start the Midas clients of experiment Nemu.
This will start (if not running already) the following clients:
The beamline slow control must be restarted after changing to the correct tcpip parameters (i.e. host=pc451, port=10000 for muE4). In ODB goto /Equipment/Beamline/Settings/Devices/Magnets/BD and change the host and port values accordingly. The remote control for the two beam shutters KV61/62 is done through the piE1 beam line server pc130.
As run control you may use either odbedit or the web browser interface. For the latter start a Web browser an goto address http://lem00.
The setup of ODB parameters usually needs some manual work if the experiment is setup for the first time. This can be done either by using odbedit or the Midas status web page.
At begin-of-run the ODB is dumped into the ASCII file last.odb, and at end-of-run it is dumped in a file nemu_%02d_%04d.odb (with 2 digits for the year and 4 digits representing the run number). If the ODB gets corrupted or lost these ODB dumps can be used to recover the ODB (see Recovery of Midas).
Some ODB keys are used by Midas clients. In order to open/create/write/hot-link ODB records by the clients c-structures can be automatically defined by entering
[local:nemu:S]/> make
This will create experim.h which is included by the frontend and analyzer clients. So, if the ODB completely gets lost the frontends and analyzer will re-create that fraction of ODB that was used by them.
If you have to restart a Midas client you can either use odbedit or the Programs button on the Midas status web page. In odbedit you have to enter
[local:nemu:S]/> sh <client_name>
Note:
When re-starting vme_fe and nemu_analyzer it could be necessary to restart the mlogger client as well.
If the shut down of a Midas client fails, you may try it once more. If this still does not work you can either try to kill the client manually followed by entering cleanup in odbedit, or you try a complete Recovery of Midas.
It may happen that one or more clients are hanging, or that there are problems accessing the Online Data Base (ODB). In that case all Midas clients have to be stopped and shared memory segments and semaphores have to be cleaned up. For this purpose execute the shell script nemu_mcleanup. Enter
[nemu@lem00]$ nemu_mcleanup
do stop and remove all Midas clients
Alternatively you an try to do it manually:
In odbedit enter:
[local:nemu:S]/> sh all [local:nemu:S]/> cleanup [local:nemu:S]/> exit
Enter mcleanup in a terminal to free shared memory segments and semaphores. You can check it by typing ipcs after mcleanup. There shouldn't be any segments and semaphores left for user nemu. It should look like that:
[nemu@lem00 nemu]$ ipcs
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status
------ Semaphore Arrays -------- key semid owner perms nsems
------ Message Queues -------- key msqid owner perms used-bytes messages
With Midas clients active it looks like:
[nemu@lem00 nemu]$ ipcs
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x4d400004 458753 nemu 666 1076284 6 0x4d400005 491522 nemu 666 109532 6 0x4d400007 524291 nemu 666 1058108 4
------ Semaphore Arrays -------- key semid owner perms nsems 0x4d400002 524288 nemu 666 1 0x4d400003 557057 nemu 666 1 0x4d400004 589826 nemu 666 1 0x4d400005 622595 nemu 666 1 0x4d400007 655364 nemu 666 1
------ Message Queues -------- key msqid owner perms used-bytes messages
After a successful shutdown of Midas enter nemu_start_midas to restart the Midas clients.
Note: it can happen that the ODB and its disk dump (the .*.SHM files in the Midas data directory) are getting corrupt so that the restart of Midas clients can fail or is accompanied by ODB errors. In this case after stopping and removing of all Midas clients the .*.SHM files have to be deleted in /data/nemu. This leads to a loss of the ODB. However, at the end of each run an ASCII dump of the ODB is written to disk (lem07_2055.odb, for example). This file can be reloaded to ODB if the ODB was getting lost. Start odbedit and enter
[local:nemu:S]/> load /data/nemu/odb/2007/lem07_2055.odb
to recover the ODB of run 2055 of year 2007.
To recover the last backup-to-PSIarchive information do:
[local:nemu:S]/> load /data/nemu/dlog/Script_recover.odbInstallation - main - VME readout and Storage of Slow Control data