-- adding data for the setup of the barrel in the database.
-- dd Aug 11, 2000, by fblekman@fnal.gov
-- Last edited August 24th, by Freya Blekman (corrected EPICS_NAMES for VRB and SEQ. Added Bundle numbers for HDI's)


-- for the implementation of the barrel in the database the following things have to be changed:
-- the sequencer, interface boards and vrb numbers will just continue counting where they stopped at the 10% test.
-- this means the outer barrel will be read out by sequencers, vrbs and ibs 4 to 6

-- already defined:
-- table SMT_VRB_CRATE, with in it: crate 63 with epics name d0olsmt01
-- table SMR_DAQ_VRBC, with in it: VRBC-6314 (second 2 digit number is crate position, I believe)
-- table SMT_DAQ_SEQC, with in it: the SEQC-6301
-- table SMT_DAQ-VBD, with in it the VBD-6304
-- table SMT_DAQ_SVX, is filled with python script.(smt_add_barrel.py)
-- table SMT_DAQ_HDI, is filled with python script (smt_add_barrel.py)
-- I follow the order of Juan-Carlos' excel table for the outer barrel (corrected version by Aurelio, 

----------------------------------------------------------------------------------------------------

-- table SMT_VRB_CRATE

insert into SMT_VRB_CRATE
       (CRATE_SERIAL_NO, CRATE_ID, DESCRIPTION, EPICS_NAME, CONTROLLER_NAME, CONTROLLER_TYPE,HOST_NAME, STATUS)
       values
       ('SMT-VRBCR-63', 63, 'VRB_CRATE-10PER', 'D0OLCTL40', 'd0olctl40', 'mv2300', 'sdfsg7', 'test');

-- table SMT_SEQ_CRATE

insert into SMT_SEQ_CRATE
       (CRATE_SERIAL_NO, CRATE_ID, DESCRIPTION, STATUS)
       values
       ('SEQCR-63', 63, 'SEQ_CRATE-10PER', 'test');

-- table SMT_INT_CRATE

insert into SMT_INTERFACE_CRATE
       (CRATE_SERIAL_NO, CRATE_ID, DESCRIPTION, STATUS)
       values
       ('INTCR-63', 63, 'INT_CRATE-10PER', 'test');


insert into SMT_DAQ_VRBC
       (VRBC_SERIAL_NO, VRBC_ID, DESCRIPTION, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, STATUS)
       values
       ('VRBC-63', 63, 'VRBC-10PER', 'SMT-VRBCR-63', 14, 'SMT_VRBC_6314', 'test');

-- table SMT_DAQ_SEQC
--insert into SMT_DAQ_SEQC
--	  (SEQC_SERIAL_NO, SEQC_ID, DESCRIPTION, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, STATUS)
-- 	  values
-- 	  ('SEQC-63', 63, 'SEQC-10PER', 'SEQCR-63', 1, 'SMT_SEQC_6301', 'test');


-- table SMT_DAQ_VBD

insert into SMT_DAQ_VBD
       (VBD_SERIAL_NO, VBD_ID, DESCRIPTION, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, STATUS)
       values
       ('VBD-63', 63, 'VBD-10PER', 'SMT-VRBCR-63', 4, 'SMT_VBD_6304', 'test');




-- adding interface connections, editing table SMT_DAQ_INTERFACE:

insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6301', 1, 'INT-10PER-BARREL-6301', 1, 'INTCR-63', 
	16, 'SMT_IB_6301', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6302', 2, 'INT-10PER-BARREL-6302', 1, 'INTCR-63', 13, 'SMT_IB_6302', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6303', 3, 'INT-10PER-BARREL-6303', 1, 'INTCR-63', 10, 'SMT_IB_6303', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6304', 4, 'INT-10PER-BARREL-6304', 1, 'INTCR-63', 15, 'SMT_IB_6304', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6305', 5, 'INT-10PER-BARREL-6305', 1, 'INTCR-63', 12, 'SMT_IB_6305', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6306', 6, 'INT-10PER-BARREL-6306', 1, 'INTCR-63', 9, 'SMT_IB_6306', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6307', 7, 'INT-10PER-BARREL-6307', 1, 'INTCR-63', 7, 'SMT_IB_6307', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6308', 8, 'INT-10PER-BARREL-6308', 1, 'INTCR-63', 4, 'SMT_IB_6308', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6309', 9, 'INT-10PER-BARREL-6309', 1, 'INTCR-63', 1, 'SMT_IB_6309', 'test');


