Project

General

Profile

DQM

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 setup.sh 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 setup.sh
> 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- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | 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: https://nodejs.org/en/)
cd offline/gm2Dev_v7_04_00/srcs/gm2dqm/node
source setup.sh
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                   : "g2tracker0.fnal.gov:7070" 
     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
./start-DQMServer.sh <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. http://gm2tracker0.fnal.gov:3000/

cd gm2trackerdaq/software/bin
./start-DQMClient.sh <optional host>

The output goes to a "screen" : StrawTrackerDQMClient.