Content-type: text/html Man page of ScalerDisplay


Section: USER COMMANDS (1)
Updated: August 2004
Index Return to Main Contents



ScalerDisplay - NSCL Supported Scaler Display program for NSCLDAQ.



export DAQHOST=datasourcecomputer

ScalerDisplay configurationfile



   This script provides a configurable scaler display for the NSCL Data Acquisition system. The script requires that:

An environment variable named DAQHOST be defined to be the name of the computer that is taking data. At the NSCL this will usually be a system named spdaqnn where nn is a two digit number.

A single command parameter provides the name of a TCL script that is used to configure the display. The full range of TCL functionality may be used by this configuration script. The display script, in addition defines several commands that are used to configure the display (See CONFIGURATION COMMANDS below).

In addition to configuring the display itself, ScalerDisplay supports the invocation of user written code at well defined points of operations. For more information about that see CALLOUTS below.



The ScalerDisplay program recognizes three types of items:

channels -
A channel is a scaler channel. It has a name and an index. The name is used to refer to and label the channel. The index is the offset into the set of scalers (numbered from 0) that contains that channel.

pages -
A page is a set of scalers grouped together on one display page. Pages have a title, which is an arbitrary text string that is displayed at the top of the page when the page is active, and a Tabname which is used to select the page from the tabbed notebook widget that displays them.

lines -
A line is either a single scaler or a pair of scalers displayed on a line of the scaler display.

Channels are defined using the channel command. The format of this command is:

channel name index

Pages are defined via the page command. The format of this command is:

page Tabname "Some meaningful title string"

Note that the title string must be enclosed in quotes if it contains whitespace or other TCL word-separators.

Single scaler lines are defined via the display_single

command. The format of this command is:

display_single Tabname channelname

Where Tabname is the Tab name of a scaler page and channelname is the name of a scaler channel.

Ratio lines are defined via the display_ratio command:

display_ratio  Tabname numerator_chanel denominator_channel



The scaler script will invoke user written procedures defined in the configuration script (or scripts sourced by it) at well defined points of the run. These callouts can be used to provide functionality not originally foreseen by the program.

UserUpdate -
UserUpdate, if defined, is called by the script whenever it has updated the displays. No parameters are passed in to the procedure but several global variables are useful (see GLOBAL VARIABLES below).

UserBeginRun -
UserBeginRun is called at the beginning of a run, if it has been defined. No parameters are passed.

UserEndRun -
UserEndRun, if defined, is called at the end of a run. No parameters are passed.



The following global variables are useful within user callouts.

RunNumber -

   The number of the current run.

RunTitle -

   A string contaning the title of the current run.

Scaler_Totals -

   An array indexed by scaler channel number containing the total number of counts in each channel.

Scaler_Increments -

   An array indexed by scaler channel number containing the number of counts in the last time increment (see also ScalerDeltaTime)

ScalerDletaTime -

   The number of seconds of counts represented by the Scaler_Increments array elements.


  An array indexed by scaler names.  Each element of this array is the index of the corresponding scaler. For example, if you have defined a channel named george, ScalerMap(george) will be the scaler channel index associated with george.



#   Define the scaler channels:
#   These can be in any order, I'm just copying the order from the original
#   file.  my preference in fact would be to go in channel order.
#   This is a TCL script with 
#    commands 'channel'  - to define a chanel name/buffer position correspondence
#             'page'     - To define a scaler page.
#             'display_single' - To define a single scaler line in a page.

channel       0
channel       16
channel       17
channel       18;              # is this a typo in the original file?
channel       19
channel        1
channel        2
channel gas.Ge.cfd_B-OFF 12
channel        5
channel gas.PS.cfd_B-OFF 13
channel I2.SCI.N          3
channel I2.SCI.S          4
channel TA.BaF2           6
channel master.gated     11
channel      10
channel cpu.lam.TO        7
channel clock.gated       9
channel        8
channel beam.cycle.on    14
channel   15

#  Next define the pages, their long titles and the tab name
#  and their contents.
#  I've defined the page ALL to be the original page
#  as well as some additional pages so that you can get the
#  idea of how you can use this to organize the display if you want to.
#  If you don't, you can rip out the extra pages.

page ALL  "Gas Cell DAQ All Scalers"
display_single ALL
display_ratio  ALL
display_ratio  ALL
display_single ALL
display_ratio  ALL      gas.Ge.cfd_B-OFF
display_ratio  ALL      gas.PS.cfd_B-OFF
display_ratio  ALL I2.SCI.N        I2.SCI.S
display_single ALL TA.BaF2
display_ratio  ALL master.gated
display_ratio  ALL cpu.lam.TO          master.gated
display_ratio  ALL clock.gated
display_ratio  ALL
display_ratio  ALL beam.cycle.on

# If you only want the first page, then remove all lines
# below here:
#------------------------- cut below here -------------------

#  A second page:
#   Just showing the livetime information  mostly.

page Livetime "Live time information"
display_ratio Livetime  master.gated
display_ratio Livetime  clock.gated
display_ratio Livetime  cop.lam.TO   master.gated

#  A third page showing only the gas cell:

page GasCell "Gas cell scalers"

display_single GasCell
display_ratio  GasCell
display_ratio  GasCell
display_single GasCell
display_ratio  GasCell      gas.Ge.cfd_B-OFF
display_ratio  GasCell      gas.PS.cfd_B-OFF

# Set up a strip chart with a single and a 
# ratio trace.

stripparam  master.gated
stripratio clock.gated

#  The following line enables the scaler pages
#  to tearoff:

$Notebook configure -tearoff 1




   There is currently no way to place blank lines on a display page.

   This software only available with release 7.4 and later of nscldaq.




This document was created by man2html, using the manual pages.
Time: 23:56:30 GMT, August 17, 2004