Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As with the number of SCAs, if each channel is going to be using the same limits a detChan of “-1” should be used. The individual SCA limits are set using xiaSetAcquisitionValues() with the name parameter set to “sca[n]_[lo|hi]”, where n is the SCA to set the limit for (starting from 0) and lo/hi indicates if the low or high limit is being set. For example, to set the lower limit for SCA 3, the string “sca3_lo” should be passed to xiaSetAcquisitionValues(). See Notes See Notes for some suggestions on how to reduce the number of calls to xiaSetAcquisitionValues() when setting the limits on SCAs.

...

Once all of the SCA limits are defined, the next step is to acquire some data and read out the SCAs. In the standard firmware, the SCA totals are stored in the SCA data buffer as two 16-bit words per SCA. Handel provides the routine xiaGetRunDataroutine xiaGetRunData() to read out the SCA buffer. xiaGetRunData xiaGetRunData() takes 3 arguments: the detChan, the name of the data type to read out and the data buffer to read the data into. The data buffer needs to have its memory allocated prior to calling xiaGetRunDatacalling xiaGetRunData(). However, if the number of SCAs is known at compile time it is sufficient to declare the SCA data buffer as a fixed-size array (see below for an example of this technique).

...