Online monitoring

During data taking we can monitor the data with a semi-online system. The program reads and processes the data that is being produced, but if the data is produced faster than it is processed, the ``online'' monitor will not be able to show the latest event. This issue can be avoided by using the -s N option and process only every (N+1)th event.

The online monitoring has three components:

hrootmonitor
Processes all the data (X, Y and PMm2 synchronised in events, i.e. only triggered events) and produces histograms stored in /tmp/harpo.map. This file is always the same, and only one hrootmonitor process should run at a time.
pmm2monitor
Processes all the PMm2 data (regardless of the trigger) and produces histograms stored in /tmp/harpoPmm2.map. This file is always the same, and only one pmm2monitor process should run at a time.
hmonitorgui
Reads the histograms in /tmp/harpo.map and /tmp/harpoPmm2.map, and shows them in a Graphical User Interface (GUI). It runs in principle independently from the HARPO framework. It can be stopped and restarted at any time, without interfereing with the data processing.

If the data is stored with standard naming in $HARPO_DATA_DIR, monitoring (hrootmonitor and pmm2monitor) can be started with the relevant options with the script:

monitorRun.sh RUNNO (FIRSTEVT) (S)
Where RUNNO is the run number, FIRSTEVT is the number of events to skip at the beginning (optional, default is 0) and S is the number of events to skip (optional, default is 0). This script will also make sure no other instance of the monitoring is already running. If a monitor is already running, and you want to start a different one, you can do it with killMonitor.sh.

Once these processing programs have started, you can start the display (if it is not already running):

hmonitorgui

Remark: These programs use the TMapFile object in ROOT (http://root.cern.ch/root/html/TMapFile.html). It can encounter memory management issues. If there is a problem (core dump), it might be solved by modifying the prefered memory addresses (see http://root.cern.ch/root/html/TMapFile.html#TMapFile:SetMapAddress). It can be done using the monitor.address and monitor.addressPmm2 fields in the configuration file.

Remark 2: The monitorRun.sh script uses the configuration file defined with the environment variable $HARPO_CFG_FILE. If this variable is not set, it will use $HARPO_USER_DIR/cfg/HarpoReconstruction.cfg, which is created at installation.

Philippe Gros 2015-06-19