Gather histograms and compare to standard distributions.
The HistCompr monitor compiles histograms from a list of channels. It then compares these histograms to a set of standard histograms and generates a trigger if the histograms differ significantly. Both the histogram and the reference are served to the DMT viewer by way of the monitor data protocol.

HistCompr performs the following steps.

  1. Read reference histograms from the specified directory. The histogram is read from the file with the same name as the histogram. If a reference directory is not specified, or if there is no file with the appropriate name, the is step is omitted.
  2. Fill the histogram. The histogram is filled for the length of time specified by the -time command line argument. The histogram is served to any client while the data are being filled.
  3. Compare to reference. When the histogram has been filled for the specified time, the Histogram data are compared to the reference histogram (if specified). If the resulting chi-square is greater than the limit specified in the configuration file, and the -trig argument was specified on the command line, a HistCompr trigger is generated. If the chi-square exceeds the limit and the -plot argument was specified, The histogram is plotted on the DISPLAY monitor. In any case the histogram is cleared and the filling process is repeated.
  4. Save histograms. On termination, if the -savdir argument was specified, all Histograms are saved in the specified directory. The histogram names are used as the file names.

HistCompr can therefore be used in the following modes:

Running HistCompr

The HistCompr command line is as follows:

HistCompr [-conf <config-file>] [-time <reset-time>] [-savedir <save-dir>] \
          [-refdir <reference-dir>] [-osc <osc-config>] [-plot] [-trig]

The arguments have the following meaning:
<config-File> Configuration file name
<reset-time> All histograms are reset after the specified time has elapsed.
<save-dir> Directory into which to save the histograms.
<reference-dir> Directory from which the reference histograms are to be fetched.
<osc-config> Configuration file for an Operating State Condition list to be used to qualify data for histogramming.
-plot Call Root plotter for every histogram failing the comparison.
-trig Enable trigger generation.

Configuration File

The HistCompr configuration file specifies which channels are to be histogrammed, the binning and options. Each line within a configuration file specifies a histogram to be made. The contents of a configuration file line are as follows:

HistCompr Chi-Square Calculation

The is calculated by normalizing both the Histogram and the reference to one and using the following formula

The numbers and are the fractional occupation of the histogram or reference bin respectively. N is the number of bins in the histogram. Note that the overflow and underflow counts are treated identically to the histogram bins. is the total number of histogram entries. This formula assumes (among other things) that the reference histogram is an exact representation of the desired distribution. Any occurance of a non-zero histogram bin with a zero reference would give an undefined chi-square. To prevent this, the error on the difference is redefined to be when this case occurs.

1.0; July 27, 2001

alphabetic index hierarchy of classes

generated by doc++