THE DAQ COMPONENTS

MHTDC Frontend

The MHTDC frontend is operated in polled mode. A polling success is generated by hardware and indicates the current time segment (i.e. current data segment) has finished. The MHTDC frontend serves two purposes. Firstly it coordinates reading of common time segments from the WFDs and the CAENs with the magic box. Secondly it reads the data from the fifo memory of the CAEN mhtdc(s).

The readout of CAEN mhtdc data is performed by CAENloopread() and read_CAEN_event(). Because the CAEN's memory is only 32K words, and insufficient to store an entire 5-50 ms segment of beam counter data, the CAEN data is readout in fragments. During the accumulation of the time segment the CAEN data is readout by CAENloopread(). This function is called for every loop of the Midas scheduler via the function frontend_loop() [for this "continuous" readout the frontend runs with frontend_loop = true]. On time segment completion a final read is performed by read_CAEN_event(), and the entire data for the time segment is then copied into a MIDAS databank.

For each CAEN mhtdc there's an ODB entry in a sub-directory "Settings/CAEN01" that contains operating parameters. The "enabled" bit switches the CAEN's readout on/off, the "loop enabled" float switches the CAEN's loop readout on/off, and the entries "inputA 00to15" through "inputD 16to31" contain the bits to switch the individual channels on/off. The "address" parameter is the VME address of the CAEN module and the "block size" parameter is the number of 32-bit words per fifo read. It's advisable to adjust the "block size" for the data rate.

The CAEN frontend is run either from the programs page on the Midas web interface or from the frontend processor by typing ./femhtdc -h be01 -e mulan from the sub-directory /home/mulan/muLan/Mhtdc.