----For F-disk---------
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6310', 10, 'INT-10PER-FDISK-6310', 1, 'INTCR-63', 1, 'SMT_IB_630A', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6311', 11, 'INT-10PER-FDISK-6311', 1, 'INTCR-63', 1, 'SMT_IB_630B', 'test');
insert into SMT_DAQ_INTERFACE
	(INTERFACE_SERIAL_NO, INTERFACE_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO,LOCATOR, EPICS_NAME, STATUS)
	values
	('INT-6312', 12, 'INT-10PER-FDISK-6312', 1, 'INTCR-63', 1, 'SMT_IB_630C', 'test');


-- now the interface channels
----------------------------------------------------------------------------------
-- table SMT_DAQ_INTERFACE_CHANNEL

insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6301', 1, '2-01', '2-02');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6301', 2, '2-03', '2-04');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6301', 3, '2-05', '2-06');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6301', 4, '2-07', '2-08');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6302', 1, '2-09', '2-10');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6302', 2, '2-11', '2-12');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6302', 3, '4-01', '4-02');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6302', 4, '4-03', '4-04');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6303', 1, '4-05', '4-06');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6303', 2, '4-07', '4-08');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6303', 3, '4-09', '4-10');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6303', 4, '4-11', '4-12');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6304', 1, '4-13', '4-14');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6304', 2, '4-15', '4-16');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6304', 3, '4-17', '4-18');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6304', 4, '4-19', '4-20');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6305', 1, '4-21', '4-22');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6305', 2, '4-23', '4-24');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6305', 3, '1-01', '1-02');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6305', 4, '1-03', '1-04');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6306', 1, '1-05', '1-06');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6306', 2, '1-07', '1-08');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6306', 3, '1-09', '1-10');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6306', 4, '1-11', '1-12');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6307', 1, '3-01', '3-02');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6307', 2, '3-03', '3-04');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6307', 3, '3-05', '3-06');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6307', 4, '3-07', '3-08');



insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6308', 1, '3-09', '3-10');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6308', 2, '3-11', '3-12');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6308', 3, '3-13', '3-14');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6308', 4, '3-15', '3-16');


insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6309', 1, '3-17', '3-18');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6309', 2, '3-19', '3-20');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6309', 3, '3-21', '3-22');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6309', 4, '3-23', '3-24');

----For F-disk---------
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6310', 1, 'F-01', 'F-03');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6310', 2, 'F-05', 'F-07');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6310', 3, 'F-09', 'F-11');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6310', 4, 'F-13', 'F-15');

insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6311', 1, 'F-02', 'F-04');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6311', 2, 'F-06', 'F-08');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6311', 3, 'F-10', 'F-12');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6311', 4, 'F-14', 'F-16');

insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6312', 1, 'F-17', 'F-19');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6312', 2, 'F-21', 'F-23');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6312', 3, 'F-18', 'F-20');
insert into SMT_DAQ_INTERFACE_CHANNEL
       (INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID, HDI_SERIAL_NO_A, HDI_SERIAL_NO_B)
       values
       ('INT-6312', 4, 'F-22', 'F-24');



-- adding sequencers
-----------------------------------------------------------------------------
-- table SMT_DAQ_SEQ

insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6302', 'SEQ-10PER-1', 1, 'SEQCR-63', 1, 'SMT_SEQ_6302', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6303', 'SEQ-10PER-2', 1, 'SEQCR-63', 2, 'SMT_SEQ_6303', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6304', 'SEQ-10PER-3', 1, 'SEQCR-63', 3, 'SMT_SEQ_6304', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6305', 'SEQ-10PER-4', 1, 'SEQCR-63', 4, 'SMT_SEQ_6305', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6306', 'SEQ-10PER-5', 1, 'SEQCR-63', 5, 'SMT_SEQ_6306', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6307', 'SEQ-10PER-6', 1, 'SEQCR-63', 6, 'SMT_SEQ_6307', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6308', 'SEQ-10PER-7', 1, 'SEQCR-63', 7, 'SMT_SEQ_6308', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6309', 'SEQ-10PER-8', 1, 'SEQCR-63', 8, 'SMT_SEQ_6309', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6310', 'SEQ-10PER-9', 1, 'SEQCR-63', 9, 'SMT_SEQ_630A', 48, 'test');


