ECAL calibration functions & programs

(phase 5)


This document covers the usage of ECAL calibration programs (which write the Look-Up Table file and download it to Front End Driver boards), and of the ECAL calibration functions: defined in files:

User Interface



NAME SYNOPSIS OPTIONS FILES

NAME LOCATION OF FILES LAST REVISION SYNOPSIS OPTIONS DESCRIPTION
  1. verifies the existence of the FED boards at the specified VME addresses (with bus error trap). In case of error prints a message and continue.
  2. set FED-format header data (FED block length, Record ID, Component ID, FED ID)
  3. set DAC level
  4. download gzipped Look-Up Table file. ecal_init loads this file by forking a gunzip process and putting its output in a pipe to ecal_init stdin. Load time for 6 boards is about 6 seconds (compare with 21 seconds needed toload the file not gzipped).
  5. reset the boards
EXIT VALUE FILES

Application Program Interface


NAME SYNOPSIS ARGUMENTS RETURN VALUE DECRIPTION


NAME

SYNOPSIS ARGUMENTS RETURN VALUE DECRIPTION

NAME SYNOPSIS RETURN VALUE DECRIPTION


Usage

To use the functions a2adc() & adc2e(), you should:


Example

#include <stdio.h>
#include "calib.h"
void main(int argc,char**argv)
{
  cal_t cal_param;
  int ch_value,adc_value;
  float e_value;
  calib_read(&cal_param,"calib.dat");
  for(ch_value=0;ch_value<NCH;ch_value++)
  {
    printf("channel: %d\n",ch_value);
    for(adc_value=0;adc_value<ADC_MAX;adc_value++)
    {
      e_value=adc2e(adc_value,ch_value,&cal_param);
      printf("%i %i %e\n",ch_value,adc_value,e_value);
    }
  }
}


Sample ADC transferring function (e2adc)

  

Sample ADC inverse transferring function (adc2e)

 

Domenico Galli
Thursday July 30, 1998