#include <FEConfigTimingDat.h>
Definition at line 11 of file FEConfigTimingDat.h.
◆ FEConfigTimingDat()
FEConfigTimingDat::FEConfigTimingDat |
( |
| ) |
|
Definition at line 11 of file FEConfigTimingDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
◆ ~FEConfigTimingDat()
FEConfigTimingDat::~FEConfigTimingDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 64 of file FEConfigTimingDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setTimingPar1(), and setTimingPar2().
77 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 78 "d.time_par1, d.time_par2 " 79 "FROM channelview cv JOIN " +
81 " d ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 82 "WHERE tim_conf_id = :tim_conf_id");
86 std::pair<EcalLogicID, FEConfigTimingDat>
p;
88 while (rset->next()) {
102 }
catch (SQLException&
e) {
103 throw(std::runtime_error(
"FEConfigTimingDat::fetchData: " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setTimingPar2(int x)
std::string getTable() override
void setTimingPar1(int x)
oracle::occi::Statement * m_readStmt
int fetchID() noexcept(false)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
◆ getTable()
std::string FEConfigTimingDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTimingPar1()
int FEConfigTimingDat::getTimingPar1 |
( |
| ) |
const |
|
inline |
◆ getTimingPar2()
int FEConfigTimingDat::getTimingPar2 |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
void FEConfigTimingDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 23 of file FEConfigTimingDat.cc.
References MillePedeFileConverter_cfg::e.
29 " (tim_conf_id, logic_id, " 30 "time_par1, time_par2 ) VALUES (:tim_conf_id, :logic_id, :time_par1, :time_par2 )");
31 }
catch (SQLException&
e) {
32 throw(std::runtime_error(
"FEConfigTimingDat::prepareWrite(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTable() override
◆ setTimingPar1()
void FEConfigTimingDat::setTimingPar1 |
( |
int |
x | ) |
|
|
inline |
◆ setTimingPar2()
void FEConfigTimingDat::setTimingPar2 |
( |
int |
x | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 107 of file FEConfigTimingDat.cc.
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, EcalLogicID::getLogicID(), getTimingPar1(), getTimingPar2(), AlCaHLTBitMon_ParallelJobs::p, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.
112 int iconfID = iconf->
fetchID();
114 throw(std::runtime_error(
"FEConfigTimingDat::writeArrayDB: tim_conf_id not in DB"));
117 int nrows =
data->size();
118 int* ids =
new int[nrows];
119 int* iconfid_vec =
new int[nrows];
120 int*
xx =
new int[nrows];
121 int*
yy =
new int[nrows];
123 ub2* ids_len =
new ub2[nrows];
124 ub2* iconf_len =
new ub2[nrows];
125 ub2* x_len =
new ub2[nrows];
126 ub2* y_len =
new ub2[nrows];
131 typedef map<EcalLogicID, FEConfigTimingDat>::const_iterator CI;
132 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
133 channel = &(
p->first);
136 throw(std::runtime_error(
"FEConfigTimingDat::writeArrayDB: Bad EcalLogicID"));
138 ids[
count] = logicID;
139 iconfid_vec[
count] = iconfID;
141 dataitem = &(
p->second);
150 iconf_len[
count] =
sizeof(iconfid_vec[
count]);
159 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
160 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
161 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIINT,
sizeof(
xx[0]), x_len);
162 m_writeStmt->setDataBuffer(4, (dvoid*)
yy, OCCIINT,
sizeof(
yy[0]), y_len);
167 delete[] iconfid_vec;
176 }
catch (SQLException&
e) {
177 throw(std::runtime_error(
"FEConfigTimingDat::writeArrayDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int getTimingPar2() const
int fetchID() noexcept(false)
char data[epos_bytes_allocation]
int getTimingPar1() const
◆ writeDB()
Definition at line 36 of file FEConfigTimingDat.cc.
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
44 throw(std::runtime_error(
"FEConfigTimingDat::writeDB: ICONF not in DB"));
49 throw(std::runtime_error(
"FEConfigTimingDat::writeDB: Bad EcalLogicID"));
59 }
catch (SQLException&
e) {
60 throw(std::runtime_error(
"FEConfigTimingDat::writeDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
◆ EcalCondDBInterface
◆ m_par1
int FEConfigTimingDat::m_par1 |
|
private |
◆ m_par2
int FEConfigTimingDat::m_par2 |
|
private |