Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:11

0001 /*
0002  *  CSCcrosstalk_payload_o2o()
0003  *
0004  *  CSCcrosstalk transform/transfer
0005  *  Parameters:  last_id:  The lower bounding IOV_VALUE_ID for objects to transfer
0006  */
0007 
0008 CREATE OR REPLACE PROCEDURE CSCcrosstalk_payload_o2o (
0009   last_id IN NUMBER
0010 )
0011 AS
0012 
0013 BEGIN
0014 
0015 INSERT INTO "CSCCROSSTALK"
0016 SELECT
0017  record_id iov_value_id,
0018  runs time
0019 FROM crosstalk@omds
0020 WHERE record_id > last_id and flag = 1
0021 ;
0022 
0023 INSERT INTO "CSCCROSSTALK_MAP"
0024 SELECT
0025  crosstalk_map.map_index map_id,
0026  crosstalk_map.record_id iov_value_id,
0027  crosstalk_map.layer_id csc_int_id
0028 FROM crosstalk_map@omds, crosstalk@omds
0029 WHERE crosstalk_map.record_id = crosstalk.record_id
0030   AND crosstalk_map.record_id > last_id
0031   AND crosstalk.flag = 1
0032 ;
0033 
0034 INSERT INTO "CSCCROSSTALK_DATA"
0035 SELECT
0036  crosstalk_data.vec_index vec_index,
0037  crosstalk_map.map_index map_id,
0038  crosstalk_map.record_id iov_value_id,
0039  crosstalk_data.xtalk_chi2_left crosstalk_chi2_left,
0040  crosstalk_data.xtalk_chi2_right crosstalk_chi2_right,
0041  crosstalk_data.xtalk_intercept_left crosstalk_intercept_left,
0042  crosstalk_data.xtalk_intercept_right crosstalk_intercept_right,
0043  crosstalk_data.xtalk_slope_left crosstalk_slope_left,
0044  crosstalk_data.xtalk_slope_right crosstalk_slope_right
0045 FROM crosstalk_data@omds, crosstalk_map@omds, crosstalk@omds
0046 WHERE crosstalk_data.map_id = crosstalk_map.map_id
0047   AND crosstalk_map.record_id = crosstalk.record_id
0048   AND crosstalk_map.record_id > last_id
0049   AND crosstalk.flag = 1
0050 ;
0051 
0052 END;
0053 /
0054 show errors;