21 const std::string _accessor =
"occi://CMS_HCL_PRTTYPE_HCAL_READER@anyhost/int2r?PASSWORD=HCAL_Reader_88,LHWM_VERSION=22";
24 oracle::occi::Connection * myConn = db -> getConnection();
30 sstemp<<
"'"<<LMversion<<
"'";
35 Statement* stmt = myConn -> createStatement();
38 query +=
" H.SIDE, H.ETA, H.PHI, ";
39 query +=
" H.DELTA_PHI, H.DEPTH, H.SUBDETECTOR, H.RBX, H.WEDGE, ";
40 query +=
" H.SECTOR, H.RM_SLOT, H.HPD_PIXEL, H.QIE_SLOT, H.ADC, ";
41 query +=
" H.RM_FIBER, H.FIBER_CHANNEL, H.LETTER_CODE, H.CRATE, H.HTR_SLOT, ";
42 query +=
" H.HTR_FPGA, H.HTR_FIBER, H.DCC_SL, H.SPIGOT, H.DCC_SLOT, ";
43 query +=
" H.SLB_SITE, H.SLB_CHANNEL, H.SLB_CHANNEL2, H.SLB_CABLE, H.RCT_CRATE, ";
44 query +=
" H.RCT_CARD, H.RCT_CONNECTOR, H.RCT_NAME, H.FED_ID ";
45 query +=
" FROM CMS_HCL_HCAL_CONDITION_OWNER.HCAL_HARDWARE_LOGICAL_MAPS_V3 H inner join ";
46 query +=
" CMS_HCL_CORE_CONDITION_OWNER.COND_DATA_SETS C ";
47 query +=
" on C.CONDITION_DATA_SET_ID=H.CONDITION_DATA_SET_ID ";
48 query +=
" inner join CMS_HCL_CORE_CONDITION_OWNER.KINDS_OF_CONDITIONS K ";
49 query +=
" on K.KIND_OF_CONDITION_ID=C.KIND_OF_CONDITION_ID ";
50 query +=
" where C.IS_RECORD_DELETED='F' and K.IS_RECORD_DELETED='F' ";
51 query +=
" and K.NAME='HCAL hardware logical channel maps v3' ";
52 query +=
" and C.VERSION=";
56 ResultSet *rs = stmt->executeQuery(query.c_str());
58 while (rs->next() && CHAcount < 10000) {
60 lmapHBEFO -> versionC . push_back( rs ->
getInt(1) );
61 lmapHBEFO -> sideC . push_back( rs ->
getInt(2) );
62 lmapHBEFO -> etaC . push_back( rs ->
getInt(3) );
63 lmapHBEFO -> phiC . push_back( rs ->
getInt(4) );
64 lmapHBEFO -> dphiC . push_back( rs ->
getInt(5) );
66 lmapHBEFO -> depthC . push_back( rs ->
getInt(6) );
67 lmapHBEFO -> detC . push_back( rs -> getString(7) );
68 lmapHBEFO -> rbxC . push_back( rs -> getString(8) );
69 lmapHBEFO -> wedgeC . push_back( rs ->
getInt(9) );
70 lmapHBEFO -> sectorC . push_back( rs ->
getInt(10) );
72 lmapHBEFO -> rmC . push_back( rs ->
getInt(11) );
73 lmapHBEFO -> pixelC . push_back( rs ->
getInt(12) );
74 lmapHBEFO -> qieC . push_back( rs ->
getInt(13) );
75 lmapHBEFO -> adcC . push_back( rs ->
getInt(14) );
76 lmapHBEFO -> rm_fiC . push_back( rs ->
getInt(15) );
78 lmapHBEFO -> fi_chC . push_back( rs ->
getInt(16) );
79 lmapHBEFO -> let_codeC . push_back( rs -> getString(17) );
80 lmapHBEFO -> crateC . push_back( rs ->
getInt(18) );
81 lmapHBEFO -> htrC . push_back( rs ->
getInt(19) );
82 lmapHBEFO -> fpgaC . push_back( rs -> getString(20) );
84 lmapHBEFO -> htr_fiC . push_back( rs ->
getInt(21) );
85 lmapHBEFO -> dcc_slC . push_back( rs ->
getInt(22) );
86 lmapHBEFO -> spigoC . push_back( rs ->
getInt(23) );
87 lmapHBEFO -> dccC . push_back( rs ->
getInt(24) );
88 lmapHBEFO -> slbC . push_back( rs ->
getInt(25) );
90 lmapHBEFO -> slbinC . push_back( rs -> getString(26) );
91 lmapHBEFO -> slbin2C . push_back( rs -> getString(27) );
92 lmapHBEFO -> slnamC . push_back( rs -> getString(28) );
93 lmapHBEFO -> rctcraC . push_back( rs ->
getInt(29) );
94 lmapHBEFO -> rctcarC . push_back( rs ->
getInt(30) );
96 lmapHBEFO -> rctconC . push_back( rs ->
getInt(31) );
97 lmapHBEFO -> rctnamC . push_back( rs -> getString(32) );
98 lmapHBEFO -> fedidC . push_back( rs ->
getInt(33) );
100 lmapHBEFO -> orderC . push_back( CHAcount );
105 myConn -> terminateStatement(stmt);
108 std::cout<<
"Couldn't get statement"<<std::endl;
int getInt(ResultSet *rset, int ipar)
oracle::occi::SQLException SQLException
Gather config data from online DB.
oracle::occi::ResultSet ResultSet