Chapter 32. The Scaler Display Program.

With NSCLDAQ-11.0 and the ability to merge data from multiple data sources, a new scaler display has been written to accomodate the special needs of this system. Specifically the new program:

The remainder of this chapter describes:

For reference information see the Scaler Display program manpage.

32.1. Running the scaler display program.

The scaler display program needs two pieces of information to operate:

The set of input rings is specified by defining the environment variable SCALER_RING to be a space separated list of ring URIs. Recall that the form of a ring URI is: tcp://hostname/ringname where hostname is the name of the host in which the ring is defined and ringname is the name of the ring itself.

The following bash command line defines SCALER_RING to accept data from the local ring fox1 and a remote ring living in spdaq22 called fox2:


export SCALER_RING="tcp://localhost/fox1 tcp://spdaq22/fox2"
            

A description of how to process the data from the input rings is provided by a configuration file. The next section will give more details on the form of the configuration file. The configuration file is a command line parameter supplied when the program is invoked.

The scaler display program itself lives in the bin directory of the NSCLDAQ installation tree. The daqstart.bash script, in the top level of the NSCLDAQ installation tree can be used to define several useful environment variables. If that script has been sourced (we recommend you source it in your .bashrc script), the following command line will start the scaler program:


$DAQBIN/ScalerDisplay myscalers.def
            

Where myscalers.def is the definition file.

The scaler display program will produce several files at the end of each run:

runnnnn.report

A human readable report for run number nnnn. Note that the run number part of the filename will have leading zeroes to fill it out to four digits. In the event your experiment has more than 9999 runs, an additional digit will be added to the run number part of the filename.

runnnnn.csv

Contains the same information as the .report file but in CSV format, so that it can easily be sucked into a program

runnnnn-stripchart.ps

A postscript rendering of the strip chart (if it is enabled) at the end of the run.

32.1.1. Sample report file

Below the first few lines of a .report file created at the end of the run by the scaler display program.


Run     :  905
Title   :  some new title
Started :  Mon Sep 22 13:54:31 EDT 2014
Ended   :  Mon Sep 22 13:57:17 EDT 2014
Elapsed : 0 00:02:46

+---------+-----+------------+------------+
|Name     |Total|Average Rate|Rate std-dev|
+---------+-----+------------+------------+
|channel00|5269 |31.61       |21.74       |
|channel01|5279 |31.67       |21.86       |
|channel02|5286 |31.72       |21.85       |
|channel03|5284 |31.70       |21.82       |
|channel04|5290 |31.74       |21.82       |
|channel05|5298 |31.79       |21.80       |
|channel06|5296 |31.78       |21.77       |
|channel07|5304 |31.82       |21.77       |
|channel08|5308 |31.85       |21.78       |
|channel09|5306 |31.84       |21.76       |
|channel10|5312 |31.87       |21.76       |
|channel11|5312 |31.87       |21.77       |
|channel12|5317 |31.90       |21.77       |
|channel13|5318 |31.91       |21.77       |
...                    
                

Note that typicall you will have chosen more useful channel names (left most column)

32.1.2. Sample csv file

Below are the first few lines of a .csv file produced by the scaler program at the end of a run:


905,some new title,Mon Sep 22 13:54:31 EDT 2014,Mon Sep 22 13:57:17 EDT 2014,166
channel00,5269,31.614126456505826,21.737690006796004
channel01,5279,31.674126696506786,21.862983433929543
channel02,5286,31.71612686450746,21.85259265477174
channel03,5284,31.704126816507266,21.82050687447798
channel04,5290,31.740126960507844,21.82339257631644
channel05,5298,31.78812715250861,21.803205011543277
channel06,5296,31.77612710450842,21.774543936089657
channel07,5304,31.824127296509186,21.771400477541533
                

The first line is a header that contains

  • The run number

  • The title string

  • The date and time at which the run started.

  • The date and time at which the run ended.

  • The total length of the run in seconds.

Subsequent lines of the file contain information about each scaler in order:

  • The name you assigned to the scaler channel.

  • The total number of counts in that scaler over the length of the run.

  • The average count rate in the scaler over the length of the run.

  • The standard deviation in the count rate over the length of the run. Note that for the examples, the scaler rates are contrived and the standard deviation is artificially large for the average rate.