Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:59

0001 /*
0002  * Create all the data tables referencing lmf_run_iov
0003  * Requires:  create_laser_core.sql
0004  */
0005 
0006 
0007 CREATE TABLE lmf_laser_blue_raw_dat (
0008   iov_id                NUMBER,
0009   logic_id              NUMBER,
0010   apd_peak              BINARY_FLOAT,
0011   apd_err               BINARY_FLOAT
0012 );
0013 
0014 ALTER TABLE lmf_laser_blue_raw_dat ADD CONSTRAINT lmf_laser_blue_raw_dat_pk PRIMARY KEY (iov_id, logic_id);
0015 ALTER TABLE lmf_laser_blue_raw_dat ADD CONSTRAINT lmf_laser_blue_raw_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0016 
0017 CREATE TABLE lmf_matacq_blue_dat (
0018   iov_id                NUMBER,
0019   logic_id              NUMBER,
0020   amplitude             BINARY_FLOAT,
0021   width                 BINARY_FLOAT,
0022   timeoffset            BINARY_FLOAT
0023 );
0024 
0025 ALTER TABLE lmf_matacq_blue_dat ADD CONSTRAINT lmf_matacq_blue_dat_pk PRIMARY KEY (iov_id, logic_id);
0026 ALTER TABLE lmf_matacq_blue_dat ADD CONSTRAINT lmf_matacq_blue_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0027 
0028 CREATE TABLE lmf_matacq_red_dat (
0029   iov_id                NUMBER,
0030   logic_id              NUMBER,
0031   amplitude             BINARY_FLOAT,
0032   width                 BINARY_FLOAT,
0033   timeoffset            BINARY_FLOAT
0034 );
0035                                                                                                        
0036 ALTER TABLE lmf_matacq_red_dat ADD CONSTRAINT lmf_mataq_red_dat_pk PRIMARY KEY (iov_id, logic_id);
0037 ALTER TABLE lmf_matacq_red_dat ADD CONSTRAINT lmf_matacq_red_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0038                                                                                                        
0039 CREATE TABLE lmf_matacq_green_dat (
0040   iov_id                NUMBER,
0041   logic_id              NUMBER,
0042   amplitude             BINARY_FLOAT,
0043   width                 BINARY_FLOAT,
0044   timeoffset            BINARY_FLOAT
0045 );
0046                                                                                                        
0047 ALTER TABLE lmf_matacq_green_dat ADD CONSTRAINT lmf_mataq_green_dat_pk PRIMARY KEY (iov_id, logic_id);
0048 ALTER TABLE lmf_matacq_green_dat ADD CONSTRAINT lmf_matacq_green_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0049                                                                                                        
0050 CREATE TABLE lmf_matacq_ired_dat (
0051   iov_id                NUMBER,
0052   logic_id              NUMBER,
0053   amplitude             BINARY_FLOAT,
0054   width                 BINARY_FLOAT,
0055   timeoffset            BINARY_FLOAT
0056 );
0057                                                                                                        
0058 ALTER TABLE lmf_matacq_ired_dat ADD CONSTRAINT lmf_mataq_ired_dat_pk PRIMARY KEY (iov_id, logic_id);
0059 ALTER TABLE lmf_matacq_ired_dat ADD CONSTRAINT lmf_matacq_ired_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0060                                                                                                        
0061 
0062 
0063 
0064 CREATE TABLE lmf_laser_ired_raw_dat (
0065   iov_id                NUMBER,
0066   logic_id              NUMBER,
0067   apd_peak              BINARY_FLOAT,
0068   apd_err               BINARY_FLOAT
0069 );
0070 
0071 ALTER TABLE lmf_laser_ired_raw_dat ADD CONSTRAINT lmf_laser_ired_raw_dat_pk PRIMARY KEY (iov_id, logic_id);
0072 ALTER TABLE lmf_laser_ired_raw_dat ADD CONSTRAINT lmf_laser_ired_raw_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0073 
0074 
0075 
0076 CREATE TABLE lmf_laser_blue_norm_dat (
0077   iov_id                NUMBER,
0078   logic_id              NUMBER,
0079   apd_over_pnA_mean     BINARY_FLOAT,
0080   apd_over_pnA_rms      BINARY_FLOAT,
0081   apd_over_pnB_mean     BINARY_FLOAT,
0082   apd_over_pnB_rms      BINARY_FLOAT,
0083   apd_over_pn_mean      BINARY_FLOAT,
0084   apd_over_pn_rms       BINARY_FLOAT
0085 );
0086 
0087 ALTER TABLE lmf_laser_blue_norm_dat ADD CONSTRAINT lmf_laser_blue_norm_dat_pk PRIMARY KEY (iov_id, logic_id);
0088 ALTER TABLE lmf_laser_blue_norm_dat ADD CONSTRAINT lmf_laser_blue_norm_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0089 
0090 
0091 
0092 CREATE TABLE lmf_laser_ired_norm_dat (
0093   iov_id                NUMBER,
0094   logic_id              NUMBER,
0095   apd_over_pnA_mean     BINARY_FLOAT,
0096   apd_over_pnA_rms      BINARY_FLOAT,
0097   apd_over_pnB_mean     BINARY_FLOAT,
0098   apd_over_pnB_rms      BINARY_FLOAT,
0099   apd_over_pn_mean      BINARY_FLOAT,
0100   apd_over_pn_rms       BINARY_FLOAT
0101 );
0102 
0103 ALTER TABLE lmf_laser_ired_norm_dat ADD CONSTRAINT lmf_laser_ired_norm_dat_pk PRIMARY KEY (iov_id, logic_id);
0104 ALTER TABLE lmf_laser_ired_norm_dat ADD CONSTRAINT lmf_laser_ired_norm_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0105 
0106 
0107 CREATE TABLE lmf_laser_blue_cor_dat (
0108   iov_id                NUMBER,
0109   logic_id              NUMBER,
0110   apd_over_pnA_mean     BINARY_FLOAT,
0111   apd_over_pnA_rms      BINARY_FLOAT,
0112   apd_over_pnB_mean     BINARY_FLOAT,
0113   apd_over_pnB_rms      BINARY_FLOAT,
0114   apd_over_pn_mean      BINARY_FLOAT,
0115   apd_over_pn_rms       BINARY_FLOAT
0116 );
0117 
0118 ALTER TABLE lmf_laser_blue_cor_dat ADD CONSTRAINT lmf_laser_blue_cor_dat_pk PRIMARY KEY (iov_id, logic_id);
0119 ALTER TABLE lmf_laser_blue_cor_dat ADD CONSTRAINT lmf_laser_blue_cor_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0120 
0121 
0122 
0123 CREATE TABLE lmf_laser_ired_cor_dat (
0124   iov_id                NUMBER,
0125   logic_id              NUMBER,
0126   apd_over_pnA_mean     BINARY_FLOAT,
0127   apd_over_pnA_rms      BINARY_FLOAT,
0128   apd_over_pnB_mean     BINARY_FLOAT,
0129   apd_over_pnB_rms      BINARY_FLOAT,
0130   apd_over_pn_mean      BINARY_FLOAT,
0131   apd_over_pn_rms       BINARY_FLOAT
0132 );
0133 
0134 ALTER TABLE lmf_laser_ired_cor_dat ADD CONSTRAINT lmf_laser_ired_cor_dat_pk PRIMARY KEY (iov_id, logic_id);
0135 ALTER TABLE lmf_laser_ired_cor_dat ADD CONSTRAINT lmf_laser_ired_cor_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0136 
0137 CREATE TABLE lmf_laser_blue_time_dat (
0138   iov_id                NUMBER,
0139   logic_id              NUMBER,
0140   offset                BINARY_FLOAT
0141 );
0142 
0143 ALTER TABLE lmf_laser_blue_time_dat ADD CONSTRAINT lmf_laser_blue_time_dat_pk PRIMARY KEY (iov_id, logic_id);
0144 ALTER TABLE lmf_laser_blue_time_dat ADD CONSTRAINT lmf_laser_blue_time_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0145 
0146 CREATE TABLE lmf_laser_ired_time_dat (
0147   iov_id                NUMBER,
0148   logic_id              NUMBER,
0149   offset                BINARY_FLOAT
0150 );
0151 
0152 ALTER TABLE lmf_laser_ired_time_dat ADD CONSTRAINT lmf_laser_ired_dat_pk PRIMARY KEY (iov_id, logic_id);
0153 ALTER TABLE lmf_laser_ired_time_dat ADD CONSTRAINT lmf_laser_ired_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0154 
0155 
0156 
0157 CREATE TABLE lmf_laser_blue_coeff_dat (
0158   iov_id                NUMBER,
0159   logic_id              NUMBER,
0160   xport_coeff           BINARY_FLOAT,
0161   xport_coeff_rms       BINARY_FLOAT
0162 );
0163 
0164 ALTER TABLE lmf_laser_blue_coeff_dat ADD CONSTRAINT lmf_laser_blue_coeff_dat_pk PRIMARY KEY (iov_id, logic_id);
0165 ALTER TABLE lmf_laser_blue_coeff_dat ADD CONSTRAINT lmf_laser_blue_coeff_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0166 
0167 
0168 
0169 CREATE TABLE lmf_laser_ired_coeff_dat (
0170   iov_id                NUMBER,
0171   logic_id              NUMBER,
0172   xport_coeff           BINARY_FLOAT,
0173   xport_coeff_rms       BINARY_FLOAT
0174 );
0175 
0176 ALTER TABLE lmf_laser_ired_coeff_dat ADD CONSTRAINT lmf_laser_ired_coeff_dat_pk PRIMARY KEY (iov_id, logic_id);
0177 ALTER TABLE lmf_laser_ired_coeff_dat ADD CONSTRAINT lmf_laser_ired_coeff_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0178 
0179 
0180 
0181 CREATE TABLE lmf_laser_blue_shape_dat (
0182   iov_id                NUMBER,
0183   logic_id              NUMBER,
0184   alpha                 BINARY_FLOAT,
0185   alpha_rms             BINARY_FLOAT, 
0186   beta                  BINARY_FLOAT,
0187   beta_rms              BINARY_FLOAT
0188 );
0189 
0190 ALTER TABLE lmf_laser_blue_shape_dat ADD CONSTRAINT lmf_laser_blue_shape_dat_pk PRIMARY KEY (iov_id, logic_id);
0191 ALTER TABLE lmf_laser_blue_shape_dat ADD CONSTRAINT lmf_laser_blue_shape_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0192 
0193 
0194 
0195 CREATE TABLE lmf_laser_ired_shape_dat (
0196   iov_id                NUMBER,
0197   logic_id              NUMBER,
0198   alpha                 BINARY_FLOAT,
0199   alpha_rms             BINARY_FLOAT, 
0200   beta                  BINARY_FLOAT,
0201   beta_rms              BINARY_FLOAT
0202 );
0203 
0204 ALTER TABLE lmf_laser_ired_shape_dat ADD CONSTRAINT lmf_laser_ired_shape_dat_pk PRIMARY KEY (iov_id, logic_id);
0205 ALTER TABLE lmf_laser_ired_shape_dat ADD CONSTRAINT lmf_laser_ired_shape_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0206 
0207 
0208 
0209 CREATE TABLE lmf_pn_blue_dat (
0210   iov_id                NUMBER,
0211   logic_id              NUMBER,
0212   pn_peak               BINARY_FLOAT,
0213   pn_err                BINARY_FLOAT
0214 );
0215 
0216 ALTER TABLE lmf_pn_blue_dat ADD CONSTRAINT lmf_pn_blue_dat_pk PRIMARY KEY (iov_id, logic_id);
0217 ALTER TABLE lmf_pn_blue_dat ADD CONSTRAINT lmf_pn_blue_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0218 
0219 
0220 
0221 CREATE TABLE lmf_pn_ired_dat (
0222   iov_id                NUMBER,
0223   logic_id              NUMBER,
0224   pn_peak               BINARY_FLOAT,
0225   pn_err                BINARY_FLOAT
0226 );
0227 
0228 ALTER TABLE lmf_pn_ired_dat ADD CONSTRAINT lmf_pn_ired_dat_pk PRIMARY KEY (iov_id, logic_id);
0229 ALTER TABLE lmf_pn_ired_dat ADD CONSTRAINT lmf_pn_ired_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0230 
0231 
0232 
0233 CREATE TABLE lmf_pn_test_pulse_dat (
0234   iov_id                NUMBER,
0235   logic_id              NUMBER,
0236   adc_mean              BINARY_FLOAT,
0237   adc_rms               BINARY_FLOAT
0238 );
0239 
0240 ALTER TABLE lmf_pn_test_pulse_dat ADD CONSTRAINT lmf_pn_test_pulse_dat_pk PRIMARY KEY (iov_id, logic_id);
0241 ALTER TABLE lmf_pn_test_pulse_dat ADD CONSTRAINT lmf_pn_test_pulse_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);
0242 
0243 
0244 
0245 CREATE TABLE lmf_pn_config_dat (
0246   iov_id                NUMBER,
0247   logic_id              NUMBER,
0248   pna_id                NUMBER,
0249   pnb_id                NUMBER,
0250   pna_validity          CHAR(1),
0251   pnb_validity          CHAR(1),
0252   pnmean_validity       CHAR(1)
0253 );
0254 
0255 ALTER TABLE lmf_pn_config_dat ADD CONSTRAINT lmf_pn_config_dat_pk PRIMARY KEY (iov_id, logic_id);
0256 ALTER TABLE lmf_pn_config_dat ADD CONSTRAINT lmf_pn_config_dat_fk FOREIGN KEY (iov_id) REFERENCES lmf_run_iov (iov_id);