FMS DB entries for LED and pi0 mass corrections part 2

There were discussions a couple of weeks ago regarding how best to implement our LED correction scheme in the database. The main issue was how to simultaneously access both the ADC values for the current portion of a run ("time-slice") *and* the reference values against which the LED correction is calculated, whilst not creating a lot of duplicate information in the

Dmitry has come up with a scheme that addresses this. Instead of one table, there will now be two. The first will contain LED information in the following structure: 

struct fmsLed {
  float  adc_ln[578]; /* LED ADC value Large North */
  float  err_ln[578]; /* LED uncertainty Large North */
  float  adc_ls[578]; // Large South
  float  err_ls[578];
  float  adc_sn[288]; // Small North
  float  err_sn[288];
  float  adc_ss[288]; // Small South
  float  err_ss[288];
};

Values will be uploaded to the database for each of the ~1 minute time-slices during running (~15,000 records for 2011). A second "fmsLedRef" table will have an identical structure, but will contain the reference LED information. This will be uploaded to the database once, with a timestamp covering the entire running period for a year. In this way the reference information can be easily updated if and when needed, without having to modify the entries for each time-slice - we just upload the values for a new reference run, with a timestamp one second later than the prior entry.

For the pi0 mass corrections a structure with the same layout as the LED table (i.e. seperate arrays for each subdetector:), "fmsPi0", will be created:

struct fmsPi0Mass {
  float  mass_ln[578]; /* Reconstructed pi0 mass Large North */
  float  err_ln[578]; /* Mass uncertainty Large North */
  float  mass_ls[578]; // Large South
  float  err_ls[578];
  float  mass_sn[288]; // Small North
  float  err_sn[288];
  float  mass_ss[288]; // Small South
  float  err_ss[288];
};

For the pi0 mass corrections, the reference value is the pi0 mass, so there is no reference run required.