Calculating EEMC pedestal and status tables
These instructions are for generating EEMC pedestals and status tables from raw ADC distributions extracted from raw DAQ files. A useful overview of the "philosophy" behind the code described below can be found
here. The instructions producing histograms from the raw DAQ files is given
here.
The instructions below are based entirely on code which exists in CVS and not any private directories.
1) Check out the relevant code from the cvs repository to your working directory:
% cvs co StRoot/StEEmcPool/StEEmcDAQ2Ped
% cvs co StRoot/StEEmcPool/StEEmcPedFit
% cvs co StRoot/StEEmcPool/StEEmcStatus
and compile
% cons
2) Copy the necessary macros and scripts to your working directory:
% cp StRoot/StEEmcPool/StEEmcDAQ2Ped/macros/plDAQ2Ped.C ./
% cp StRoot/StEEmcPool/StEEmcPedFit/macros/fitAdc4Ped.C ./
% cp StRoot/StEEmcPool/StEEmcPedFit/macros/procDAQ2Ped.sh ./
% cp StRoot/StEEmcPool/StEEmcStatus/macros/pedStat.C ./
% cp StRoot/StEEmcPool/StEEmcStatus/macros/procPedStat.sh ./
3) Produce 1D ADC histograms for every EEMC channel from the output of the daq reader (described elsewhere) using StEEmcDAQ2Ped and fit these distributions to produce pedestal tables using StEEmcPedFit. The script will run over histogram files for many runs stored in a single directory:
% ./procDAQ2Ped.sh
4) Analyze the ADC distributions for every EEMC channel and determine its status and fail bits (ie. status table info) using StEEmcStatus and write to StatFiles/ directory. The script will loop over all runs which are given in an ascii file (runList) with content like
R13071063
R13071064
Then just execute
% ./procPedStat.sh
5) Produce status tables for DB upload (one for each sector) :
% cd StatFiles/
% ./procErrs.sh
Pedestal and status table files for each sector should now be located in each run's directory in StatFiles/. These are what will be uploaded to the DB.