10 using namespace oracle::occi;
15 m_writeStmt =
nullptr;
41 this->checkConnection();
44 m_writeStmt = m_conn->createStatement();
46 "INSERT INTO " + getTable() +
48 " enableEBOddFilter, enableEEOddFilter, enableEBOddPeakFinder,enableEEOddPeakFinder, disableEBEvenPeakFinder, "
49 "DISABLEEEEVENPEAKFINDER, fenixEBStripOutput, fenixEEStripOutput, FenixEBStripInfoBit2, fenixEEStripInfobit2, "
50 "EBfenixTcpOutput, EBfenixTCPInfobit1,EEFENIXTCPOUTPUT, EEFENIXTCPINFOBIT1 ,fenixpar15, fenixpar16, "
51 "fenixpar17, fenixpar18 ) "
52 "VALUES (:wei2_conf_id, "
53 " :w1, :w2, :w3, :w4, :w5, :w6, :w7, :w8, :w9, :w10, :w11, :w12, :w13, :w14, :w15 , :w16, :w17, :w18 )");
54 }
catch (SQLException&
e) {
55 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightModeDat::prepareWrite(): " << e.getMessage();
62 this->checkConnection();
65 int iconfID = iconf->fetchID();
67 throw(std::runtime_error(
"FEConfigOddWeightModeDat::writeDB: ICONF not in DB"));
71 m_writeStmt->setInt(1, iconfID);
73 m_writeStmt->setInt(2,
item->getFenixPar1());
74 m_writeStmt->setInt(3,
item->getFenixPar2());
75 m_writeStmt->setInt(4,
item->getFenixPar3());
76 m_writeStmt->setInt(5,
item->getFenixPar4());
77 m_writeStmt->setInt(6,
item->getFenixPar5());
78 m_writeStmt->setInt(7,
item->getFenixPar6());
79 m_writeStmt->setInt(8,
item->getFenixPar7());
80 m_writeStmt->setInt(9,
item->getFenixPar8());
81 m_writeStmt->setInt(10,
item->getFenixPar9());
82 m_writeStmt->setInt(11,
item->getFenixPar10());
83 m_writeStmt->setInt(12,
item->getFenixPar11());
84 m_writeStmt->setInt(13,
item->getFenixPar12());
85 m_writeStmt->setInt(14,
item->getFenixPar13());
86 m_writeStmt->setInt(15,
item->getFenixPar14());
87 m_writeStmt->setInt(16,
item->getFenixPar15());
88 m_writeStmt->setInt(17,
item->getFenixPar16());
89 m_writeStmt->setInt(18,
item->getFenixPar17());
90 m_writeStmt->setInt(19,
item->getFenixPar18());
92 m_writeStmt->executeUpdate();
93 }
catch (SQLException&
e) {
94 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightModeDat::writeDB(): " << e.getMessage();
100 this->checkConnection();
103 iconf->setConnection(m_env, m_conn);
104 int iconfID = iconf->fetchID();
106 throw(std::runtime_error(
"FEConfigOddWeightModeDat::fetchData: ICONF not in DB"));
112 "SELECT enableEBOddFilter, enableEEOddFilter, enableEBOddPeakFinder,enableEEOddPeakFinder, "
113 "disableEBEvenPeakFinder, DISABLEEEEVENPEAKFINDER, fenixEBStripOutput, fenixEBStripOutput, "
114 "FenixEBStripInfoBit2, fenixEEStripInfobit2, EBfenixTcpOutput, EBfenixTCPInfobit1,EEFENIXTCPOUTPUT, "
115 "EEFENIXTCPINFOBIT1 ,fenixpar15, fenixpar16, fenixpar17, fenixpar18 "
119 "WHERE wei2_conf_id = :wei2_conf_id ");
120 m_readStmt->setInt(1, iconfID);
121 ResultSet* rset = m_readStmt->executeQuery();
123 std::pair<EcalLogicID, FEConfigOddWeightModeDat>
p;
126 while (rset->next()) {
153 }
catch (SQLException&
e) {
154 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightModeDat::fetchData: " << e.getMessage();
163 typedef map<EcalLogicID, FEConfigOddWeightModeDat>::const_iterator CI;
164 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
165 channel = &(
p->first);
166 dataitem = &(
p->second);
167 writeDB(channel, dataitem, iconf);
void setFenixPar11(int x)
void setFenixPar15(int x)
void writeArrayDB(const std::map< EcalLogicID, FEConfigOddWeightModeDat > *data, FEConfigOddWeightInfo *iconf) noexcept(false)
void fetchData(std::map< EcalLogicID, FEConfigOddWeightModeDat > *fillMap, FEConfigOddWeightInfo *iconf) noexcept(false)
FEConfigOddWeightModeDat()
void setFenixPar14(int x)
void setFenixPar17(int x)
void prepareWrite() noexcept(false) override
void writeDB(const EcalLogicID *ecid, const FEConfigOddWeightModeDat *item, FEConfigOddWeightInfo *iconf) noexcept(false)
void setFenixPar16(int x)
static std::vector< std::string > checklist dat
void setFenixPar12(int x)
void setFenixPar18(int x)
char data[epos_bytes_allocation]
~FEConfigOddWeightModeDat() override
void setFenixPar10(int x)
void setFenixPar13(int x)