Up: TPC Testing
Handling MicroDAQ Data
25-May-1999 updates on daqman and rcf:
-
Several bugs in ttm related to byte ordering were fixed.
-
ttm now supports both MicroDAQ data format 1.* and
DAQ data format 2.0.
-
New ped_load, ped_sub and zp .kumacs support
loading pedestals into memory, then subtracting the pedestals or
zero-suppressing the output. Output is still in MiniDAQ format
only, and supports data for only one sector in the .xdf file
output.
Introduction
The MicroDAQ
test system reads out one TPC production-version readout board
(MiniDAQ's Rosie receiver cards are not guaranteed to handle the
higher transfer rate). However, MicroDAQ lacks support for multiple
readout boards, pedestal subtraction and zero suppression, which are
supported by translating
DAQ's Raw Tape Format to the
MiniDAQ-like tables used by the tpm Pad Monitor and analysis codes.
ttm could be extended to handle multiple input and/or output
formats, but only supports MicroDAQ-format input and MiniDAQ-format
output for a single TPC sector now.
There is also a version of the Pad Monitor with a built-in ttm.
Assuming certain
basic requirements are met, the usual procedure is:
- DAQ Raw Tape Format data is written to /data/microdaq/
on daqman.
- Start staf on daqman, do a make trn,
then translate to MiniDAQ format with ttm.
- Use the tpm_old pad monitor to display the data on an
X-windows screen.
MicroDAQ
MicroDAQ instructions are provided by DAQ. The system is not robust,
so MDAQ reboots are not rare. The usual commands are:
- MDAQ> mdaqReset (to reset the mezzanines)
- MDAQ> rstFE (to reset the fiber optic interface)
- MDAQ> setRB i (where i=1,2,3...6)
- MDAQ> maxevents=5 (to stop data taking after five or six events)
- MDAQ> startRun "filename" (to start a run,
writing data to /data/microdaq/filename)
Note 1: Repeat mdaqReset and rstFE until rstFE
returns 0x1.
Note 2: Another reset command is sbMzClearAll (a subset of
mdaqReset, I believe).
The trigger word for either an MDAQ1 or MDAQ2 event is
that loaded into MDAQ1's CSR (Control Status Register). When
taking data with MDAQ1, the CSR is automatically loaded
appropriately; when taking data with MDAQ2, it must be loaded
by hand. The values commonly used now are:
- 0: No trigger; following trigger token is 0
- 4: Trigger 0; physics readout (normal trigger)
- 8: Charge-injection pulser
- C: Config; housekeeping or geometry event
To load the CSR with 4 for pedestal or cosmic data:
m 0x23000002 [cr]
0x23000002 - 0000: 4 [cr]
0x23000004 - 0000: . [cr]
where [cr] is a carriage return and the period "." exits the
memory poking tool.
Start-up
To connect to daqman.star.bnl.gov from another Unix box: enable
the display of X Windows from daqman, then log in to complete
the setup:
% xhost +daqman.star.bnl.gov
daqman.star.bnl.gov being added to access control list
% rlogin -l bossingh daqman.star.bnl.gov
Password: [Ask Roy Bossingham or Fred Bieser]
(daqman) ~ %
(daqman) ~ % setenv DISPLAY Your_Workstation_Name:0.0
(daqman) ~ % cd rdo_test
Running the ttm Translator
There are five example .kumac's on daqman and rcf in
~bossingh/rdo_test/ :
- geo.kumac
translates five 8-bit, black-data geometry events; the
bytedata table gives the number of errors for each channel.
- ped.kumac
translates five 8-bit, black-data pedestal events. The final
requested event will contain calculated pedestal means and widths,
and an evaluation table.
- ped_load.kumac
translates one 8-bit, black-data pedestal event and loads the value
for each pixel into memory for use in subtraction pedestal
subtraction and zero suppression. (When possible, the number of
pedestal events should be increased to 10, at least.)
- ped_sub.kumac
translates five 8-bit, black-data data events (e.g., cosmics, laser,
charge-injection pulser, ground-plane pulser), subtracts the
pre-loaded pedestal, and outputs the difference. It assumes that
the input data is 8-bit linear data limited to 255 (i.e., no
non-linear translation is applied).
- zp.kumac
translates five 8-bit, black-data data events (e.g., cosmics, laser,
charge-injection pulser, ground-plane pulser), subtracts the
pre-loaded pedestal, then zero-suppresses and outputs the
difference. It assumes that the input data is 8-bit linear data
limited to 255 (i.e., no non-linear translation is applied).
The ttm_par parameters are used to
specify options in .kumac's; in general, the user will have to modify
these to achieve his/her goals --- e.g., specifying a sector ID
(instead of taking the first one found) or adjusting thresholds and
other zero-suppression criteria.
NOTE: Entries in the pedestal means and widths tables are
scaled by a factor of eight, allowing +/- 1/16 ADC count precision
with integers; recent tpm's rescale them to plot correctly.
To make ttm and run the ped.kumac example:
(daqman) ~/rdo_test % staf
Workstation type (?=HELP) =1: 0
staf > make trn
staf > exec ped
Enter the input file, such as:
/data/microdaq/fred
Macro : infile ? (=) DAQ_FILE_NAME
Enter the output file, such as
fred.xdf
Macro : outfile ? (=) OUTPUT_FILE_NAME
staf > exit
Running the tpm_old Pad Monitor after ttm translation.
Start the tpm_old V3.3 Pad Monitor as usual, except, for displaying
a translated MicroDAQ file, set the data-table types in the data file
to those in ttm's output before selecting the input source:
(daqman) ~/rdo_test % tpm_old &
In the control window:
- Select Data Tables for a pedestal run:
- Under Select Table Type, unselect ShortData and
select Truncpeds, PedMeans and PedWidths.
- Under Display Table Type, select:
- Truncpeds --- 8-bit event data
- PedMeans --- ped. means on last event
- PedWidths --- ped. widths on last event
- ByteData --- total ped. errors for pad on last event
- OR Select Data Tables for a geometry run:
- Under Select Table Type, unselect ShortData and
select Truncpeds and ByteData.
- Under Display Table Type, select
- Truncpeds --- location ID's
- ByteData --- total errors in event by pad
- Select Input Sources;
under Files, supply the DataFile name and hit CR
(carriage return).
- Unselect Input Sources.
- Click Get Event
- Have fun!!!
More Information
For more information on: