Midas Data Analyzer

The Midas analyzer is structured in stages via successive calls to analyzer modules. Typically the earlier stages do various calibrations and make derived data banks from raw data banks and the later stages do histogramming etc. on the derived data.

The analyzer management is performed by analyzer.cpp. It contains a structure (ANALYZERREQUEST) that specifies the data types for data analysis, either analyze all (GETALL) or analyze some (GETSOME), and names of structures that contain the list of analysis modules.

The analysis modules are themselves called in the order specified in the module list (switches in the "Module sub-directory" of the analyzer ODB can turn on/off the individual modules). Each analyzer contains a structure (ANAMODULE) that declares the module name, and functions that service an event, BOR, EOR, init, exit (i.e. functions called on module start/stop, run start/stop, and every event).

In make_wfd the beam counter data from FE0T is written into a single derived databank BEAM. Using the discriminator bits the input number of the WFD is also derived. In make_caen the tile counter data from CA01-CA04 is into a single derived databank TILE. The routine derives the tile identifier (using an ODB wiring map) and time-order the data (using the qsort() function). A sample histogramming package using fred Gray's µQL query language is also available.

The analyzer is located in the sub-directory /home/mulan/muLan/Analyzer/MqlAnalyzer/work . To run the analyzer type "./mu -i inputfile.mid -o outputfile.root -e mulan". The analyzer modules make_caen.cpp, make_wfd.cpp and wfd.mql are located in /home/mulan/muLan/Analyzer/src .

To activate or deactivate the various modules for different analyses one sets the corresponding switches in the "Analyzer/Module switches" sub-directory in the Analyzer ODB entry.