Online Monitoring (OnMon) - EMPHATICSoft/emphaticsoft GitHub Wiki

Online Monitoring (OnMon) consists of two parts, the first is an art analyzer module (OnMonPlotter) that creates various plots and can either dump them into a root file (commonly called an onmon file) or send them to a shared memory segment. The second part is the viewer (binary: onmon_viewer) that reads the plots from either an onmon file or a shared memory segment and displays them in a specialized root viewer.

The shared memory segment is generally used for monitoring during shift; in most other cases reading from a file is simpler.

File-based running:

  1. Process artdaq file to create onmon fille with plots. eg.

    art -c onmonplotter_job.fcl /exp/emph/data/production/prod4/artdaq/emphdata_v04.00_r2113_s22.artdaq.root
    

    Check the Production wiki for the location of the latest artdaq files. As of 2025-01-14 the latest are in /exp/emph/data/production/prod4/artdaq/.

  2. Open onmon file with the viewer. eg.

    onmon_viewer -f onmon_r2113_s22.root
    

Shared memory segment running (non-shift version):

  1. Edit the anlyzers block in onmonplotter_job.fcl to use the cr_onmon configuration (instead of standard_onmon).

    analyzers:
     {
    	onmon: @local::cr_onmon
     }
    
  2. Run the plotter job just like before, though to ensure it’s still processing by the time you open the viewer use a wildcard to pick up more than one file.

    art -c onmonplotter_job.fcl /exp/emph/data/production/prod4/artdaq/emphdata_v04.00_r2113_s*.artdaq.root
    
  3. To connect the viewer to the shared memory segment, open it without providing a file. You’ll need to do this step in a separate terminal on the same machine since the plotter job will continue running until it runs out of events to process.

    onmon_viewer
    

Running for shift:

True operations while we’re taking data requires an extra job that unpacks the raw data and sends the art events to a TCP socket that the onmon plotter module (when run with particular settings) can see. The plotter then writes to a shared memory segment that the viewer can pull plots from.

  1. Unpack raw files. We used to have a script that automatically checked for new raw files while we were running, but seem to have lost it. This will need to be recreated (and committed to the repo this time so we stop having to recreate it). The line that actually unpacks the file is:

    art -c daq2rawdigit4OnMon_job.fcl <raw file>
    
  2. On the same machine, then run the control room (CR) version of the OnMonPlotter module:

    art -c CR-onmonplotter_job.fcl
    

    Not this doesn’t take a file - it is already configured to look at the location the unpacking is writing to.

  3. Open the viewer the same as before:

    onmon_viewer
⚠️ **GitHub.com Fallback** ⚠️