Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /*
0002  *  CSCPedestals_payload_o2o()
0003  *
0004  *  CSCPedestals transform/transfer
0005  *  Parameters:  last_id:  The lower bounding IOV_VALUE_ID for objects to transfer
0006  */
0007 
0008 CREATE OR REPLACE PROCEDURE CSCPedestals_payload_o2o (
0009   last_id IN NUMBER
0010 )
0011 AS
0012 
0013 BEGIN
0014 
0015 INSERT INTO "CSCPEDESTALS"
0016 SELECT
0017  record_id iov_value_id,
0018  runs time
0019 FROM pedestals@omds
0020 WHERE record_id > last_id and flag = 1
0021 ;
0022 
0023 
0024 INSERT INTO "CSCPEDESTALS_MAP"
0025 SELECT
0026  pedestals_map.map_index map_id,
0027  pedestals_map.record_id iov_value_id,
0028  pedestals_map.layer_id csc_int_id
0029 FROM pedestals_map@omds, pedestals@omds
0030 WHERE pedestals.record_id = pedestals_map.record_id
0031   AND pedestals_map.record_id > last_id 
0032   AND pedestals.flag = 1
0033 ;
0034 
0035 
0036 INSERT INTO "CSCPEDESTALS_DATA"
0037 SELECT
0038  pedestals_data.vec_index vec_index,
0039  pedestals_map.map_index map_id,
0040  pedestals_map.record_id iov_value_id,
0041  pedestals_data.ped pedestals_ped, 
0042  pedestals_data.rms pedestals_rms
0043 FROM pedestals_data@omds, pedestals_map@omds, pedestals@omds
0044 WHERE pedestals_data.map_id=pedestals_map.map_id
0045   AND pedestals_map.record_id = pedestals.record_id
0046   AND pedestals_map.record_id > last_id 
0047   AND pedestals.flag = 1
0048 ;
0049 
0050 END;
0051 /
0052 show errors;