BField Coil Status (as seen by DB)

Page Links: Latest Values Near Far, General Info, All Plots and Logs

Latest Values


latest-near.png <!--#include virtual="latest-near.log"-->


latest-far.png <!--#include virtual="latest-far.log"-->


The directories below contain by year and month scans of what the databases think are the states of the detector BField coil. This comes from the using the DcsUser/CoilTools class to query the database in the loon framework.

Files are of the form: detector-YYYYMMDD-32-dbname
with the extension .log for text, and .png for the plot. The file name components are:

either Near or Far.
is the starting ( year, month, day ), here day is always 01.
the scan is always for 32 days from the start (UTC times).
is either master, dogwood0 (keep-up), or dogwood1 (physics production).

Contents of log files

A primary table in a typical log file will look like:

FarDet from "dogwood0 db" @ 2011-05-05 16:37:06 ========================================================== time isOK isReverse initial 2005-01-01 00:00:00 yes yes change 2005-02-01 19:25:15 no yes change 2005-02-01 19:42:26 no no *BField*flip* change 2005-02-01 19:56:29 yes no change 2005-02-01 19:59:29 no no change 2005-02-01 20:16:42 yes no final 2005-02-02 00:00:00 ==========================================================

The first line tells one which detector, which database and when the scan was done. The lines between the bars record the initial state of the coil at the first instant to be scanned, the last time, and any time the state changes. The "state" consists of a isOK and a isReverse flag as given by CoilTools. All times are UTC.

Contents of plots

The plots look like: example.png

The title records which detector, which database and the time range. The orange lines delimit the expected coil current limits, the red line is the recorded coil current. The blue line is the IsReverse state (label on the right), while the green line is the isOK state (label on the right). Excursions of the current (red) outside the limits (orange lines) will cause that period of time to be isOK=bad, though other readback conditions can also cause it. The x-axis time ticks are labelled as YY-MM-DD with the hour:minute below.


  • scan_polarity.C
    This is the workhorse routine for loon
  • scan_polarity_month
    This is the shell script that generates logs/plots for a given month for each of the three databases (master, dogwood0, dogwood1) and the two detectors (Near, Far).
  • update_plots
    This is the shell script that is run in cron to keep the plots up-to-date.

Plots and Logs