CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
MonPNLed1Dat Class Reference

#include <MonPNLed1Dat.h>

Inheritance diagram for MonPNLed1Dat:
IDataItem IDBObject

Public Member Functions

float getADCMeanG1 () const
 
float getADCMeanG16 () const
 
float getADCRMSG1 () const
 
float getADCRMSG16 () const
 
float getPedMeanG1 () const
 
float getPedMeanG16 () const
 
float getPedRMSG1 () const
 
float getPedRMSG16 () const
 
std::string getTable ()
 
bool getTaskStatus () const
 
 MonPNLed1Dat ()
 
void setADCMeanG1 (float mean)
 
void setADCMeanG16 (float mean)
 
void setADCRMSG1 (float mean)
 
void setADCRMSG16 (float mean)
 
void setPedMeanG1 (float mean)
 
void setPedMeanG16 (float mean)
 
void setPedRMSG1 (float mean)
 
void setPedRMSG16 (float mean)
 
void setTaskStatus (bool status)
 
 ~MonPNLed1Dat ()
 
- Public Member Functions inherited from IDataItem
 IDataItem ()
 
- Public Member Functions inherited from IDBObject
oracle::occi::Connection * getConn () const
 
oracle::occi::Environment * getEnv () const
 
void setConnection (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
virtual ~IDBObject ()
 

Private Member Functions

void fetchData (std::map< EcalLogicID, MonPNLed1Dat > *fillVec, MonRunIOV *iov) throw (std::runtime_error)
 
void prepareWrite () throw (std::runtime_error)
 
void writeArrayDB (const std::map< EcalLogicID, MonPNLed1Dat > *data, MonRunIOV *iov) throw (std::runtime_error)
 
void writeDB (const EcalLogicID *ecid, const MonPNLed1Dat *item, MonRunIOV *iov) throw (std::runtime_error)
 

Private Attributes

float m_adcMeanG1
 
float m_adcMeanG16
 
float m_adcRMSG1
 
float m_adcRMSG16
 
float m_pedMeanG1
 
float m_pedMeanG16
 
float m_pedRMSG1
 
float m_pedRMSG16
 
bool m_taskStatus
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS =1024
 
- Protected Member Functions inherited from IDataItem
void checkPrepare () throw (std::runtime_error)
 
void createReadStatement () throw (std::runtime_error)
 
void setPrefetchRowCount (int ncount) throw (std::runtime_error)
 
void terminateReadStatement () throw (std::runtime_error)
 
void terminateWriteStatement () throw (std::runtime_error)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const throw (std::runtime_error)
 
- Protected Attributes inherited from IDataItem
oracle::occi::Statement * m_readStmt
 
oracle::occi::Statement * m_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 12 of file MonPNLed1Dat.h.

Constructor & Destructor Documentation

MonPNLed1Dat::MonPNLed1Dat ( )

Definition at line 12 of file MonPNLed1Dat.cc.

References NULL.

13 {
14  m_env = NULL;
15  m_conn = NULL;
16  m_writeStmt = NULL;
17  m_readStmt = NULL;
18 
19  m_adcMeanG1 =0;
20  m_adcRMSG1 = 0;
21  m_adcMeanG16 = 0;
22  m_adcRMSG16 = 0;
23  m_pedMeanG1 = 0;
24  m_pedRMSG1 = 0;
25  m_pedMeanG16 = 0;
26  m_pedRMSG16 = 0;
27  m_taskStatus = 0;
28 }
float m_pedRMSG16
Definition: MonPNLed1Dat.h:69
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
float m_adcRMSG1
Definition: MonPNLed1Dat.h:63
float m_adcRMSG16
Definition: MonPNLed1Dat.h:65
float m_adcMeanG16
Definition: MonPNLed1Dat.h:64
#define NULL
Definition: scimark2.h:8
float m_adcMeanG1
Definition: MonPNLed1Dat.h:62
bool m_taskStatus
Definition: MonPNLed1Dat.h:70
float m_pedRMSG1
Definition: MonPNLed1Dat.h:67
float m_pedMeanG1
Definition: MonPNLed1Dat.h:66
float m_pedMeanG16
Definition: MonPNLed1Dat.h:68
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
MonPNLed1Dat::~MonPNLed1Dat ( )

Definition at line 32 of file MonPNLed1Dat.cc.

33 {
34 }

Member Function Documentation

void MonPNLed1Dat::fetchData ( std::map< EcalLogicID, MonPNLed1Dat > *  fillVec,
MonRunIOV iov 
)
throw (std::runtime_error
)
private

Definition at line 90 of file MonPNLed1Dat.cc.

References alignCSCRings::e, o2o::iov, AlCaHLTBitMon_ParallelJobs::p, setADCMeanG1(), setADCMeanG16(), setADCRMSG1(), setADCRMSG16(), setPedMeanG1(), setPedMeanG16(), setPedRMSG1(), setPedRMSG16(), and setTaskStatus().

92 {
93  this->checkConnection();
94  fillMap->clear();
95 
96  iov->setConnection(m_env, m_conn);
97  int iovID = iov->fetchID();
98  if (!iovID) {
99  // throw(std::runtime_error("MonPNLed1Dat::writeDB: IOV not in DB"));
100  return;
101  }
102 
103  try {
104 
105  m_readStmt->setSQL("SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
106  "d.adc_mean_g1, d.adc_rms_g1, d.adc_mean_g16, d.adc_rms_g16, d.ped_mean_g1,d.ped_rms_g1, d.ped_mean_g16, d.ped_rms_g16, d.task_status "
107  "FROM channelview cv JOIN mon_pn_led1_dat d "
108  "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
109  "WHERE d.iov_id = :iov_id");
110  m_readStmt->setInt(1, iovID);
111  ResultSet* rset = m_readStmt->executeQuery();
112 
113  std::pair< EcalLogicID, MonPNLed1Dat > p;
114  MonPNLed1Dat dat;
115  while(rset->next()) {
116  p.first = EcalLogicID( rset->getString(1), // name
117  rset->getInt(2), // logic_id
118  rset->getInt(3), // id1
119  rset->getInt(4), // id2
120  rset->getInt(5), // id3
121  rset->getString(6)); // maps_to
122 
123  dat.setADCMeanG1( rset->getFloat(7) );
124  dat.setADCRMSG1( rset->getFloat(8) );
125  dat.setADCMeanG16( rset->getFloat(9) );
126  dat.setADCRMSG16( rset->getFloat(10) );
127  dat.setPedMeanG1( rset->getFloat(11) );
128  dat.setPedRMSG1( rset->getFloat(12) );
129  dat.setPedMeanG16( rset->getFloat(13) );
130  dat.setPedRMSG16( rset->getFloat(14) );
131  dat.setTaskStatus( rset->getInt(15) );
132  p.second = dat;
133  fillMap->insert(p);
134  }
135  } catch (SQLException &e) {
136  throw(std::runtime_error("MonPNLed1Dat::fetchData(): "+e.getMessage()));
137  }
138 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
void setPedRMSG1(float mean)
Definition: MonPNLed1Dat.h:36
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
void setPedMeanG1(float mean)
Definition: MonPNLed1Dat.h:33
int fetchID()
Definition: MonRunIOV.cc:118
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
void setADCRMSG16(float mean)
Definition: MonPNLed1Dat.h:30
void setADCMeanG16(float mean)
Definition: MonPNLed1Dat.h:27
void setTaskStatus(bool status)
Definition: MonPNLed1Dat.h:45
void setADCRMSG1(float mean)
Definition: MonPNLed1Dat.h:24
void setPedMeanG16(float mean)
Definition: MonPNLed1Dat.h:39
void setPedRMSG16(float mean)
Definition: MonPNLed1Dat.h:42
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
void setADCMeanG1(float mean)
Definition: MonPNLed1Dat.h:21
oracle::occi::ResultSet ResultSet
Definition: HcalDbOmds.cc:26
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
void checkConnection() const
Definition: IDBObject.h:41
float MonPNLed1Dat::getADCMeanG1 ( ) const
inline

Definition at line 22 of file MonPNLed1Dat.h.

References m_adcMeanG1.

Referenced by writeArrayDB().

22 { return m_adcMeanG1; }
float m_adcMeanG1
Definition: MonPNLed1Dat.h:62
float MonPNLed1Dat::getADCMeanG16 ( ) const
inline

Definition at line 28 of file MonPNLed1Dat.h.

References m_adcMeanG16.

Referenced by writeArrayDB().

28 { return m_adcMeanG16; }
float m_adcMeanG16
Definition: MonPNLed1Dat.h:64
float MonPNLed1Dat::getADCRMSG1 ( ) const
inline

Definition at line 25 of file MonPNLed1Dat.h.

References m_adcRMSG1.

Referenced by writeArrayDB().

25 { return m_adcRMSG1; }
float m_adcRMSG1
Definition: MonPNLed1Dat.h:63
float MonPNLed1Dat::getADCRMSG16 ( ) const
inline

Definition at line 31 of file MonPNLed1Dat.h.

References m_adcRMSG16.

Referenced by writeArrayDB().

31 { return m_adcRMSG16; }
float m_adcRMSG16
Definition: MonPNLed1Dat.h:65
float MonPNLed1Dat::getPedMeanG1 ( ) const
inline

Definition at line 34 of file MonPNLed1Dat.h.

References m_pedMeanG1.

Referenced by writeArrayDB().

34 { return m_pedMeanG1; }
float m_pedMeanG1
Definition: MonPNLed1Dat.h:66
float MonPNLed1Dat::getPedMeanG16 ( ) const
inline

Definition at line 40 of file MonPNLed1Dat.h.

References m_pedMeanG16.

Referenced by writeArrayDB().

40 { return m_pedMeanG16; }
float m_pedMeanG16
Definition: MonPNLed1Dat.h:68
float MonPNLed1Dat::getPedRMSG1 ( ) const
inline

Definition at line 37 of file MonPNLed1Dat.h.

References m_pedRMSG1.

Referenced by writeArrayDB().

37 { return m_pedRMSG1; }
float m_pedRMSG1
Definition: MonPNLed1Dat.h:67
float MonPNLed1Dat::getPedRMSG16 ( ) const
inline

Definition at line 43 of file MonPNLed1Dat.h.

References m_pedRMSG16.

Referenced by writeArrayDB().

43 { return m_pedRMSG16; }
float m_pedRMSG16
Definition: MonPNLed1Dat.h:69
std::string MonPNLed1Dat::getTable ( )
inlinevirtual

Implements IDataItem.

Definition at line 19 of file MonPNLed1Dat.h.

19 { return "MON_PN_LED1_DAT"; }
bool MonPNLed1Dat::getTaskStatus ( ) const
inline

Definition at line 46 of file MonPNLed1Dat.h.

References m_taskStatus.

Referenced by writeArrayDB().

46 { return m_taskStatus; }
bool m_taskStatus
Definition: MonPNLed1Dat.h:70
void MonPNLed1Dat::prepareWrite ( )
throw (std::runtime_error
)
privatevirtual

Implements IDataItem.

Definition at line 38 of file MonPNLed1Dat.cc.

References alignCSCRings::e.

40 {
41  this->checkConnection();
42 
43  try {
44  m_writeStmt = m_conn->createStatement();
45  m_writeStmt->setSQL("INSERT INTO mon_pn_led1_dat (iov_id, logic_id, "
46  "adc_mean_g1, adc_rms_g1, adc_mean_g16, adc_rms_g16, ped_mean_g1, ped_rms_g1, ped_mean_g16, ped_rms_g16, task_status) "
47  "VALUES (:iov_id, :logic_id, "
48  ":3, :4, :5, :6, :7, :8, :9, :10, :11)");
49  } catch (SQLException &e) {
50  throw(std::runtime_error("MonPNLed1Dat::prepareWrite(): "+e.getMessage()));
51  }
52 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
void checkConnection() const
Definition: IDBObject.h:41
void MonPNLed1Dat::setADCMeanG1 ( float  mean)
inline

Definition at line 21 of file MonPNLed1Dat.h.

References m_adcMeanG1, and timingPdfMaker::mean.

Referenced by fetchData().

21 { m_adcMeanG1 = mean; }
float m_adcMeanG1
Definition: MonPNLed1Dat.h:62
void MonPNLed1Dat::setADCMeanG16 ( float  mean)
inline

Definition at line 27 of file MonPNLed1Dat.h.

References m_adcMeanG16, and timingPdfMaker::mean.

Referenced by fetchData().

27 { m_adcMeanG16 = mean; }
float m_adcMeanG16
Definition: MonPNLed1Dat.h:64
void MonPNLed1Dat::setADCRMSG1 ( float  mean)
inline

Definition at line 24 of file MonPNLed1Dat.h.

References m_adcRMSG1, and timingPdfMaker::mean.

Referenced by fetchData().

24 { m_adcRMSG1 = mean; }
float m_adcRMSG1
Definition: MonPNLed1Dat.h:63
void MonPNLed1Dat::setADCRMSG16 ( float  mean)
inline

Definition at line 30 of file MonPNLed1Dat.h.

References m_adcRMSG16, and timingPdfMaker::mean.

Referenced by fetchData().

30 { m_adcRMSG16 = mean; }
float m_adcRMSG16
Definition: MonPNLed1Dat.h:65
void MonPNLed1Dat::setPedMeanG1 ( float  mean)
inline

Definition at line 33 of file MonPNLed1Dat.h.

References m_pedMeanG1, and timingPdfMaker::mean.

Referenced by fetchData().

33 { m_pedMeanG1 = mean; }
float m_pedMeanG1
Definition: MonPNLed1Dat.h:66
void MonPNLed1Dat::setPedMeanG16 ( float  mean)
inline

Definition at line 39 of file MonPNLed1Dat.h.

References m_pedMeanG16, and timingPdfMaker::mean.

Referenced by fetchData().

39 { m_pedMeanG16 = mean; }
float m_pedMeanG16
Definition: MonPNLed1Dat.h:68
void MonPNLed1Dat::setPedRMSG1 ( float  mean)
inline

Definition at line 36 of file MonPNLed1Dat.h.

References m_pedRMSG1, and timingPdfMaker::mean.

Referenced by fetchData().

36 { m_pedRMSG1 = mean; }
float m_pedRMSG1
Definition: MonPNLed1Dat.h:67
void MonPNLed1Dat::setPedRMSG16 ( float  mean)
inline

Definition at line 42 of file MonPNLed1Dat.h.

References m_pedRMSG16, and timingPdfMaker::mean.

Referenced by fetchData().

42 { m_pedRMSG16 = mean; }
float m_pedRMSG16
Definition: MonPNLed1Dat.h:69
void MonPNLed1Dat::setTaskStatus ( bool  status)
inline

Definition at line 45 of file MonPNLed1Dat.h.

References m_taskStatus, and ntuplemaker::status.

Referenced by fetchData().

45 { m_taskStatus = status; }
bool m_taskStatus
Definition: MonPNLed1Dat.h:70
tuple status
Definition: ntuplemaker.py:245
void MonPNLed1Dat::writeArrayDB ( const std::map< EcalLogicID, MonPNLed1Dat > *  data,
MonRunIOV iov 
)
throw (std::runtime_error
)
private

Definition at line 140 of file MonPNLed1Dat.cc.

References prof2calltree::count, data, alignCSCRings::e, getADCMeanG1(), getADCMeanG16(), getADCRMSG1(), getADCRMSG16(), EcalLogicID::getLogicID(), getPedMeanG1(), getPedMeanG16(), getPedRMSG1(), getPedRMSG16(), getTaskStatus(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, pi, createTree::pp, alignCSCRings::r, findQualityFiles::rr, edmStreamStallGrapher::t, groupFilesInBlocks::tt, w(), x, detailsBasic3DVector::y, and detailsBasic3DVector::z.

142 {
143  this->checkConnection();
144  this->checkPrepare();
145 
146  int iovID = iov->fetchID();
147  if (!iovID) { throw(std::runtime_error("MonPNLed1Dat::writeArrayDB: IOV not in DB")); }
148 
149 
150  int nrows=data->size();
151  int* ids= new int[nrows];
152  int* iovid_vec= new int[nrows];
153  float* xx= new float[nrows];
154  float* yy= new float[nrows];
155  float* zz= new float[nrows];
156  float* ww= new float[nrows];
157  float* uu= new float[nrows];
158  float* tt= new float[nrows];
159  float* rr= new float[nrows];
160  float* pp= new float[nrows];
161  int* st= new int[nrows];
162 
163  ub2* ids_len= new ub2[nrows];
164  ub2* iov_len= new ub2[nrows];
165  ub2* x_len= new ub2[nrows];
166  ub2* y_len= new ub2[nrows];
167  ub2* z_len= new ub2[nrows];
168  ub2* w_len= new ub2[nrows];
169  ub2* u_len= new ub2[nrows];
170  ub2* t_len= new ub2[nrows];
171  ub2* r_len= new ub2[nrows];
172  ub2* p_len= new ub2[nrows];
173  ub2* st_len= new ub2[nrows];
174 
175  const EcalLogicID* channel;
176  const MonPNLed1Dat* dataitem;
177  int count=0;
178  typedef map< EcalLogicID, MonPNLed1Dat >::const_iterator CI;
179  for (CI p = data->begin(); p != data->end(); ++p) {
180  channel = &(p->first);
181  int logicID = channel->getLogicID();
182  if (!logicID) { throw(std::runtime_error("MonPNLed1Dat::writeArrayDB: Bad EcalLogicID")); }
183  ids[count]=logicID;
184  iovid_vec[count]=iovID;
185 
186  dataitem = &(p->second);
187  // dataIface.writeDB( channel, dataitem, iov);
188  float x=dataitem->getADCMeanG1();
189  float y=dataitem->getADCRMSG1();
190  float z=dataitem->getADCMeanG16();
191  float w=dataitem->getADCRMSG16();
192  float u=dataitem->getPedMeanG1();
193  float t=dataitem->getPedRMSG1();
194  float r=dataitem->getPedMeanG16();
195  float pi=dataitem->getPedRMSG16();
196  int statu=dataitem->getTaskStatus();
197 
198 
199 
200  xx[count]=x;
201  yy[count]=y;
202  zz[count]=z;
203  ww[count]=w;
204  uu[count]=u;
205  tt[count]=t;
206  rr[count]=r;
207  pp[count]=pi;
208  st[count]=statu;
209 
210 
211  ids_len[count]=sizeof(ids[count]);
212  iov_len[count]=sizeof(iovid_vec[count]);
213 
214  x_len[count]=sizeof(xx[count]);
215  y_len[count]=sizeof(yy[count]);
216  z_len[count]=sizeof(zz[count]);
217  w_len[count]=sizeof(ww[count]);
218  u_len[count]=sizeof(uu[count]);
219  t_len[count]=sizeof(tt[count]);
220  r_len[count]=sizeof(rr[count]);
221  p_len[count]=sizeof(pp[count]);
222  st_len[count]=sizeof(st[count]);
223 
224  count++;
225  }
226 
227 
228  try {
229  m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT, sizeof(iovid_vec[0]),iov_len);
230  m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT, sizeof(ids[0]), ids_len );
231  m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT , sizeof(xx[0]), x_len );
232  m_writeStmt->setDataBuffer(4, (dvoid*)yy, OCCIFLOAT , sizeof(yy[0]), y_len );
233  m_writeStmt->setDataBuffer(5, (dvoid*)zz, OCCIFLOAT , sizeof(zz[0]), z_len );
234  m_writeStmt->setDataBuffer(6, (dvoid*)ww, OCCIFLOAT , sizeof(ww[0]), w_len );
235  m_writeStmt->setDataBuffer(7, (dvoid*)uu, OCCIFLOAT , sizeof(uu[0]), u_len );
236  m_writeStmt->setDataBuffer(8, (dvoid*)tt, OCCIFLOAT , sizeof(tt[0]), t_len );
237  m_writeStmt->setDataBuffer(9, (dvoid*)rr, OCCIFLOAT , sizeof(rr[0]), r_len );
238  m_writeStmt->setDataBuffer(10, (dvoid*)pp, OCCIFLOAT , sizeof(pp[0]), p_len );
239  m_writeStmt->setDataBuffer(11, (dvoid*)st, OCCIINT , sizeof(st[0]), st_len );
240 
241 
242  m_writeStmt->executeArrayUpdate(nrows);
243 
244  delete [] ids;
245  delete [] iovid_vec;
246  delete [] xx;
247  delete [] yy;
248  delete [] zz;
249  delete [] ww;
250  delete [] uu;
251  delete [] tt;
252  delete [] rr;
253  delete [] pp;
254  delete [] st;
255 
256  delete [] ids_len;
257  delete [] iov_len;
258  delete [] x_len;
259  delete [] y_len;
260  delete [] z_len;
261  delete [] w_len;
262  delete [] u_len;
263  delete [] t_len;
264  delete [] r_len;
265  delete [] p_len;
266  delete [] st_len;
267 
268 
269 
270  } catch (SQLException &e) {
271  throw(std::runtime_error("MonPNLed1Dat::writeArrayDB(): "+e.getMessage()));
272  }
273 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
float getADCMeanG16() const
Definition: MonPNLed1Dat.h:28
float getPedRMSG16() const
Definition: MonPNLed1Dat.h:43
tuple pp
Definition: createTree.py:15
float getADCRMSG1() const
Definition: MonPNLed1Dat.h:25
int fetchID()
Definition: MonRunIOV.cc:118
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
float float float z
float getPedMeanG1() const
Definition: MonPNLed1Dat.h:34
float getADCRMSG16() const
Definition: MonPNLed1Dat.h:31
const Double_t pi
float getPedRMSG1() const
Definition: MonPNLed1Dat.h:37
float getPedMeanG16() const
Definition: MonPNLed1Dat.h:40
int getLogicID() const
Definition: EcalLogicID.cc:41
bool getTaskStatus() const
Definition: MonPNLed1Dat.h:46
void checkPrepare()
Definition: IDataItem.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
T w() const
Definition: DDAxes.h:10
float getADCMeanG1() const
Definition: MonPNLed1Dat.h:22
void checkConnection() const
Definition: IDBObject.h:41
void MonPNLed1Dat::writeDB ( const EcalLogicID ecid,
const MonPNLed1Dat item,
MonRunIOV iov 
)
throw (std::runtime_error
)
private

Definition at line 56 of file MonPNLed1Dat.cc.

References alignCSCRings::e, and o2o::iov.

58 {
59  this->checkConnection();
60  this->checkPrepare();
61 
62  int iovID = iov->fetchID();
63  if (!iovID) { throw(std::runtime_error("MonPNLed1Dat::writeDB: IOV not in DB")); }
64 
65  int logicID = ecid->getLogicID();
66  if (!logicID) { throw(std::runtime_error("MonPNLed1Dat::writeDB: Bad EcalLogicID")); }
67 
68  try {
69  m_writeStmt->setInt(1, iovID);
70  m_writeStmt->setInt(2, logicID);
71 
72  m_writeStmt->setFloat(3, item->getADCMeanG1() );
73  m_writeStmt->setFloat(4, item->getADCRMSG1() );
74  m_writeStmt->setFloat(5, item->getADCMeanG16() );
75  m_writeStmt->setFloat(6, item->getADCRMSG16() );
76  m_writeStmt->setFloat(7, item->getPedMeanG1() );
77  m_writeStmt->setFloat(8, item->getPedRMSG1() );
78  m_writeStmt->setFloat(9, item->getPedMeanG16() );
79  m_writeStmt->setFloat(10, item->getPedRMSG16() );
80  m_writeStmt->setInt(11, item->getTaskStatus() );
81 
82  m_writeStmt->executeUpdate();
83  } catch (SQLException &e) {
84  throw(std::runtime_error("MonPNLed1Dat::writeDB(): "+e.getMessage()));
85  }
86 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
float getADCMeanG16() const
Definition: MonPNLed1Dat.h:28
float getPedRMSG16() const
Definition: MonPNLed1Dat.h:43
float getADCRMSG1() const
Definition: MonPNLed1Dat.h:25
int fetchID()
Definition: MonRunIOV.cc:118
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
float getPedMeanG1() const
Definition: MonPNLed1Dat.h:34
float getADCRMSG16() const
Definition: MonPNLed1Dat.h:31
float getPedRMSG1() const
Definition: MonPNLed1Dat.h:37
float getPedMeanG16() const
Definition: MonPNLed1Dat.h:40
int getLogicID() const
Definition: EcalLogicID.cc:41
bool getTaskStatus() const
Definition: MonPNLed1Dat.h:46
void checkPrepare()
Definition: IDataItem.h:31
float getADCMeanG1() const
Definition: MonPNLed1Dat.h:22
void checkConnection() const
Definition: IDBObject.h:41

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 14 of file MonPNLed1Dat.h.

Member Data Documentation

float MonPNLed1Dat::m_adcMeanG1
private

Definition at line 62 of file MonPNLed1Dat.h.

Referenced by getADCMeanG1(), and setADCMeanG1().

float MonPNLed1Dat::m_adcMeanG16
private

Definition at line 64 of file MonPNLed1Dat.h.

Referenced by getADCMeanG16(), and setADCMeanG16().

float MonPNLed1Dat::m_adcRMSG1
private

Definition at line 63 of file MonPNLed1Dat.h.

Referenced by getADCRMSG1(), and setADCRMSG1().

float MonPNLed1Dat::m_adcRMSG16
private

Definition at line 65 of file MonPNLed1Dat.h.

Referenced by getADCRMSG16(), and setADCRMSG16().

float MonPNLed1Dat::m_pedMeanG1
private

Definition at line 66 of file MonPNLed1Dat.h.

Referenced by getPedMeanG1(), and setPedMeanG1().

float MonPNLed1Dat::m_pedMeanG16
private

Definition at line 68 of file MonPNLed1Dat.h.

Referenced by getPedMeanG16(), and setPedMeanG16().

float MonPNLed1Dat::m_pedRMSG1
private

Definition at line 67 of file MonPNLed1Dat.h.

Referenced by getPedRMSG1(), and setPedRMSG1().

float MonPNLed1Dat::m_pedRMSG16
private

Definition at line 69 of file MonPNLed1Dat.h.

Referenced by getPedRMSG16(), and setPedRMSG16().

bool MonPNLed1Dat::m_taskStatus
private

Definition at line 70 of file MonPNLed1Dat.h.

Referenced by getTaskStatus(), and setTaskStatus().