Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:15

0001 REM
0002 REM Table CROSSTALK
0003 REM
0004 create table CROSSTALK (
0005 record_id         number NOT NULL,
0006 run_num           number UNIQUE NOT NULL,
0007 data_taking_time  date DEFAULT sysdate NOT NULL,
0008 insertion_time    date DEFAULT sysdate NOT NULL);
0009 REM
0010 REM Adding constraints for table CROSSTALK
0011 REM
0012 alter table CROSSTALK
0013   add constraint xtalk_run_pk primary key (record_id);
0014 
0015 REM
0016 REM Table CROSSTALK_MAP
0017 REM
0018 create table CROSSTALK_MAP (
0019 map_id      number NOT NULL,
0020 record_id   number NOT NULL,
0021 map_index   number NOT NULL,
0022 layer_id    number NOT NULL);
0023 REM
0024 REM Adding constraints for table CROSSTALK_MAP
0025 REM
0026 alter table CROSSTALK_MAP add (
0027    constraint xtalk_map_pk primary key (map_id),
0028    unique (record_id,map_index),
0029    unique (record_id,layer_id),
0030    constraint xtalk_map_fk foreign key (record_id)
0031                           references crosstalk(record_id));
0032 
0033 REM
0034 REM Table CROSSTALK_DATA
0035 REM
0036 create table CROSSTALK_DATA (
0037 map_id         number NOT NULL,
0038 vec_index      number(5) NOT NULL,
0039 xtalk_slope_right     number(15,10) NOT NULL,
0040 xtalk_intercept_right number(15,9) NOT NULL,
0041 xtalk_chi2_right      number(15,6) NOT NULL,
0042 xtalk_slope_left      number(15,10) NOT NULL,
0043 xtalk_intercept_left  number(15,9) NOT NULL,
0044 xtalk_chi2_left       number(15,6) NOT NULL);
0045 REM
0046 REM Adding constraints for table CROSSTALK_DATA
0047 REM
0048 alter table CROSSTALK_DATA add (
0049    constraint xtalk_data_pk primary key (map_id,vec_index),
0050    constraint xtalk_data_fk foreign key (map_id)
0051                           references crosstalk_map(map_id));