14 m_writeStmt =
nullptr;
40 this->checkConnection();
43 m_writeStmt = m_conn->createStatement();
45 "INSERT INTO " + getTable() +
47 " enableEBOddFilter, enableEEOddFilter, enableEBOddPeakFinder,enableEEOddPeakFinder, disableEBEvenPeakFinder, "
48 "DISABLEEEEVENPEAKFINDER, fenixEBStripOutput, fenixEEStripOutput, FenixEBStripInfoBit2, fenixEEStripInfobit2, "
49 "EBfenixTcpOutput, EBfenixTCPInfobit1,EEFENIXTCPOUTPUT, EEFENIXTCPINFOBIT1 ,fenixpar15, fenixpar16, "
50 "fenixpar17, fenixpar18 ) "
51 "VALUES (:wei2_conf_id, "
52 " :w1, :w2, :w3, :w4, :w5, :w6, :w7, :w8, :w9, :w10, :w11, :w12, :w13, :w14, :w15 , :w16, :w17, :w18 )");
53 }
catch (SQLException&
e) {
54 throw(std::runtime_error(
"FEConfigOddWeightModeDat::prepareWrite(): " +
e.getMessage()));
61 this->checkConnection();
64 int iconfID = iconf->fetchID();
66 throw(std::runtime_error(
"FEConfigOddWeightModeDat::writeDB: ICONF not in DB"));
70 m_writeStmt->setInt(1, iconfID);
72 m_writeStmt->setInt(2,
item->getFenixPar1());
73 m_writeStmt->setInt(3,
item->getFenixPar2());
74 m_writeStmt->setInt(4,
item->getFenixPar3());
75 m_writeStmt->setInt(5,
item->getFenixPar4());
76 m_writeStmt->setInt(6,
item->getFenixPar5());
77 m_writeStmt->setInt(7,
item->getFenixPar6());
78 m_writeStmt->setInt(8,
item->getFenixPar7());
79 m_writeStmt->setInt(9,
item->getFenixPar8());
80 m_writeStmt->setInt(10,
item->getFenixPar9());
81 m_writeStmt->setInt(11,
item->getFenixPar10());
82 m_writeStmt->setInt(12,
item->getFenixPar11());
83 m_writeStmt->setInt(13,
item->getFenixPar12());
84 m_writeStmt->setInt(14,
item->getFenixPar13());
85 m_writeStmt->setInt(15,
item->getFenixPar14());
86 m_writeStmt->setInt(16,
item->getFenixPar15());
87 m_writeStmt->setInt(17,
item->getFenixPar16());
88 m_writeStmt->setInt(18,
item->getFenixPar17());
89 m_writeStmt->setInt(19,
item->getFenixPar18());
91 m_writeStmt->executeUpdate();
92 }
catch (SQLException&
e) {
93 throw(std::runtime_error(
"FEConfigOddWeightModeDat::writeDB(): " +
e.getMessage()));
99 this->checkConnection();
102 iconf->setConnection(m_env, m_conn);
103 int iconfID = iconf->fetchID();
105 throw(std::runtime_error(
"FEConfigOddWeightModeDat::fetchData: ICONF not in DB"));
111 "SELECT enableEBOddFilter, enableEEOddFilter, enableEBOddPeakFinder,enableEEOddPeakFinder, "
112 "disableEBEvenPeakFinder, DISABLEEEEVENPEAKFINDER, fenixEBStripOutput, fenixEBStripOutput, "
113 "FenixEBStripInfoBit2, fenixEEStripInfobit2, EBfenixTcpOutput, EBfenixTCPInfobit1,EEFENIXTCPOUTPUT, "
114 "EEFENIXTCPINFOBIT1 ,fenixpar15, fenixpar16, fenixpar17, fenixpar18 "
118 "WHERE wei2_conf_id = :wei2_conf_id ");
119 m_readStmt->setInt(1, iconfID);
120 ResultSet* rset = m_readStmt->executeQuery();
122 std::pair<EcalLogicID, FEConfigOddWeightModeDat>
p;
125 while (rset->next()) {
152 }
catch (SQLException&
e) {
153 throw(std::runtime_error(
"FEConfigOddWeightModeDat::fetchData: " +
e.getMessage()));
162 typedef map<EcalLogicID, FEConfigOddWeightModeDat>::const_iterator CI;
163 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
164 channel = &(
p->first);
165 dataitem = &(
p->second);
166 writeDB(channel, dataitem, iconf);