Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /*
0002  *  CSCGains_payload_o2o()
0003  *
0004  *  CSCGains transform/transfer
0005  *  Parameters:  last_id:  The lower bounding IOV_VALUE_ID for objects to transfer
0006  */
0007 
0008 CREATE OR REPLACE PROCEDURE CSCGains_payload_o2o (
0009   last_id IN NUMBER
0010 )
0011 AS
0012 
0013 BEGIN
0014 
0015 INSERT INTO "CSCGAINS"
0016 SELECT
0017  record_id iov_value_id,
0018  runs time
0019 FROM gains@omds
0020 WHERE record_id > last_id and flag = 1
0021 ;
0022 
0023 INSERT INTO "CSCGAINS_MAP"
0024 SELECT
0025  gains_map.map_index map_id,
0026  gains_map.record_id iov_value_id,
0027  gains_map.layer_id csc_int_id
0028 FROM gains_map@omds, gains@omds
0029 WHERE gains_map.record_id = gains.record_id
0030   AND gains_map.record_id > last_id 
0031   AND gains.flag = 1
0032 ;
0033 
0034 INSERT INTO "CSCGAINS_DATA"
0035 SELECT
0036  gains_data.vec_index vec_index,
0037  gains_map.map_index map_id,
0038  gains_map.record_id iov_value_id,
0039  gains_data.gain_chi2 gains_chi2, 
0040  gains_data.gain_intercept gains_intercept,
0041  gains_data.gain_slope gains_slope
0042 FROM gains_data@omds, gains_map@omds, gains@omds
0043 WHERE gains_data.map_id = gains_map.map_id
0044   AND gains_map.record_id = gains.record_id
0045   AND gains_map.record_id > last_id 
0046   AND gains.flag = 1
0047 ;
0048 
0049 END;
0050 /
0051 show errors;