----For F-disk---------
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6311', 'SEQ-10PER-10', 1, 'SEQCR-63', 10, 'SMT_SEQ_630B', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6312', 'SEQ-10PER-11', 1, 'SEQCR-63', 11, 'SMT_SEQ_630C', 48, 'test');
insert into SMT_DAQ_SEQ
       (SEQ_SERIAL_NO, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR,
	EPICS_NAME, CROSSING_WIDTH, STATUS)
        values
       ('SEQ-6313', 'SEQ-10PER-12', 1, 'SEQCR-63', 12, 'SMT_SEQ_630D', 48, 'test');


--------------------------------------------------------------------------------
-- table SMT_DAQ_SEQHALF

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6302', 'A', 48, 'SEQ-10PER-1 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6302', 'B', 48, 'SEQ-10PER-1 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6303', 'A', 49, 'SEQ-10PER-2 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6303', 'B', 49, 'SEQ-10PER-2 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6304', 'A', 50, 'SEQ-10PER-3 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6304', 'B', 50, 'SEQ-10PER-3 B', 15, 15, 'test');


insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6305', 'A', 51, 'SEQ-10PER-4 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6305', 'B', 51, 'SEQ-10PER-4 B', 15, 15, 'test');


insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6306', 'A', 52, 'SEQ-10PER-5 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6306', 'B', 52, 'SEQ-10PER-5 B', 15, 15, 'test');


insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6307', 'A', 53, 'SEQ-10PER-6 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6307', 'B', 53, 'SEQ-10PER-6 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6308', 'A', 54, 'SEQ-10PER-7 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6308', 'B', 54, 'SEQ-10PER-7 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6309', 'A', 55, 'SEQ-10PER-8 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6309', 'B', 55, 'SEQ-10PER-8 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6310', 'A', 56, 'SEQ-10PER-9 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6310', 'B', 56, 'SEQ-10PER-9 B', 15, 15, 'test');


----For F-disk---------
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6311', 'A', 57, 'SEQ-10PER-10 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6311', 'B', 57, 'SEQ-10PER-10 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6312', 'A', 58, 'SEQ-10PER-11 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6312', 'B', 58, 'SEQ-10PER-11 B', 15, 15, 'test');

insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6313', 'A', 59, 'SEQ-10PER-12 A', 15, 15, 'test');
insert into SMT_DAQ_SEQHALF
       (SEQ_SERIAL_NO, SEQ_HALF, SEQ_ID, DESCRIPTION, HDI_MASK, POWER_CMD, STATUS)
        values
       ('SEQ-6313', 'B', 59, 'SEQ-10PER-12 B', 15, 15, 'test');


---------------------------------------------------------------
--  entering SEQ_ID_X values...
---------------------------------------------------------------

update SMT_DAQ_SEQ set SEQ_ID_1=48 where SEQ_SERIAL_NO='SEQ-6302';
update SMT_DAQ_SEQ set SEQ_ID_2=48 where SEQ_SERIAL_NO='SEQ-6302';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=49 where SEQ_SERIAL_NO='SEQ-6303';
update SMT_DAQ_SEQ set SEQ_ID_2=49 where SEQ_SERIAL_NO='SEQ-6303';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=50 where SEQ_SERIAL_NO='SEQ-6304';
update SMT_DAQ_SEQ set SEQ_ID_2=50 where SEQ_SERIAL_NO='SEQ-6304';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=51 where SEQ_SERIAL_NO='SEQ-6305';
update SMT_DAQ_SEQ set SEQ_ID_2=51 where SEQ_SERIAL_NO='SEQ-6305';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=52 where SEQ_SERIAL_NO='SEQ-6306';
update SMT_DAQ_SEQ set SEQ_ID_2=52 where SEQ_SERIAL_NO='SEQ-6306';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=53 where SEQ_SERIAL_NO='SEQ-6307';
update SMT_DAQ_SEQ set SEQ_ID_2=53 where SEQ_SERIAL_NO='SEQ-6307';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=54 where SEQ_SERIAL_NO='SEQ-6308';
update SMT_DAQ_SEQ set SEQ_ID_2=54 where SEQ_SERIAL_NO='SEQ-6308';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=55 where SEQ_SERIAL_NO='SEQ-6309';
update SMT_DAQ_SEQ set SEQ_ID_2=55 where SEQ_SERIAL_NO='SEQ-6309';
							      
