Data Acquisition parameters -- Cluster of configuration parameters for data acquisition


package require DAQParameters










This package provides a cluster of configuration parameters (in the sense of Configuration). Mechanisms to set default values for these parameters are provided as well as convenience functions to fetch specific configuration values without the need to know the actual configuration variable name.

See PROCEDURES below for a description of each command supplied by this package.



Sets default values for each configuration value in this cluster. See DEFAULT VALUES for information about the default values for these parameters.


Applies the environment variables that normally control this part of the configuration to the parameters. See ENVIRONMENT below for more information about the the environment variables used.


Returns the command that will be used to start the event logger. This is a base command string without any options. At run time the full command string is computed from this value and the other parameters in this cluster.


Returns the URI of the ring buffer from which the event logger will log data.


Get the value of the flag that controls whether or not the event logger is started out with the --number-of-sources option on the command line. If this value is true the flag value will be computed from the number of data sources and the value returned by ::DAQParameters::getAdditionalSourceCount command and supplied on the command line. If the value returned from this command is false this option will not be used. Note that this option cannot be used with event loggers from NSCLDAQ earlier than version 11.0.


Gets the number of additional sources to add to the number of data sources that will be supplied to the --number-of-sources eventlog flag. The purpose of that flag is to tell the event logger how many end run events to expect before considering a run over.

This value is meaningless when ::DAQParameters::getUseNsrcsFlag returns false beause in that case, the --number-of-sources option will not be added to the command line.

The dual purpose of this option is to deal with event sources that are not controlled by the ReadoutGUI that contribute end run records (positive value for the parameter), and to handle event sources that are controlled by the ReadoutGUI that don't supply end run records (negative value).


When true, the event logger is started with the --run flag which is given the value of the run number in the ReadoutGUI. This is intended for cases when the event logger is used with data sources that don't contribute start of run event records, or contribute start of run records with run number fields that cannot be trusted.


When true, the event logger is started with the --checksum flag. If the event logger is incompatible with this option (version must be greater than 11.0-rc6), the user will be presented with an error message.


The call to ::DAQParameters::setDefaults sets the values of the configuration variables as follows:

Event logger command

DAQROOT/bin/eventlog where DAQROOT is the top level installation difectory of NSCLDAQ.

Event logger ring URI

tcp://localhost//$::tcl_platform(user) Note that the Tcl global array ::tcl_platform's user element contains the name of the logged in user.

Use --number-of-sources


Additional data sources


Use --run run number override


Use --checksum


These defaults are suitable for the case of a single event source compatible with NSCLDAQ-11.x


Invoking ::DAQParameters::environmentOverrides looks for the following environment variables:


Overrides the default event logger program with its value.


Overrides the event logger ringbuffer URI.


If true then --number-of-sources will be used with the eventlog program.


If provided contains an additional source count for use when computing the value of --number-of-sources


If true the --run option will be used to override run numbers in begin run records or, alternatively provide run numbers where none are avaialble.


If true the --checksum option will be used to compute an sha512 hash for the entirety of the logged data.