Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:55

0001 /*
0002  *  Creates all the data tables referencing dcu_iov
0003  *  Requires:  create_dcu_core.sql
0004  */
0005 
0006 
0007 
0008 
0009 CREATE TABLE DCU_CAPSULE_TEMP_DAT (
0010   iov_id                NUMBER(10),
0011   logic_id              NUMBER(10), -- capsule (crystal)
0012   capsule_temp          BINARY_FLOAT
0013 );
0014  
0015 ALTER TABLE DCU_CAPSULE_TEMP_DAT ADD CONSTRAINT DCU_CAPSULE_TEMP_pk PRIMARY KEY (iov_id, logic_id);
0016 ALTER TABLE DCU_CAPSULE_TEMP_DAT ADD CONSTRAINT DCU_CAPSULE_TEMP_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0017 
0018 
0019 
0020 CREATE TABLE DCU_CAPSULE_TEMP_RAW_DAT (
0021   iov_id                NUMBER(10),
0022   logic_id              NUMBER(10), -- capsule (crystal)
0023   capsule_temp_adc      BINARY_FLOAT,
0024   capsule_temp_rms      BINARY_FLOAT
0025 );
0026  
0027 ALTER TABLE DCU_CAPSULE_TEMP_RAW_DAT ADD CONSTRAINT DCU_CAPSULE_TEMP_RAW_pk PRIMARY KEY (iov_id, logic_id);
0028 ALTER TABLE DCU_CAPSULE_TEMP_RAW_DAT ADD CONSTRAINT DCU_CAPSULE_TEMP_RAW_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0029 
0030 
0031  
0032 CREATE TABLE DCU_IDARK_DAT (
0033   iov_id                NUMBER(10),
0034   logic_id              NUMBER(10),  -- crystal
0035   apd_idark             BINARY_FLOAT
0036 );
0037  
0038 ALTER TABLE DCU_IDARK_DAT ADD CONSTRAINT DCU_IDARK_pk PRIMARY KEY (iov_id, logic_id);
0039 ALTER TABLE DCU_IDARK_DAT ADD CONSTRAINT DCU_IDARK_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0040 
0041 
0042 
0043 CREATE TABLE DCU_IDARK_PED_DAT (
0044   iov_id                NUMBER(10),
0045   logic_id              NUMBER(10),  -- crystal
0046   ped                   BINARY_FLOAT
0047 );
0048  
0049 ALTER TABLE DCU_IDARK_PED_DAT ADD CONSTRAINT DCU_IDARK_PED_pk PRIMARY KEY (iov_id, logic_id);
0050 ALTER TABLE DCU_IDARK_PED_DAT ADD CONSTRAINT DCU_IDARK_PED_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0051 
0052 
0053 
0054 CREATE TABLE DCU_VFE_TEMP_DAT (
0055   iov_id                NUMBER(10),
0056   logic_id              NUMBER(10),  -- VFE card
0057   vfe_temp              BINARY_FLOAT
0058 );
0059  
0060 ALTER TABLE DCU_VFE_TEMP_DAT ADD CONSTRAINT DCU_VFE_TEMP_pk PRIMARY KEY (iov_id, logic_id);
0061 ALTER TABLE DCU_VFE_TEMP_DAT ADD CONSTRAINT DCU_VFE_TEMP_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0062 
0063 
0064 
0065 CREATE TABLE DCU_LVR_TEMPS_DAT (
0066   iov_id                NUMBER(10),
0067   logic_id              NUMBER(10), -- TT
0068   t1                    BINARY_FLOAT,
0069   t2                    BINARY_FLOAT,
0070   t3                    BINARY_FLOAT
0071 );
0072  
0073 ALTER TABLE  DCU_LVR_TEMPS_DAT ADD CONSTRAINT DCU_LVR_TEMPS_pk PRIMARY KEY (iov_id, logic_id);
0074 ALTER TABLE  DCU_LVR_TEMPS_DAT ADD CONSTRAINT DCU_LVR_TEMPS_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0075 
0076 
0077 
0078 CREATE TABLE DCU_LVRB_TEMPS_DAT (
0079   iov_id                NUMBER(10),
0080   logic_id              NUMBER(10),  -- TT
0081   t1                    BINARY_FLOAT,
0082   t2                    BINARY_FLOAT,
0083   t3                    BINARY_FLOAT
0084 );
0085  
0086 ALTER TABLE  DCU_LVRB_TEMPS_DAT ADD CONSTRAINT DCU_LVRB_TEMPS_pk PRIMARY KEY (iov_id, logic_id);
0087 ALTER TABLE  DCU_LVRB_TEMPS_DAT ADD CONSTRAINT DCU_LVRB_TEMPS_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0088 
0089 
0090 
0091 
0092 CREATE TABLE DCU_LVR_VOLTAGES_DAT (
0093   iov_id                NUMBER(10),
0094   logic_id              NUMBER(10), -- TT
0095   VFE1_A                BINARY_FLOAT,
0096   VFE2_A                BINARY_FLOAT,
0097   VFE3_A                BINARY_FLOAT,
0098   VFE4_A                BINARY_FLOAT,
0099   VFE5_A                BINARY_FLOAT,
0100   VCC                   BINARY_FLOAT,
0101   VFE4_5_D              BINARY_FLOAT,
0102   VFE1_2_3_D            BINARY_FLOAT,
0103   BUFFER                BINARY_FLOAT,
0104   FENIX                 BINARY_FLOAT,
0105   V43_A                 BINARY_FLOAT,
0106   OCM                   BINARY_FLOAT,
0107   GOH                   BINARY_FLOAT,
0108   INH                   BINARY_FLOAT,
0109   V43_D                 BINARY_FLOAT
0110 );
0111  
0112 ALTER TABLE  DCU_LVR_VOLTAGES_DAT ADD CONSTRAINT DCU_LVR_VOLTAGES_pk PRIMARY KEY (iov_id, logic_id);
0113 ALTER TABLE  DCU_LVR_VOLTAGES_DAT ADD CONSTRAINT DCU_LVR_VOLTAGES_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0114 
0115 CREATE TABLE DCU_CCS_DAT (
0116   iov_id                NUMBER(10),
0117   logic_id              NUMBER(10), -- TT
0118   M1_VDD1               BINARY_FLOAT,
0119   M2_VDD1               BINARY_FLOAT,
0120   M1_VDD2               BINARY_FLOAT,
0121   M2_VDD2               BINARY_FLOAT,
0122   M1_Vinj               BINARY_FLOAT,
0123   M2_Vinj               BINARY_FLOAT,
0124   M1_VCC                BINARY_FLOAT,
0125   M2_VCC                BINARY_FLOAT,
0126   M1_DCUTemp            BINARY_FLOAT,
0127   M2_DCUTemp            BINARY_FLOAT,
0128   CCSTempLow            BINARY_FLOAT,  
0129   CCSTempHigh           BINARY_FLOAT
0130 );
0131 
0132 ALTER TABLE  DCU_CCS_DAT ADD CONSTRAINT DCU_CCS_pk PRIMARY KEY (iov_id, logic_id);
0133 ALTER TABLE  DCU_CCS_DAT ADD CONSTRAINT DCU_CCS_fk FOREIGN KEY (iov_id) REFERENCES dcu_iov (iov_id);
0134 
0135