update SMT_DAQ_SEQ set SEQ_ID_1=56 where SEQ_SERIAL_NO='SEQ-6310';
update SMT_DAQ_SEQ set SEQ_ID_2=56 where SEQ_SERIAL_NO='SEQ-6310';

----For F-disk---------
update SMT_DAQ_SEQ set SEQ_ID_1=00 where SEQ_SERIAL_NO='SEQ-6311';
update SMT_DAQ_SEQ set SEQ_ID_2=00 where SEQ_SERIAL_NO='SEQ-6311';
							        
update SMT_DAQ_SEQ set SEQ_ID_1=00 where SEQ_SERIAL_NO='SEQ-6312';
update SMT_DAQ_SEQ set SEQ_ID_2=00 where SEQ_SERIAL_NO='SEQ-6312';
							      
update SMT_DAQ_SEQ set SEQ_ID_1=00 where SEQ_SERIAL_NO='SEQ-6313';
update SMT_DAQ_SEQ set SEQ_ID_2=00 where SEQ_SERIAL_NO='SEQ-6313';



----------------------------------------------------------------------------------
-- table SMT_DAQ_SEQ_CHANNEL

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6302', 1, 'INT-6301', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6302', 2, 'INT-6301', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6302', 3, 'INT-6301', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6302', 4, 'INT-6301', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6303', 1, 'INT-6302', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6303', 2, 'INT-6302', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6303', 3, 'INT-6302', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6303', 4, 'INT-6302', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6304', 1, 'INT-6303', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6304', 2, 'INT-6303', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6304', 3, 'INT-6303', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6304', 4, 'INT-6303', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6305', 1, 'INT-6304', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6305', 2, 'INT-6304', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6305', 3, 'INT-6304', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6305', 4, 'INT-6304', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6306', 1, 'INT-6305', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6306', 2, 'INT-6305', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6306', 3, 'INT-6305', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6306', 4, 'INT-6305', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6307', 1, 'INT-6306', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6307', 2, 'INT-6306', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6307', 3, 'INT-6306', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6307', 4, 'INT-6306', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6308', 1, 'INT-6307', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6308', 2, 'INT-6307', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6308', 3, 'INT-6307', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6308', 4, 'INT-6307', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6309', 1, 'INT-6308', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6309', 2, 'INT-6308', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6309', 3, 'INT-6308', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6309', 4, 'INT-6308', 4);


insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6310', 1, 'INT-6309', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6310', 2, 'INT-6309', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6310', 3, 'INT-6309', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6310', 4, 'INT-6309', 4);



----For F-disk---------
insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6311', 1, 'INT-6310', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6311', 2, 'INT-6310', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6311', 3, 'INT-6310', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6311', 4, 'INT-6310', 4);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6312', 1, 'INT-6311', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6312', 2, 'INT-6311', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6312', 3, 'INT-6311', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6312', 4, 'INT-6311', 4);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6313', 1, 'INT-6312', 1);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6313', 2, 'INT-6312', 2);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6313', 3, 'INT-6312', 3);

insert into SMT_DAQ_SEQ_CHANNEL
       (SEQ_SERIAL_NO, SEQ_CHANNEL_ID, INTERFACE_SERIAL_NO, INTERFACE_CHANNEL_ID)
       values
       ('SEQ-6313', 4, 'INT-6312', 4);






---------------------------------------------------------------------------------
-- table SMT_DAQ_VRB

insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6301', 1, 'VRB-10PER-B01', 1, 'SMT-VRBCR-63',  1, 'SMT_VRB_6308', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6302', 1, 'VRB-10PER-B02', 1, 'SMT-VRBCR-63',  2, 'SMT_VRB_6309', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6303', 1, 'VRB-10PER-B03', 1, 'SMT-VRBCR-63',  3, 'SMT_VRB_630A', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6304', 1, 'VRB-10PER-B04', 1, 'SMT-VRBCR-63',  4, 'SMT_VRB_630B', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6305', 1, 'VRB-10PER-B05', 1, 'SMT-VRBCR-63',  5, 'SMT_VRB_630C', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6306', 1, 'VRB-10PER-B06', 1, 'SMT-VRBCR-63',  6, 'SMT_VRB_630D', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6307', 1, 'VRB-10PER-B07', 1, 'SMT-VRBCR-63',  7, 'SMT_VRB_630F', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6308', 1, 'VRB-10PER-B08', 1, 'SMT-VRBCR-63',  8, 'SMT_VRB_6310', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6309', 1, 'VRB-10PER-B09', 1, 'SMT-VRBCR-63',  9, 'SMT_VRB_6311', 255, 0, 'test');

