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 od_run_iov
0003  *  Requires:  create_od_core.sql
0004  */
0005 
0006 
0007 
0008 CREATE TABLE od_ccs_tr_dat (
0009   iov_id                NUMBER(10),
0010   logic_id              NUMBER(10), -- token ring
0011   ccs_word              integer
0012 );
0013 
0014 ALTER TABLE od_ccs_tr_dat ADD CONSTRAINT od_ccs_tr_dat_pk PRIMARY KEY (iov_id, logic_id);
0015 ALTER TABLE od_ccs_tr_dat ADD CONSTRAINT od_ccs_tr_dat_fk1 FOREIGN KEY (iov_id) REFERENCES od_run_iov (iov_id);
0016 
0017 CREATE TABLE od_ccs_fe_dat (
0018   iov_id                NUMBER(10),
0019   logic_id              NUMBER(10), -- fe
0020   ccs_word              integer
0021 );
0022 
0023 ALTER TABLE od_ccs_fe_dat ADD CONSTRAINT od_ccs_fe_dat_pk PRIMARY KEY (iov_id, logic_id);
0024 ALTER TABLE od_ccs_fe_dat ADD CONSTRAINT od_ccs_fe_dat_fk1 FOREIGN KEY (iov_id) REFERENCES od_run_iov (iov_id);
0025 
0026 
0027 create table od_ccs_hf_dat ( 
0028    iov_id   NUMBER(10),
0029   logic_id              NUMBER(10), 
0030   ccs_log         CLOB
0031 );
0032 
0033 ALTER TABLE od_ccs_hf_dat ADD CONSTRAINT od_ccs_hf_dat_pk PRIMARY KEY (iov_id, logic_id);
0034 ALTER TABLE od_ccs_hf_dat ADD CONSTRAINT od_ccs_hf_dat_fk1 FOREIGN KEY (iov_id) REFERENCES od_run_iov (iov_id);
0035 
0036 CREATE TABLE od_dcc_operation_dat (
0037   iov_id                NUMBER(10),
0038   logic_id              NUMBER(10), -- dcc
0039 operationMode           varchar2(40)
0040 );
0041 
0042 ALTER TABLE od_dcc_operation_dat ADD CONSTRAINT od_dcc_operation_dat_pk PRIMARY KEY (iov_id, logic_id);
0043 ALTER TABLE od_dcc_operation_dat ADD CONSTRAINT od_dcc_operation_dat_fk1 FOREIGN KEY (iov_id) REFERENCES od_run_iov (iov_id);
0044 
0045 CREATE TABLE od_dcc_details_dat (
0046   iov_id                NUMBER(10),
0047   logic_id              NUMBER(10), -- dcc channel
0048   qpll_error            NUMBER(10),
0049   optical_link          NUMBER(10),
0050   data_timeout          NUMBER(10),
0051   dcc_header            NUMBER(10),
0052   event_number          NUMBER(10),
0053   bx_number             NUMBER(10),
0054   even_parity           NUMBER(10),
0055   odd_parity            NUMBER(10),
0056   block_size            NUMBER(10),
0057   almost_full_fifo      NUMBER(10),
0058   full_fifo             NUMBER(10),
0059   forced_full_supp      NUMBER(10)
0060 );
0061 
0062 ALTER TABLE od_dcc_details_dat ADD CONSTRAINT od_dcc_details_dat_pk PRIMARY KEY (iov_id, logic_id);
0063 ALTER TABLE od_dcc_details_dat ADD CONSTRAINT od_dcc_details_dat_fk1 FOREIGN KEY (iov_id) REFERENCES od_run_iov (iov_id);