The Data Quality Monitoring (DQM) system is implemented in ART using PlotLy and uses the offline environment.

Setting up the offline environment

The art part of the code is in the gm2dqm repository. At the time of writing, this has awkward dependencies on specific branches of the other gm2XXXX packages that require us to checkout nearly everything on specific branches.

Eventually, this should all go into cvmfs and we won't have to checkout or build anything.

In the meantime, you can use the attached script. Change the hard-coded OFFLINE and GM2MIDAS_DIR paths to what you want for your system.

Then run the following to check out all the packages:

> source
> git_clone_all

To build all the code, you want to setup the environment and then build with ninja:

> . mrb s
> mrb b --generator ninja

The function/command (defined in ~/.bashrc) :

offline # runs the setup and cds to offline directory

Install the necessary javascript infrastructure

As root make sure that zeromq and nodejs are not already installed via yum, so in any case:

yum remove nodejs*
yum remove zeromq*

Then as daq:

curl -o- | bash

This installs nvm in ~/.nvm and adds bash functions (e.g the command "command") via appending to ~/.bashrc.
Log-out and back in again to activate these bash functions. Then install the js modules:

command -v nvm  # check that nvm is installed OK
nvm install 7.8.0 # install the latest version of node.js (check the latest version via:
cd offline/gm2Dev_v7_04_00/srcs/gm2dqm/node
npm install

Start the server

Before starting the server, check your config.

  • online/gm2trackerdaq/software/cfg/environment-XXXXXX.env : make sure OFFLINE_ROOT is set at the top of the file, e.g. for g2tracker0:
    export OFFLINE_ROOT=/home/daq/tracker/offline
  • $MRB_SOURCE/gm2dqm/art/fcl/TrackerDQMOnlineServerMC1.fcl :
 detail : {
// This is the server where MIDAS/event-builder is running
     mserverHost                   : "" 
     midasExperimentName           : "gm2" 

Start the server (you must have the online environment set to do this i.e. the "daq" or "daqs" command):

cd gm2trackerdaq/software/bin
./ <optional host>

The output goes to a "screen" : StrawTrackerDQMServer.

Start the client

The client then connects to the ART stream via a socket and creates a web-instance on port 3000 of the machine where the client is running e.g.

cd gm2trackerdaq/software/bin
./ <optional host>

The output goes to a "screen" : StrawTrackerDQMClient.