----For F-disk---------
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6310', 1, 'VRB-10PER-B10', 1, 'SMT-VRBCR-63',  9, 'SMT_VRB_6312', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6311', 1, 'VRB-10PER-B11', 1, 'SMT-VRBCR-63',  9, 'SMT_VRB_6313', 255, 0, 'test');
insert into SMT_DAQ_VRB
       (VRB_SERIAL_NO, VRB_ID, DESCRIPTION, ENABLE, CRATE_SERIAL_NO, LOCATOR, EPICS_NAME, CHAN_ENABLE, PATTERN, STATUS)
       values
       ('VRB-6312', 1, 'VRB-10PER-B12', 1, 'SMT-VRBCR-63',  9, 'SMT_VRB_6314', 255, 0, 'test');

-------------------------------------------------------------------------------
-- table SMT_DAQ_VRB_CHANNEL

insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6301', 1, 'SEQ-6302', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6301', 2, 'SEQ-6302', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6301', 3, 'SEQ-6302', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6301', 4, 'SEQ-6302', 4);


insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6302', 1, 'SEQ-6303', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6302', 2, 'SEQ-6303', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6302', 3, 'SEQ-6303', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6302', 4, 'SEQ-6303', 4);


insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6303', 1, 'SEQ-6304', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6303', 2, 'SEQ-6304', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6303', 3, 'SEQ-6304', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6303', 4, 'SEQ-6304', 4);

insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6304', 1, 'SEQ-6305', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6304', 2, 'SEQ-6305', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6304', 3, 'SEQ-6305', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6304', 4, 'SEQ-6305', 4);

insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6305', 1, 'SEQ-6306', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6305', 2, 'SEQ-6306', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6305', 3, 'SEQ-6306', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6305', 4, 'SEQ-6306', 4);


insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6306', 1, 'SEQ-6307', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6306', 2, 'SEQ-6307', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6306', 3, 'SEQ-6307', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6306', 4, 'SEQ-6307', 4);


insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6307', 1, 'SEQ-6308', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6307', 2, 'SEQ-6308', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6307', 3, 'SEQ-6308', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6307', 4, 'SEQ-6308', 4);

insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6308', 1, 'SEQ-6309', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6308', 2, 'SEQ-6309', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6308', 3, 'SEQ-6309', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6308', 4, 'SEQ-6309', 4);


insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6309', 1, 'SEQ-6310', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6309', 2, 'SEQ-6310', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6309', 3, 'SEQ-6310', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6309', 4, 'SEQ-6310', 4);


----For F-disk---------
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6310', 1, 'SEQ-6311', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6310', 2, 'SEQ-6311', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6310', 3, 'SEQ-6311', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6310', 4, 'SEQ-6311', 4);

insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6311', 1, 'SEQ-6312', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6311', 2, 'SEQ-6312', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6311', 3, 'SEQ-6312', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6311', 4, 'SEQ-6312', 4);

insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6312', 1, 'SEQ-6313', 1);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6312', 2, 'SEQ-6313', 2);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6312', 3, 'SEQ-6313', 3);
insert into SMT_DAQ_VRB_CHANNEL
       (VRB_SERIAL_NO, VRB_CHANNEL_ID, SEQ_SERIAL_NO, SEQ_CHANNEL_ID)
        values
       ('VRB-6312', 4, 'SEQ-6313', 4);

----------------------------------------------------------------------
-- adding the different readout bundles:
----------------------------------------------------------------------


update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-4-o-12';
update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-3-o-01';

update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-3-i-02';
update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-4-i-02';

update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-4-o-01';
update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-3-o-02';

update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-2-o-01';
update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-1-o-02';

update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-1-i-03';
update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-2-i-03';

update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-3-i-03';
update SMT_DAQ_HDI set BUNDLE=01 where DESCRIPTION='HDI-B1-4-i-03';


update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-4-o-02';
update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-3-o-03';

update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-3-i-04';
update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-4-i-04';

update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-4-o-03';
update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-3-o-04';

update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-2-o-02';
update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-1-o-03';

update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-1-i-04';
update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-2-i-04';

update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-3-i-05';
update SMT_DAQ_HDI set BUNDLE=02 where DESCRIPTION='HDI-B1-4-i-05';



update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-4-o-04';
update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-3-o-05';

