nscl_logo_small.gif (2463 bytes)

treeparameter - Manipulate and query tree parameters.

HH00706_.jpg (6530 bytes)

Syntax

     treeparameter -create name low high units
     treeparameter -list [pattern]
     treeparameter -set name bins low high inc units
     treeparameter -setinc name inc
     treeparameter -setbins name bins
     treeparameter -setunit name units
     treeparameter -setlimits name low high
     treeparameter -check name
     treeparameter -uncheck name
     treeparameter -version

Synopsis

The treeparameter command is part of the Tree Parameter package. The command allows users or scripts to list or modify characteristics of the defined treeparameters.

Description

The first command parameter is a switch that tells the treeparameter command what you want it to do. The switch also defines the number and meaning of the remaining command line parameters. Each of the possibilities is described in the sections below.

treeparameter -create name low high bins units This subcommand creates a new treeparameter, and if necessary, and underlying parameter. Command line parameters: Example:
      treeparameter -create new.tree.parameter -1.0 1.0 100 mm

treeparameter -list [pattern]

This subcommand lists the properties of the known tree parameters. The optional pattern parameter allows you to specify a glob pattern that will restrict the set of parameters that are listed. glob patterns are strings that have the same wildcard characters supported by filesystem matching in unix.

The output is a well-formed TCL list. Each element of the list is in turn a well formed sublist that describes a single parameter. Elements of the sublist are, in order;

Example : listing all parameters

treeparameter -list
{event.raw.00 100 1 100 0.99 channels} 
{event.raw.01 100 1 100 0.99 channels} 
{event.raw.02 100 1 100 0.99 channels} 
{event.raw.03 100 1 100 0.99 channels} 
{event.raw.04 100 1 100 0.99 channels} 
{event.raw.05 100 1 100 0.99 channels} 
{event.raw.06 100 1 100 0.99 channels} 
{event.raw.07 100 1 100 0.99 channels} 
{event.raw.08 100 1 100 0.99 channels} 
{event.raw.09 100 1 100 0.99 channels} 
{event.sum 100 1 100 0.99 arbitrary}

Example : listing only some parameters

treeparameter -list event.raw*
{event.raw.00 100 1 100 0.99 channels} 
{event.raw.01 100 1 100 0.99 channels} 
{event.raw.02 100 1 100 0.99 channels} 
{event.raw.03 100 1 100 0.99 channels} 
{event.raw.04 100 1 100 0.99 channels} 
{event.raw.05 100 1 100 0.99 channels} 
{event.raw.06 100 1 100 0.99 channels} 
{event.raw.07 100 1 100 0.99 channels} 
{event.raw.08 100 1 100 0.99 channels} 
{event.raw.09 100 1 100 0.99 channels} 

treeparameter -set name bins low high inc units

This subcommand sets the properties of a parameter to the indicated values. Each parameter has the following properties:

treeparameter -setinc name inc

This subcommand sets the new channel width of the tree parametr named to inc. This is done by holding the values of bins and low constant and adjusting the value of high to achieve the desired width

treeparameter -setbins name bins

This subcommand sets the new default channel count of the tree parameter named to bins. The low and high values are not modified, so this implies a change in the channel width.

treeparameter -setunit name units

This subcommand sets the unit label that is used by this parameter. The parameter units are used to label parameter's axes on spectra that involve this parameter when the spectrum is viewed in mapped mode.

treeparameter -setlimits name low high

This subcommand sets the default parameter axis limits for spectra created by the GUI. The number of bins is kept constant. This command, therefore, implies a change in the channel width.

treeparameter -check name

Returns 0 if the parameter's modified flag is not set and 1 if it is. Each treeparameter has a modified flag associated with it. Whenever a parameter's properties are modified, this flag is set. The modified flag is never set as a result of programmatic assignments to the tree parameter value on event by event processing, only by modifying the properties of the parameter. The modified flag is used to determine if a parameter's properties must be seaved to file for later recovery.

Example

(treeparam) 4 % treeparameter -check event.sum
0
(treeparam) 5 % treeparameter -setunit event.sum MeV
(treeparam) 6 % treeparameter -check event.sum
1

treeparameter -uncheck name

Clears the parameter's modified flag.

Example

(treeparam) 6 % treeparameter -check event.sum
1
(treeparam) 7 % treeparameter -uncheck event.sum
(treeparam) 8 % treeparameter -check   event.sum
0

treeparameter -version

Returns the version of the tree paramter system. Can be used to determine if the tree paramter software supports the functionality your script required. The version is returned in the form major.minor

Top

SpecTcl Home  General Information User Guide Programmer's Guide Obtaining and Installing


Ron Fox
Last modified: Thu Sep 22 13:51:15 EDT 2005