TOF online database

1, a) We need to record the changes of all parameters during the whole run, if the TOF calibration parameters take change we will write them to database. b) It will be happend three to five times during whole run.

2, We have 4 IDL files as following:

1), toftotCalib.idl
/*toftotCalib.idl
*
*Table: toftotCalib
*
*description: // TOF tot calibration parameters
*
*/

struct toftotCalib{
float tot[61];/*tot */
float totcorr[61];/*tot correction*/
};//TOF tray ID 1-120 board ID 1-8

2), tofzCalib.idl:
/*tofzCalib.idl
*
*Table: tofzCalib
*
*description: // TOF z calibration parameters
*
*/

struct tofzCalib{
float z[11];/*hit position z */
float zcorr[11];/*z correction*/
};/*TOF tray ID 1-120 board ID 1-8*/

3), toft0Calib
/*toft0Calib.idl
*
*Table: toft0Calib
*
*description: // TOF t0 calibration parameters
*
*/

struct toft0Calib{
float t0corr[23040];/*TOF t0 correction */
};//trayid(TOF tray ID 1-120)* moduleid(TOF module ID 1-32)*cellid(TOF cell ID 1-6)

4), pvpdCalib.idl
/*pvpdCalib.idl
*
*Table: pvpdCalib
*
*description: // pvpd tot calibration parameters
*
*/

struct pvpdCalib{
float tot[61];/*tot*/
float totcorr[61];/*tot correction*/
};//channelid: /*west 1-19, east 20-38*/

3, There are 3 indexed table: toftotCalib[960], tofzCalib[960], pvpdCalib[38]. 960=tray*board=120*8, 38 is west channel+east channel.

4, Detail size of each struct:

sizeof(toft0Calib_st) = 8
sizeof(toftotCalib_st) = 484
sizeof(tofzCalib_st) = 84
sizeof(pvpdCalib_st) = 484

The total size we write to the database of each entry will be: 8*120*32*4(toft0Calib)+484*120*8(toftotCalib)+84*120*8(tofzCalib)+480*38(pvpdCalib)=655,680 bytes.

During whole run, them will be written no more than 5 times. Each time we have 1 + 120*8 + 120*8 + 38 = 1959 entries.

5, Bingchu Huang will be going to insert data into those tables.  RCF Login name is "huangbc".