update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-3-i-06';
update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-4-i-06';

update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-4-o-05';
update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-3-o-06';

update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-2-o-03';
update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-1-o-04';

update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-1-i-05';
update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-2-i-05';

update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-3-i-07';
update SMT_DAQ_HDI set BUNDLE=03 where DESCRIPTION='HDI-B1-4-i-07';


update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-4-o-06';
update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-3-o-07';

update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-3-i-08';
update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-4-i-08';

update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-4-o-07';
update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-3-o-08';

update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-2-o-04';
update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-1-o-05';

update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-1-i-06';
update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-2-i-06';

update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-3-i-09';
update SMT_DAQ_HDI set BUNDLE=04 where DESCRIPTION='HDI-B1-4-i-09';



update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-4-o-08';
update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-3-o-09';

update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-3-i-10';
update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-4-i-10';

update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-4-o-09';
update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-3-o-10';

update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-2-o-05';
update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-1-o-06';

update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-1-i-01';
update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-2-i-01';

update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-3-i-11';
update SMT_DAQ_HDI set BUNDLE=05 where DESCRIPTION='HDI-B1-4-i-11';


update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-4-o-10';
update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-3-o-11';

update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-3-i-12';
update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-4-i-12';

update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-4-o-11';
update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-3-o-12';

update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-2-o-06';
update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-1-o-01';

update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-1-i-02';
update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-2-i-02';

update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-3-i-01';
update SMT_DAQ_HDI set BUNDLE=06 where DESCRIPTION='HDI-B1-4-i-01';


----------------------------------------------------------------
-- Adding the BUNDLE numbers for the F-disk should be done here...
-- Bundles for the f-disk run from 7 to 13.
-- the format of the HDI-description is the following: 'HDI-F-??'
-- where ?? runs from 1 to 25. (1 is a 6-chipper)
----------------------------------------------------------------- 
update SMT_DAQ_HDI set BUNDLE=07 where DESCRIPTION='HDI-F-09';
update SMT_DAQ_HDI set BUNDLE=07 where DESCRIPTION='HDI-F-11';
update SMT_DAQ_HDI set BUNDLE=07 where DESCRIPTION='HDI-F-12';
update SMT_DAQ_HDI set BUNDLE=07 where DESCRIPTION='HDI-F-14';

update SMT_DAQ_HDI set BUNDLE=08 where DESCRIPTION='HDI-F-05';
update SMT_DAQ_HDI set BUNDLE=08 where DESCRIPTION='HDI-F-07';
update SMT_DAQ_HDI set BUNDLE=08 where DESCRIPTION='HDI-F-08';
update SMT_DAQ_HDI set BUNDLE=08 where DESCRIPTION='HDI-F-10';

update SMT_DAQ_HDI set BUNDLE=09 where DESCRIPTION='HDI-F-01';
update SMT_DAQ_HDI set BUNDLE=09 where DESCRIPTION='HDI-F-03';
update SMT_DAQ_HDI set BUNDLE=09 where DESCRIPTION='HDI-F-04';
update SMT_DAQ_HDI set BUNDLE=09 where DESCRIPTION='HDI-F-06';

update SMT_DAQ_HDI set BUNDLE=10 where DESCRIPTION='HDI-F-02';
update SMT_DAQ_HDI set BUNDLE=10 where DESCRIPTION='HDI-F-21';
update SMT_DAQ_HDI set BUNDLE=10 where DESCRIPTION='HDI-F-22';
update SMT_DAQ_HDI set BUNDLE=10 where DESCRIPTION='HDI-F-24';

update SMT_DAQ_HDI set BUNDLE=11 where DESCRIPTION='HDI-F-17';
update SMT_DAQ_HDI set BUNDLE=11 where DESCRIPTION='HDI-F-19';
update SMT_DAQ_HDI set BUNDLE=11 where DESCRIPTION='HDI-F-20';
update SMT_DAQ_HDI set BUNDLE=11 where DESCRIPTION='HDI-F-22';

update SMT_DAQ_HDI set BUNDLE=12 where DESCRIPTION='HDI-F-13';
update SMT_DAQ_HDI set BUNDLE=12 where DESCRIPTION='HDI-F-15';
update SMT_DAQ_HDI set BUNDLE=12 where DESCRIPTION='HDI-F-16';
update SMT_DAQ_HDI set BUNDLE=12 where DESCRIPTION='HDI-F-18';





commit;
