![]() |
![]() |
#include <OnlineDB/EcalCondDB/interface/LMFLaserBluePrimDat.h>
Definition at line 12 of file LMFLaserBluePrimDat.h.
LMFLaserBluePrimDat::LMFLaserBluePrimDat | ( | ) |
Definition at line 13 of file LMFLaserBluePrimDat.cc.
References m_Alpha, m_apdOverPNAMean, m_apdOverPNAPeak, m_apdOverPNARMS, m_apdOverPNBMean, m_apdOverPNBPeak, m_apdOverPNBRMS, m_apdOverPNMean, m_apdOverPNPeak, m_apdOverPNRMS, m_Beta, IDBObject::m_conn, IDBObject::m_env, m_Flag, m_Mean, m_Peak, IDataItem::m_readStmt, m_RMS, m_ShapeCor, IDataItem::m_writeStmt, and NULL.
00014 { 00015 m_env = NULL; 00016 m_conn = NULL; 00017 m_writeStmt = NULL; 00018 m_readStmt = NULL; 00019 00020 00021 m_Mean=0; 00022 m_RMS=0; 00023 m_Peak=0; 00024 m_Flag=0; 00025 m_apdOverPNAMean=0; 00026 m_apdOverPNARMS=0; 00027 m_apdOverPNAPeak=0; 00028 m_apdOverPNBMean=0; 00029 m_apdOverPNBRMS=0; 00030 m_apdOverPNBPeak=0; 00031 m_apdOverPNMean=0; 00032 m_apdOverPNRMS=0; 00033 m_apdOverPNPeak=0; 00034 m_Alpha=0; 00035 m_Beta=0; 00036 m_ShapeCor=0; 00037 }
LMFLaserBluePrimDat::~LMFLaserBluePrimDat | ( | ) |
void LMFLaserBluePrimDat::fetchData | ( | std::map< EcalLogicID, LMFLaserBluePrimDat > * | fillVec, | |
LMFRunIOV * | iov | |||
) | throw (std::runtime_error) [private] |
Definition at line 296 of file LMFLaserBluePrimDat.cc.
References IDBObject::checkConnection(), e, IDBObject::m_conn, IDBObject::m_env, IDataItem::m_readStmt, p, setAlpha(), setAPDOverPNAMean(), setAPDOverPNAPeak(), setAPDOverPNARMS(), setAPDOverPNBMean(), setAPDOverPNBPeak(), setAPDOverPNBRMS(), setAPDOverPNMean(), setAPDOverPNPeak(), setAPDOverPNRMS(), setBeta(), setFlag(), setMean(), setPeak(), setRMS(), and setShapeCor().
00298 { 00299 this->checkConnection(); 00300 fillMap->clear(); 00301 00302 iov->setConnection(m_env, m_conn); 00303 int iovID = iov->fetchID(); 00304 if (!iovID) { 00305 // throw(runtime_error("LMFLaserBluePrimDat::writeDB: IOV not in DB")); 00306 return; 00307 } 00308 00309 try { 00310 00311 m_readStmt->setSQL("SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 00312 "d.flag, d.mean, d.rms, d.peak, d.apd_over_pnA_mean, d.apd_over_pnA_rms, d.apd_over_pnA_peak, " 00313 " d.apd_over_pnB_mean, d.apd_over_pnB_rms,d.apd_over_pnB_peak, d.apd_over_pn_mean, d.apd_over_pn_rms, d.apd_over_pn_peak " 00314 "d.alpha, d.beta, d.shape_cor " 00315 "FROM channelview cv JOIN lmf_laser_blue_prim_dat d " 00316 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 00317 "WHERE d.lmf_iov_id = :iov_id"); 00318 00319 m_readStmt->setInt(1, iovID); 00320 00321 ResultSet* rset = m_readStmt->executeQuery(); 00322 00323 std::pair< EcalLogicID, LMFLaserBluePrimDat > p; 00324 LMFLaserBluePrimDat dat; 00325 while(rset->next()) { 00326 p.first = EcalLogicID( rset->getString(1), // name 00327 rset->getInt(2), // logic_id 00328 rset->getInt(3), // id1 00329 rset->getInt(4), // id2 00330 rset->getInt(5), // id3 00331 rset->getString(6)); // maps_to 00332 00333 00334 dat.setFlag( rset->getInt(7) ); 00335 dat.setMean( rset->getFloat(8) ); 00336 dat.setRMS( rset->getFloat(9) ); 00337 dat.setPeak( rset->getFloat(10) ); 00338 00339 dat.setAPDOverPNAMean( rset->getFloat(11) ); 00340 dat.setAPDOverPNARMS( rset->getFloat(12) ); 00341 dat.setAPDOverPNAPeak( rset->getFloat(13) ); 00342 00343 dat.setAPDOverPNBMean( rset->getFloat(14) ); 00344 dat.setAPDOverPNBRMS( rset->getFloat(15) ); 00345 dat.setAPDOverPNBPeak( rset->getFloat(16) ); 00346 00347 dat.setAPDOverPNMean( rset->getFloat(17) ); 00348 dat.setAPDOverPNRMS( rset->getFloat(18) ); 00349 dat.setAPDOverPNPeak( rset->getFloat(19) ); 00350 00351 dat.setAlpha( rset->getFloat(20) ); 00352 dat.setBeta( rset->getFloat(21) ); 00353 dat.setShapeCor( rset->getFloat(22) ); 00354 p.second = dat; 00355 fillMap->insert(p); 00356 } 00357 00358 } catch (SQLException &e) { 00359 throw(runtime_error("LMFLaserBluePrimDat::fetchData(): "+e.getMessage())); 00360 } 00361 }
float LMFLaserBluePrimDat::getAlpha | ( | ) | const [inline] |
Definition at line 61 of file LMFLaserBluePrimDat.h.
References m_Alpha.
Referenced by writeArrayDB().
00061 { return m_Alpha; }
float LMFLaserBluePrimDat::getAPDOverPNAMean | ( | ) | const [inline] |
Definition at line 34 of file LMFLaserBluePrimDat.h.
References m_apdOverPNAMean.
Referenced by writeArrayDB().
00034 { return m_apdOverPNAMean; }
float LMFLaserBluePrimDat::getAPDOverPNAPeak | ( | ) | const [inline] |
Definition at line 40 of file LMFLaserBluePrimDat.h.
References m_apdOverPNAPeak.
Referenced by writeArrayDB().
00040 { return m_apdOverPNAPeak; }
float LMFLaserBluePrimDat::getAPDOverPNARMS | ( | ) | const [inline] |
Definition at line 37 of file LMFLaserBluePrimDat.h.
References m_apdOverPNARMS.
Referenced by writeArrayDB().
00037 { return m_apdOverPNARMS; }
float LMFLaserBluePrimDat::getAPDOverPNBMean | ( | ) | const [inline] |
Definition at line 43 of file LMFLaserBluePrimDat.h.
References m_apdOverPNBMean.
Referenced by writeArrayDB().
00043 { return m_apdOverPNBMean; }
float LMFLaserBluePrimDat::getAPDOverPNBPeak | ( | ) | const [inline] |
Definition at line 49 of file LMFLaserBluePrimDat.h.
References m_apdOverPNBPeak.
Referenced by writeArrayDB().
00049 { return m_apdOverPNBPeak; }
float LMFLaserBluePrimDat::getAPDOverPNBRMS | ( | ) | const [inline] |
Definition at line 46 of file LMFLaserBluePrimDat.h.
References m_apdOverPNBRMS.
Referenced by writeArrayDB().
00046 { return m_apdOverPNBRMS; }
float LMFLaserBluePrimDat::getAPDOverPNMean | ( | ) | const [inline] |
Definition at line 52 of file LMFLaserBluePrimDat.h.
References m_apdOverPNMean.
Referenced by writeArrayDB().
00052 { return m_apdOverPNMean; }
float LMFLaserBluePrimDat::getAPDOverPNPeak | ( | ) | const [inline] |
Definition at line 58 of file LMFLaserBluePrimDat.h.
References m_apdOverPNPeak.
Referenced by writeArrayDB().
00058 { return m_apdOverPNPeak; }
float LMFLaserBluePrimDat::getAPDOverPNRMS | ( | ) | const [inline] |
Definition at line 55 of file LMFLaserBluePrimDat.h.
References m_apdOverPNRMS.
Referenced by writeArrayDB().
00055 { return m_apdOverPNRMS; }
float LMFLaserBluePrimDat::getBeta | ( | ) | const [inline] |
Definition at line 64 of file LMFLaserBluePrimDat.h.
References m_Beta.
Referenced by writeArrayDB().
00064 { return m_Beta; }
int LMFLaserBluePrimDat::getFlag | ( | ) | const [inline] |
Definition at line 31 of file LMFLaserBluePrimDat.h.
References m_Flag.
Referenced by writeArrayDB().
00031 { return m_Flag; }
float LMFLaserBluePrimDat::getMean | ( | ) | const [inline] |
Definition at line 22 of file LMFLaserBluePrimDat.h.
References m_Mean.
Referenced by writeArrayDB().
00022 { return m_Mean; }
float LMFLaserBluePrimDat::getPeak | ( | ) | const [inline] |
Definition at line 28 of file LMFLaserBluePrimDat.h.
References m_Peak.
Referenced by writeArrayDB().
00028 { return m_Peak; }
float LMFLaserBluePrimDat::getRMS | ( | void | ) | const [inline] |
Definition at line 25 of file LMFLaserBluePrimDat.h.
References m_RMS.
Referenced by writeArrayDB().
00025 { return m_RMS; }
float LMFLaserBluePrimDat::getShapeCor | ( | ) | const [inline] |
Definition at line 67 of file LMFLaserBluePrimDat.h.
References m_ShapeCor.
Referenced by writeArrayDB().
00067 { return m_ShapeCor; }
std::string LMFLaserBluePrimDat::getTable | ( | ) | [inline, virtual] |
void LMFLaserBluePrimDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 47 of file LMFLaserBluePrimDat.cc.
References IDBObject::checkConnection(), e, IDBObject::m_conn, and IDataItem::m_writeStmt.
00049 { 00050 this->checkConnection(); 00051 00052 try { 00053 m_writeStmt = m_conn->createStatement(); 00054 m_writeStmt->setSQL("INSERT INTO lmf_laser_blue_prim_dat (lmf_iov_id, logic_id, " 00055 "flag, mean, rms, peak, apd_over_pnA_mean, apd_over_pnA_rms, apd_over_pnA_peak, " 00056 "apd_over_pnB_mean, apd_over_pnB_rms, apd_over_pnB_peak, apd_over_pn_mean, apd_over_pn_rms, apd_over_pn_peak, " 00057 " alpha, beta, shape_cor ) " 00058 "VALUES (:1, :2, " 00059 ":3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18 )"); 00060 } catch (SQLException &e) { 00061 throw(runtime_error("LMFLaserBluePrimDat::prepareWrite(): "+e.getMessage())); 00062 } 00063 }
void LMFLaserBluePrimDat::setAlpha | ( | float | mean | ) | [inline] |
void LMFLaserBluePrimDat::setAPDOverPNAMean | ( | float | mean | ) | [inline] |
Definition at line 33 of file LMFLaserBluePrimDat.h.
References m_apdOverPNAMean.
Referenced by fetchData().
00033 { m_apdOverPNAMean = mean; }
void LMFLaserBluePrimDat::setAPDOverPNAPeak | ( | float | x | ) | [inline] |
Definition at line 39 of file LMFLaserBluePrimDat.h.
References m_apdOverPNAPeak.
Referenced by fetchData().
00039 { m_apdOverPNAPeak = x; }
void LMFLaserBluePrimDat::setAPDOverPNARMS | ( | float | RMS | ) | [inline] |
Definition at line 36 of file LMFLaserBluePrimDat.h.
References m_apdOverPNARMS.
Referenced by fetchData().
00036 { m_apdOverPNARMS = RMS; }
void LMFLaserBluePrimDat::setAPDOverPNBMean | ( | float | mean | ) | [inline] |
Definition at line 42 of file LMFLaserBluePrimDat.h.
References m_apdOverPNBMean.
Referenced by fetchData().
00042 { m_apdOverPNBMean = mean; }
void LMFLaserBluePrimDat::setAPDOverPNBPeak | ( | float | x | ) | [inline] |
Definition at line 48 of file LMFLaserBluePrimDat.h.
References m_apdOverPNBPeak.
Referenced by fetchData().
00048 { m_apdOverPNBPeak = x; }
void LMFLaserBluePrimDat::setAPDOverPNBRMS | ( | float | RMS | ) | [inline] |
Definition at line 45 of file LMFLaserBluePrimDat.h.
References m_apdOverPNBRMS.
Referenced by fetchData().
00045 { m_apdOverPNBRMS = RMS; }
void LMFLaserBluePrimDat::setAPDOverPNMean | ( | float | mean | ) | [inline] |
Definition at line 51 of file LMFLaserBluePrimDat.h.
References m_apdOverPNMean.
Referenced by fetchData().
00051 { m_apdOverPNMean = mean; }
void LMFLaserBluePrimDat::setAPDOverPNPeak | ( | float | x | ) | [inline] |
Definition at line 57 of file LMFLaserBluePrimDat.h.
References m_apdOverPNPeak.
Referenced by fetchData().
00057 { m_apdOverPNPeak = x; }
void LMFLaserBluePrimDat::setAPDOverPNRMS | ( | float | RMS | ) | [inline] |
Definition at line 54 of file LMFLaserBluePrimDat.h.
References m_apdOverPNRMS.
Referenced by fetchData().
00054 { m_apdOverPNRMS = RMS; }
void LMFLaserBluePrimDat::setBeta | ( | float | x | ) | [inline] |
void LMFLaserBluePrimDat::setMean | ( | float | mean | ) | [inline] |
void LMFLaserBluePrimDat::setPeak | ( | float | x | ) | [inline] |
void LMFLaserBluePrimDat::setRMS | ( | float | RMS | ) | [inline] |
Definition at line 24 of file LMFLaserBluePrimDat.h.
References m_RMS.
Referenced by fetchData().
00024 { m_RMS = RMS; }
void LMFLaserBluePrimDat::setShapeCor | ( | float | x | ) | [inline] |
Definition at line 66 of file LMFLaserBluePrimDat.h.
References m_ShapeCor.
Referenced by fetchData().
00066 { m_ShapeCor = x; }
void LMFLaserBluePrimDat::writeArrayDB | ( | const std::map< EcalLogicID, LMFLaserBluePrimDat > * | data, | |
LMFRunIOV * | iov | |||
) | throw (std::runtime_error) [private] |
Definition at line 107 of file LMFLaserBluePrimDat.cc.
References a, aa, DeDxTools::beta(), IDBObject::checkConnection(), IDataItem::checkPrepare(), count, data, e, getAlpha(), getAPDOverPNAMean(), getAPDOverPNAPeak(), getAPDOverPNARMS(), getAPDOverPNBMean(), getAPDOverPNBPeak(), getAPDOverPNBRMS(), getAPDOverPNMean(), getAPDOverPNPeak(), getAPDOverPNRMS(), getBeta(), getFlag(), EcalLogicID::getLogicID(), getMean(), getPeak(), getRMS(), getShapeCor(), IDataItem::m_writeStmt, p, t, tt, w, ww, x, y, and z.
00109 { 00110 this->checkConnection(); 00111 this->checkPrepare(); 00112 00113 int iovID = iov->fetchID(); 00114 if (!iovID) { throw(runtime_error("LMFLaserBluePrimDat::writeArrayDB: IOV not in DB")); } 00115 00116 00117 int nrows=data->size(); 00118 int* ids= new int[nrows]; 00119 int* iovid_vec= new int[nrows]; 00120 int* aa= new int[nrows]; 00121 float* xx= new float[nrows]; 00122 float* yy= new float[nrows]; 00123 float* zz= new float[nrows]; 00124 float* wwa= new float[nrows]; 00125 float* uua= new float[nrows]; 00126 float* tta= new float[nrows]; 00127 float* wwb= new float[nrows]; 00128 float* uub= new float[nrows]; 00129 float* ttb= new float[nrows]; 00130 float* ww= new float[nrows]; 00131 float* uu= new float[nrows]; 00132 float* tt= new float[nrows]; 00133 float* ualpha= new float[nrows]; 00134 float* ubeta= new float[nrows]; 00135 float* ushapecor= new float[nrows]; 00136 00137 ub2* ids_len= new ub2[nrows]; 00138 ub2* iov_len= new ub2[nrows]; 00139 ub2* a_len= new ub2[nrows]; 00140 ub2* x_len= new ub2[nrows]; 00141 ub2* y_len= new ub2[nrows]; 00142 ub2* z_len= new ub2[nrows]; 00143 ub2* wa_len= new ub2[nrows]; 00144 ub2* ua_len= new ub2[nrows]; 00145 ub2* ta_len= new ub2[nrows]; 00146 ub2* wb_len= new ub2[nrows]; 00147 ub2* ub_len= new ub2[nrows]; 00148 ub2* tb_len= new ub2[nrows]; 00149 ub2* w_len= new ub2[nrows]; 00150 ub2* u_len= new ub2[nrows]; 00151 ub2* t_len= new ub2[nrows]; 00152 ub2* ualpha_len= new ub2[nrows]; 00153 ub2* ubeta_len= new ub2[nrows]; 00154 ub2* ushapecor_len= new ub2[nrows]; 00155 00156 const EcalLogicID* channel; 00157 const LMFLaserBluePrimDat* dataitem; 00158 int count=0; 00159 typedef map< EcalLogicID, LMFLaserBluePrimDat >::const_iterator CI; 00160 for (CI p = data->begin(); p != data->end(); ++p) { 00161 channel = &(p->first); 00162 int logicID = channel->getLogicID(); 00163 if (!logicID) { throw(runtime_error("LMFLaserBluePrimDat::writeArrayDB: Bad EcalLogicID")); } 00164 ids[count]=logicID; 00165 iovid_vec[count]=iovID; 00166 00167 dataitem = &(p->second); 00168 // dataIface.writeDB( channel, dataitem, iov); 00169 int a=dataitem->getFlag(); 00170 float x=dataitem->getMean(); 00171 float y=dataitem->getRMS(); 00172 float z=dataitem->getPeak(); 00173 float wa=dataitem->getAPDOverPNAMean(); 00174 float ua=dataitem->getAPDOverPNARMS(); 00175 float ta=dataitem->getAPDOverPNAPeak(); 00176 float wb=dataitem->getAPDOverPNBMean(); 00177 float ub=dataitem->getAPDOverPNBRMS(); 00178 float tb=dataitem->getAPDOverPNBPeak(); 00179 float w=dataitem->getAPDOverPNMean(); 00180 float u=dataitem->getAPDOverPNRMS(); 00181 float t=dataitem->getAPDOverPNPeak(); 00182 float alpha=dataitem->getAlpha(); 00183 float beta=dataitem->getBeta(); 00184 float shapecor=dataitem->getShapeCor(); 00185 00186 00187 aa[count]=a; 00188 xx[count]=x; 00189 yy[count]=y; 00190 zz[count]=z; 00191 wwa[count]=wa; 00192 uua[count]=ua; 00193 tta[count]=ta; 00194 wwb[count]=wb; 00195 uub[count]=ub; 00196 ttb[count]=tb; 00197 ww[count]=w; 00198 uu[count]=u; 00199 tt[count]=t; 00200 ualpha[count]=alpha; 00201 ubeta[count]=beta; 00202 ushapecor[count]=shapecor; 00203 00204 ids_len[count]=sizeof(ids[count]); 00205 iov_len[count]=sizeof(iovid_vec[count]); 00206 00207 a_len[count]=sizeof(aa[count]); 00208 x_len[count]=sizeof(xx[count]); 00209 y_len[count]=sizeof(yy[count]); 00210 z_len[count]=sizeof(zz[count]); 00211 wa_len[count]=sizeof(wwa[count]); 00212 ua_len[count]=sizeof(uua[count]); 00213 ta_len[count]=sizeof(tta[count]); 00214 wb_len[count]=sizeof(wwb[count]); 00215 ub_len[count]=sizeof(uub[count]); 00216 tb_len[count]=sizeof(ttb[count]); 00217 w_len[count]=sizeof(ww[count]); 00218 u_len[count]=sizeof(uu[count]); 00219 t_len[count]=sizeof(tt[count]); 00220 ualpha_len[count]=sizeof(ualpha[count]); 00221 ubeta_len[count]=sizeof(ubeta[count]); 00222 ushapecor_len[count]=sizeof(ushapecor[count]); 00223 00224 count++; 00225 } 00226 00227 00228 try { 00229 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT, sizeof(iovid_vec[0]),iov_len); 00230 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT, sizeof(ids[0]), ids_len ); 00231 m_writeStmt->setDataBuffer(3, (dvoid*)aa, OCCIINT , sizeof(aa[0]), a_len ); 00232 m_writeStmt->setDataBuffer(4, (dvoid*)xx, OCCIFLOAT , sizeof(xx[0]), x_len ); 00233 m_writeStmt->setDataBuffer(5, (dvoid*)yy, OCCIFLOAT , sizeof(yy[0]), y_len ); 00234 m_writeStmt->setDataBuffer(6, (dvoid*)zz, OCCIFLOAT , sizeof(zz[0]), z_len ); 00235 m_writeStmt->setDataBuffer(7, (dvoid*)wwa, OCCIFLOAT , sizeof(wwa[0]), wa_len ); 00236 m_writeStmt->setDataBuffer(8, (dvoid*)uua, OCCIFLOAT , sizeof(uua[0]), ua_len ); 00237 m_writeStmt->setDataBuffer(9, (dvoid*)tta, OCCIFLOAT , sizeof(tta[0]), ta_len ); 00238 m_writeStmt->setDataBuffer(10, (dvoid*)wwb, OCCIFLOAT , sizeof(wwb[0]), wb_len ); 00239 m_writeStmt->setDataBuffer(11, (dvoid*)uub, OCCIFLOAT , sizeof(uub[0]), ub_len ); 00240 m_writeStmt->setDataBuffer(12, (dvoid*)ttb, OCCIFLOAT , sizeof(ttb[0]), tb_len ); 00241 m_writeStmt->setDataBuffer(13, (dvoid*)ww, OCCIFLOAT , sizeof(ww[0]), w_len ); 00242 m_writeStmt->setDataBuffer(14, (dvoid*)uu, OCCIFLOAT , sizeof(uu[0]), u_len ); 00243 m_writeStmt->setDataBuffer(15, (dvoid*)tt, OCCIFLOAT , sizeof(tt[0]), t_len ); 00244 m_writeStmt->setDataBuffer(16, (dvoid*)ualpha, OCCIFLOAT , sizeof(ualpha[0]), ualpha_len ); 00245 m_writeStmt->setDataBuffer(17, (dvoid*)ubeta, OCCIFLOAT , sizeof(ubeta[0]), ubeta_len ); 00246 m_writeStmt->setDataBuffer(18, (dvoid*)ushapecor, OCCIFLOAT , sizeof(ushapecor[0]), ushapecor_len ); 00247 00248 m_writeStmt->executeArrayUpdate(nrows); 00249 00250 delete [] ids; 00251 delete [] iovid_vec; 00252 delete [] aa; 00253 delete [] xx; 00254 delete [] yy; 00255 delete [] zz; 00256 delete [] ww; 00257 delete [] uu; 00258 delete [] tt; 00259 delete [] wwa; 00260 delete [] uua; 00261 delete [] tta; 00262 delete [] wwb; 00263 delete [] uub; 00264 delete [] ttb; 00265 delete [] ualpha; 00266 delete [] ubeta; 00267 delete [] ushapecor; 00268 00269 delete [] ids_len; 00270 delete [] iov_len; 00271 delete [] a_len; 00272 delete [] x_len; 00273 delete [] y_len; 00274 delete [] z_len; 00275 delete [] w_len; 00276 delete [] u_len; 00277 delete [] t_len; 00278 delete [] wa_len; 00279 delete [] ua_len; 00280 delete [] ta_len; 00281 delete [] wb_len; 00282 delete [] ub_len; 00283 delete [] tb_len; 00284 delete [] ualpha_len; 00285 delete [] ubeta_len; 00286 delete [] ushapecor_len; 00287 00288 00289 00290 00291 } catch (SQLException &e) { 00292 throw(runtime_error("LMFLaserBluePrimDat::writeArrayDB(): "+e.getMessage())); 00293 } 00294 }
void LMFLaserBluePrimDat::writeDB | ( | const EcalLogicID * | ecid, | |
const LMFLaserBluePrimDat * | item, | |||
LMFRunIOV * | iov | |||
) | throw (std::runtime_error) [private] |
Definition at line 67 of file LMFLaserBluePrimDat.cc.
References IDBObject::checkConnection(), IDataItem::checkPrepare(), e, and IDataItem::m_writeStmt.
00069 { 00070 this->checkConnection(); 00071 this->checkPrepare(); 00072 00073 int iovID = iov->fetchID(); 00074 if (!iovID) { throw(runtime_error("LMFLaserBluePrimDat::writeDB: IOV not in DB")); } 00075 00076 int logicID = ecid->getLogicID(); 00077 if (!logicID) { throw(runtime_error("LMFLaserBluePrimDat::writeDB: Bad EcalLogicID")); } 00078 00079 try { 00080 m_writeStmt->setInt(1, iovID); 00081 m_writeStmt->setInt(2, logicID); 00082 00083 m_writeStmt->setInt(3, item->getFlag() ); 00084 m_writeStmt->setFloat(4, item->getMean() ); 00085 m_writeStmt->setFloat(5, item->getRMS() ); 00086 m_writeStmt->setFloat(6, item->getPeak() ); 00087 m_writeStmt->setFloat(7, item->getAPDOverPNAMean() ); 00088 m_writeStmt->setFloat(8, item->getAPDOverPNARMS() ); 00089 m_writeStmt->setFloat(9, item->getAPDOverPNAPeak() ); 00090 m_writeStmt->setFloat(10, item->getAPDOverPNBMean() ); 00091 m_writeStmt->setFloat(11, item->getAPDOverPNBRMS() ); 00092 m_writeStmt->setFloat(12, item->getAPDOverPNBPeak() ); 00093 m_writeStmt->setFloat(13, item->getAPDOverPNMean() ); 00094 m_writeStmt->setFloat(14, item->getAPDOverPNRMS() ); 00095 m_writeStmt->setFloat(15, item->getAPDOverPNPeak() ); 00096 m_writeStmt->setFloat(16, item->getAlpha() ); 00097 m_writeStmt->setFloat(17, item->getBeta() ); 00098 m_writeStmt->setFloat(18, item->getShapeCor() ); 00099 00100 m_writeStmt->executeUpdate(); 00101 } catch (SQLException &e) { 00102 throw(runtime_error("LMFLaserBluePrimDat::writeDB(): "+e.getMessage())); 00103 } 00104 }
friend class EcalCondDBInterface [friend] |
float LMFLaserBluePrimDat::m_Alpha [private] |
Definition at line 99 of file LMFLaserBluePrimDat.h.
Referenced by getAlpha(), LMFLaserBluePrimDat(), and setAlpha().
float LMFLaserBluePrimDat::m_apdOverPNAMean [private] |
Definition at line 90 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNAMean(), LMFLaserBluePrimDat(), and setAPDOverPNAMean().
float LMFLaserBluePrimDat::m_apdOverPNAPeak [private] |
Definition at line 92 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNAPeak(), LMFLaserBluePrimDat(), and setAPDOverPNAPeak().
float LMFLaserBluePrimDat::m_apdOverPNARMS [private] |
Definition at line 91 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNARMS(), LMFLaserBluePrimDat(), and setAPDOverPNARMS().
float LMFLaserBluePrimDat::m_apdOverPNBMean [private] |
Definition at line 93 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNBMean(), LMFLaserBluePrimDat(), and setAPDOverPNBMean().
float LMFLaserBluePrimDat::m_apdOverPNBPeak [private] |
Definition at line 95 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNBPeak(), LMFLaserBluePrimDat(), and setAPDOverPNBPeak().
float LMFLaserBluePrimDat::m_apdOverPNBRMS [private] |
Definition at line 94 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNBRMS(), LMFLaserBluePrimDat(), and setAPDOverPNBRMS().
float LMFLaserBluePrimDat::m_apdOverPNMean [private] |
Definition at line 96 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNMean(), LMFLaserBluePrimDat(), and setAPDOverPNMean().
float LMFLaserBluePrimDat::m_apdOverPNPeak [private] |
Definition at line 98 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNPeak(), LMFLaserBluePrimDat(), and setAPDOverPNPeak().
float LMFLaserBluePrimDat::m_apdOverPNRMS [private] |
Definition at line 97 of file LMFLaserBluePrimDat.h.
Referenced by getAPDOverPNRMS(), LMFLaserBluePrimDat(), and setAPDOverPNRMS().
float LMFLaserBluePrimDat::m_Beta [private] |
Definition at line 100 of file LMFLaserBluePrimDat.h.
Referenced by getBeta(), LMFLaserBluePrimDat(), and setBeta().
int LMFLaserBluePrimDat::m_Flag [private] |
Definition at line 89 of file LMFLaserBluePrimDat.h.
Referenced by getFlag(), LMFLaserBluePrimDat(), and setFlag().
float LMFLaserBluePrimDat::m_Mean [private] |
Definition at line 86 of file LMFLaserBluePrimDat.h.
Referenced by getMean(), LMFLaserBluePrimDat(), and setMean().
float LMFLaserBluePrimDat::m_Peak [private] |
Definition at line 88 of file LMFLaserBluePrimDat.h.
Referenced by getPeak(), LMFLaserBluePrimDat(), and setPeak().
float LMFLaserBluePrimDat::m_RMS [private] |
Definition at line 87 of file LMFLaserBluePrimDat.h.
Referenced by getRMS(), LMFLaserBluePrimDat(), and setRMS().
float LMFLaserBluePrimDat::m_ShapeCor [private] |
Definition at line 101 of file LMFLaserBluePrimDat.h.
Referenced by getShapeCor(), LMFLaserBluePrimDat(), and setShapeCor().