How to make a module configuration file

Example: module 20220281000999 needs a configuration file, and you have already done a StrobeDelay and a (Quick)Trim scan.
As input, 4 files are needed:
  1. maskfile with the channels to be masked (nr of chans, chan nrs)
  2. delayfile with the strobedelays
  3. trimfile with trim range per chip and settings per channel
  4. funcfile with the responsecurve fit parameters, not important so
  5. take any dummy file.

Example files are stored in ~/makeconfig, so please have a look at them to see the format. (The examples are actually for module 20220130000117)
Then, you need to run two programs:
  1. ./makexml
  2. python fixit.py moduleconfig.xml 20220281000999

makexml is the executable of fortran (!) program xmli.f (It needs cernlib...)
It makes a file moduleconfig.xml, which is still imperfect and needs to be "fixed" by the python script. The last argument of the script should be the module number. Output is a module configuration file 20220281000999.xml which should be OK, and ready to be stored in ~/SctRodDaq/installed/config/rods/modules/ etc.
(In order to run python, source DAQ_nikhef.csh first)
The strobedelay and trim information needs to be extracted from StrobeDelay and (Quick)Trim scans respectively. Go to Maaike's SctRodDaq_play directory, and run SummaryExtractor on the data of the appropriate runs.
For the channels to be masked off it is probably best to go to the SCT database, and look for defective channels in tests of the appropriate module (responsecurve tests, and untrimmable channels).

How to mask a given channel

In the module configuration file, each chip has a line
<mask> ..... </mask>
The ..... here decode which channels are masked. 0xffffffff means that all channels are unmasked, i.e. operational. If you have a list of channels you want to mask, make a 'maskfile' as explained above, and run the program ./makemasks The output is a file masks.xml with the appropriate masks corresponding to your maskfile. Paste this into the module configuration xml file, at the appropriate places. (Note that the masks.xml is a 1-to-1 copy of maskfile: make sure maskfile is a list of ALL channels that you want masked!) (makemasks is the executable of masks.f)



Paul de Jong, Dec 2005