The 120 Hz information is sent up from online as a single tightly packed bank, S120.
The processor SUNPQSR can be called to unpack this information into two separate types of banks, SCDRQSR and SQSRBPR. To use this processor, just declare PROCESSOR SUNPQSR and then call SUNPQSR(DOIT) to activate the processor.
The SCDRQSR bank contains the Configuration Descriptor Record and then contains a repeat block with pointers to the related Quasi-Static Records. The data is unpacked into an easy to use format. Look at SCDRQSR TEMPLATE to see this format. You can use a simple PEEK SCDRQSR to dump the contents.
The SQSRBPR bank contains the Quasi-Static Record and then contains a repeat block which contains the individual Beam Pulse Records. The Quasi-Static Record data is unpacked into an easy to use format. Look at SQSRBPR TEMPLATE to see this format. The Beam Pulse Record data is kept in tightly packed format because there are so many such records. Do NOT use a PEEK to dump the contents of the entire SQSRBPR bank. The large number of beam pulse records will give you an annoyingly long output. To dump the contents without the repeat block information, use the IDA exec @DUCSSLD:SPEEKQSR.
To dump an individual Beam Pulse Record, you can either examine the contents still packed in hex by using an ordinary peek, PEEK SQSRBPR bank_number block_number, or you can do the following to dump the record in an easy to read format:
From IDA:
To access a single quantity from an SQSRBPR bank from your PREPMORT, insert the following two lines at the end of the declarations:
The dump routine already mentioned, SDMPQSR, works by invoking all of the functions from SBPR120.STATFUNC. Just look at SDMPQSR PREPMORT to see these functions in action.
Two example IDA files that use the 120 Hz data are in PROD SLD. They are heavily commented. They in turn call some additional prepmort routines, but these too have been included in PROD SLD.
BHATIME IDA unpacks one S120 record at a time (before each new S120 record is unpacked, there is a REMOVE SQSRBPR). For each S120 record it then calls a routine SBHATIM PREPMORT which finds BHABHA triggers and histograms various quantities for them. (This job was originally prepared for Terry Schalk).
MATCHTAG IDA unpacks all of the S120 records from an entire run, holding all of the S120 data in memory at the same time (there is no REMOVE SQSRBPR). It then rewinds the tape and for each EVENT record tries to find a matching beam pulse record among the S120 data that was unpacked. If a matching record is found, the triggers are checked to make sure the trigger info in the EVENT record matches the trigger info in the S120 record. (This work was done for Mike Huffer).
If in the future they decide to read out more than the current 8 slots (two words worth of trigger information), one will need to add more words to the SQSRBPR repeat block and recompile SUNPQSR PREPMORT and SDMPQSR PREPMORT.