CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
ODWeightsDat Class Reference

#include <ODWeightsDat.h>

Inheritance diagram for ODWeightsDat:
IODConfig IDBObject

Public Member Functions

int getCrystalId () const
 
int getFedId () const
 
int getId () const
 
int getSMId () const
 
std::string getTable ()
 
int getTTId () const
 
std::vector< std::vector< float > > getWeight () const
 
float getWeight0 () const
 
float getWeight1 () const
 
float getWeight2 () const
 
float getWeight3 () const
 
float getWeight4 () const
 
float getWeight5 () const
 
 ODWeightsDat ()
 
void setCrystalId (int dac)
 
void setFedId (int dac)
 
void setId (int dac)
 
void setSMId (int dac)
 
void setTTId (int dac)
 
void setWeight (int pos, float x)
 
void setWeight0 (float x)
 
void setWeight1 (float x)
 
void setWeight2 (float x)
 
void setWeight3 (float x)
 
void setWeight4 (float x)
 
void setWeight5 (float x)
 
 ~ODWeightsDat ()
 
- Public Member Functions inherited from IODConfig
std::string getConfigTag ()
 
void setConfigTag (std::string x)
 
- 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 clear ()
 
void fetchData (std::vector< ODWeightsDat > *fillMap, ODFEWeightsInfo *iov) noexcept(false)
 
void fetchData (ODWeightsDat *p) noexcept(false)
 
void prepareWrite () noexcept(false)
 
void writeArrayDB (const std::vector< ODWeightsDat > &data, ODFEWeightsInfo *iov) noexcept(false)
 
void writeDB (const ODWeightsDat *item, ODFEWeightsInfo *iov) noexcept(false)
 

Private Attributes

std::vector< std::vector< float > > dccw
 
int m_fed
 
int m_ID
 
int m_sm
 
int m_tt
 
float m_wei [6]
 
float m_wei0
 
float m_wei1
 
float m_wei2
 
float m_wei3
 
float m_wei4
 
float m_wei5
 
int m_xt
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Public Types inherited from IODConfig
typedef oracle::occi::Clob Clob
 
typedef oracle::occi::SQLException SQLException
 
typedef oracle::occi::Statement Statement
 
typedef oracle::occi::Stream Stream
 
- Public Attributes inherited from IODConfig
std::string m_config_tag
 
- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS =1024
 
- Protected Member Functions inherited from IODConfig
void checkPrepare () noexcept(false)
 
void createReadStatement () noexcept(false)
 
void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
 
unsigned char * readClob (Clob &clob, int size) noexcept(false)
 
void setPrefetchRowCount (int ncount) noexcept(false)
 
void terminateReadStatement () noexcept(false)
 
void terminateWriteStatement () noexcept(false)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const noexcept(false)
 
- Protected Attributes inherited from IODConfig
Statementm_readStmt
 
Statementm_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 12 of file ODWeightsDat.h.

Constructor & Destructor Documentation

ODWeightsDat::ODWeightsDat ( )

Definition at line 10 of file ODWeightsDat.cc.

References NULL.

11 {
12  m_env = NULL;
13  m_conn = NULL;
14  m_writeStmt = NULL;
15  m_readStmt = NULL;
16 
17  m_sm = 0;
18  m_fed = 0;
19  m_tt = 0;
20  m_xt = 0;
21 
22 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
Statement * m_writeStmt
Definition: IODConfig.h:36
#define NULL
Definition: scimark2.h:8
Statement * m_readStmt
Definition: IODConfig.h:37
ODWeightsDat::~ODWeightsDat ( )

Definition at line 26 of file ODWeightsDat.cc.

27 {
28 }

Member Function Documentation

void ODWeightsDat::clear ( void  )
private

Definition at line 30 of file ODWeightsDat.cc.

Referenced by getWeight().

30  {
31  m_sm = 0;
32  m_fed = 0;
33  m_tt = 0;
34  m_xt = 0;
35  m_wei0 = 0;
36  m_wei1 = 0;
37  m_wei2 = 0;
38  m_wei3 = 0;
39  m_wei4 = 0;
40  m_wei5 = 0;
41 }
void ODWeightsDat::fetchData ( std::vector< ODWeightsDat > *  fillMap,
ODFEWeightsInfo iov 
)
privatenoexcept

Definition at line 87 of file ODWeightsDat.cc.

References gather_cfg::cout, MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setCrystalId(), setFedId(), setSMId(), setTTId(), and setWeight().

Referenced by getWeight().

89 {
90  this->checkConnection();
91 
92  iov->setConnection(m_env, m_conn);
93  int iovID = iov->fetchID();
94  if (!iovID) {
95  std::cout <<"ID not in the DB"<< endl;
96  return;
97  }
98 
99  try {
100  m_readStmt->setSQL("SELECT * FROM " + getTable() + " WHERE rec_id = :rec_id order by sm_id, fed_id, tt_id, cry_id");
101  m_readStmt->setInt(1, iovID);
102  ResultSet* rset = m_readStmt->executeQuery();
103 
104  // std::vector< ODWeightsDat > p;
105  ODWeightsDat dat;
106  while(rset->next()) {
107  // dat.setId( rset->getInt(1) );
108  dat.setSMId( rset->getInt(2) );
109  dat.setFedId( rset->getInt(3) );
110  dat.setTTId( rset->getInt(4) );
111  dat.setCrystalId( rset->getInt(5) );
112  /*
113  dat.setWeight0( rset->getFloat(6) );
114  dat.setWeight1( rset->getFloat(7) );
115  dat.setWeight2( rset->getFloat(8) );
116  dat.setWeight3( rset->getFloat(9) );
117  dat.setWeight4( rset->getFloat(10) );
118  dat.setWeight5( rset->getFloat(11) );
119  */
120  p->push_back( dat);
121  for(int iwei = 0; iwei < 6; iwei++) {
122  dat.setWeight(iwei, rset->getFloat(6 + iwei) );
123  }
124  std::vector<float> dccwei( m_wei, m_wei+6);
125  dccw.push_back(dccwei); // vector vector
126 
127  }
128 
129 
130  } catch (SQLException &e) {
131  throw(std::runtime_error("ODWeightsDat::fetchData(): "+e.getMessage()));
132  }
133 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
std::string getTable()
Definition: ODWeightsDat.h:19
void setSMId(int dac)
Definition: ODWeightsDat.h:24
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
void setWeight(int pos, float x)
Definition: ODWeightsDat.h:43
float m_wei[6]
Definition: ODWeightsDat.h:85
int fetchID() noexcept(false)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void setTTId(int dac)
Definition: ODWeightsDat.h:30
void setCrystalId(int dac)
Definition: ODWeightsDat.h:33
std::vector< std::vector< float > > dccw
Definition: ODWeightsDat.h:86
oracle::occi::ResultSet ResultSet
Definition: HcalDbOmds.cc:26
Statement * m_readStmt
Definition: IODConfig.h:37
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
void setFedId(int dac)
Definition: ODWeightsDat.h:27
void ODWeightsDat::fetchData ( ODWeightsDat p)
privatenoexcept

Definition at line 135 of file ODWeightsDat.cc.

References gather_cfg::cout, MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_ParallelJobs::p.

137 {
138  this->checkConnection();
139 
140  try {
141  m_readStmt->setSQL("SELECT * FROM " + getTable() + " WHERE rec_id = :1 order by sm_id, fed_id, tt_id, cry_id");
142  m_readStmt->setInt(1, p->getId());
143  ResultSet* rset = m_readStmt->executeQuery();
144 
145  int row = 0;
146  while(rset->next()) {
147  row++;
148  p->setSMId( rset->getInt(2) );
149  p->setFedId( rset->getInt(3) );
150  p->setTTId( rset->getInt(4) );
151  p->setCrystalId( rset->getInt(5) );
152  for(int iwei = 0; iwei < 6; iwei++) {
153  p->setWeight(iwei, rset->getFloat(6 + iwei) );
154  }
155  std::vector<float> dccwei( m_wei, m_wei+6);
156  dccw.push_back(dccwei); // vector vector
157  } // loop on all rows in the table
158  std::cout << " table " << getTable() << " total nb of rows " << row << std::endl;
159 
160  } catch (SQLException &e) {
161  throw(std::runtime_error("ODWeightsDat::fetchData(): "+e.getMessage()));
162  }
163 }
int getId() const
Definition: ODWeightsDat.h:22
std::string getTable()
Definition: ODWeightsDat.h:19
void setSMId(int dac)
Definition: ODWeightsDat.h:24
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
void setWeight(int pos, float x)
Definition: ODWeightsDat.h:43
float m_wei[6]
Definition: ODWeightsDat.h:85
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void setTTId(int dac)
Definition: ODWeightsDat.h:30
void setCrystalId(int dac)
Definition: ODWeightsDat.h:33
std::vector< std::vector< float > > dccw
Definition: ODWeightsDat.h:86
oracle::occi::ResultSet ResultSet
Definition: HcalDbOmds.cc:26
Statement * m_readStmt
Definition: IODConfig.h:37
void setFedId(int dac)
Definition: ODWeightsDat.h:27
int ODWeightsDat::getCrystalId ( ) const
inline

Definition at line 34 of file ODWeightsDat.h.

References m_xt.

Referenced by writeArrayDB().

34 { return m_xt; }
int ODWeightsDat::getFedId ( ) const
inline

Definition at line 28 of file ODWeightsDat.h.

References m_fed.

Referenced by writeArrayDB().

28 { return m_fed; }
int ODWeightsDat::getId ( void  ) const
inline

Definition at line 22 of file ODWeightsDat.h.

References m_ID.

22 { return m_ID; }
int ODWeightsDat::getSMId ( ) const
inline

Definition at line 25 of file ODWeightsDat.h.

References m_sm.

Referenced by writeArrayDB().

25 { return m_sm; }
std::string ODWeightsDat::getTable ( )
inlinevirtual

Implements IODConfig.

Definition at line 19 of file ODWeightsDat.h.

19 { return "DCC_WEIGHTS_DAT"; }
int ODWeightsDat::getTTId ( ) const
inline

Definition at line 31 of file ODWeightsDat.h.

References m_tt.

Referenced by writeArrayDB().

31 { return m_tt; }
std::vector<std::vector<float> > ODWeightsDat::getWeight ( ) const
inline

Definition at line 52 of file ODWeightsDat.h.

References clear(), data, dccw, fetchData(), noexcept, AlCaHLTBitMon_ParallelJobs::p, prepareWrite(), writeArrayDB(), and writeDB().

Referenced by popcon::EcalSRPHandler::getNewObjects().

52 { return dccw; }
std::vector< std::vector< float > > dccw
Definition: ODWeightsDat.h:86
float ODWeightsDat::getWeight0 ( ) const
inline

Definition at line 45 of file ODWeightsDat.h.

References m_wei0.

Referenced by writeArrayDB().

45 { return m_wei0; }
float ODWeightsDat::getWeight1 ( ) const
inline

Definition at line 46 of file ODWeightsDat.h.

References m_wei1.

Referenced by writeArrayDB().

46 { return m_wei1; }
float ODWeightsDat::getWeight2 ( ) const
inline

Definition at line 47 of file ODWeightsDat.h.

References m_wei2.

Referenced by writeArrayDB().

47 { return m_wei2; }
float ODWeightsDat::getWeight3 ( ) const
inline

Definition at line 48 of file ODWeightsDat.h.

References m_wei3.

Referenced by writeArrayDB().

48 { return m_wei3; }
float ODWeightsDat::getWeight4 ( ) const
inline

Definition at line 49 of file ODWeightsDat.h.

References m_wei4.

Referenced by writeArrayDB().

49 { return m_wei4; }
float ODWeightsDat::getWeight5 ( ) const
inline

Definition at line 50 of file ODWeightsDat.h.

References m_wei5.

Referenced by writeArrayDB().

50 { return m_wei5; }
void ODWeightsDat::prepareWrite ( )
privatevirtualnoexcept

Implements IODConfig.

Definition at line 44 of file ODWeightsDat.cc.

References MillePedeFileConverter_cfg::e.

Referenced by getWeight().

46 {
47  this->checkConnection();
48 
49  try {
50  m_writeStmt = m_conn->createStatement();
51  m_writeStmt->setSQL("INSERT INTO "+getTable()+" (rec_id, sm_id, fed_id, tt_id, cry_id, wei0, wei1, wei2, wei3, wei4, wei5 ) "
52  "VALUES (:1, :2, :3, :4, :5, :6, :7, :8 , :9, :10, :11 )");
53  } catch (SQLException &e) {
54  throw(std::runtime_error("ODWeightsDat::prepareWrite(): "+e.getMessage()));
55  }
56 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
Statement * m_writeStmt
Definition: IODConfig.h:36
std::string getTable()
Definition: ODWeightsDat.h:19
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void ODWeightsDat::setCrystalId ( int  dac)
inline

Definition at line 33 of file ODWeightsDat.h.

References m_xt.

Referenced by fetchData(), and EcalDccWeightBuilder::writeWeightToDB().

33 { m_xt = dac; }
void ODWeightsDat::setFedId ( int  dac)
inline

Definition at line 27 of file ODWeightsDat.h.

References m_fed.

Referenced by fetchData(), and EcalDccWeightBuilder::writeWeightToDB().

27 { m_fed = dac; }
void ODWeightsDat::setId ( int  dac)
inline

Definition at line 21 of file ODWeightsDat.h.

References m_ID.

Referenced by popcon::EcalSRPHandler::getNewObjects(), and EcalDccWeightBuilder::writeWeightToDB().

21 { m_ID = dac; }
void ODWeightsDat::setSMId ( int  dac)
inline

Definition at line 24 of file ODWeightsDat.h.

References m_sm.

Referenced by fetchData(), and EcalDccWeightBuilder::writeWeightToDB().

24 { m_sm = dac; }
void ODWeightsDat::setTTId ( int  dac)
inline

Definition at line 30 of file ODWeightsDat.h.

References m_tt.

Referenced by fetchData(), and EcalDccWeightBuilder::writeWeightToDB().

30 { m_tt = dac; }
void ODWeightsDat::setWeight ( int  pos,
float  x 
)
inline

Definition at line 43 of file ODWeightsDat.h.

References m_wei, and x.

Referenced by fetchData().

43 { m_wei[pos] = x; }
float m_wei[6]
Definition: ODWeightsDat.h:85
void ODWeightsDat::setWeight0 ( float  x)
inline

Definition at line 36 of file ODWeightsDat.h.

References m_wei0, and x.

Referenced by EcalDccWeightBuilder::writeWeightToDB().

36 { m_wei0 = x; }
void ODWeightsDat::setWeight1 ( float  x)
inline

Definition at line 37 of file ODWeightsDat.h.

References m_wei1, and x.

Referenced by EcalDccWeightBuilder::writeWeightToDB().

37 { m_wei1 = x; }
void ODWeightsDat::setWeight2 ( float  x)
inline

Definition at line 38 of file ODWeightsDat.h.

References m_wei2, and x.

Referenced by EcalDccWeightBuilder::writeWeightToDB().

38 { m_wei2 = x; }
void ODWeightsDat::setWeight3 ( float  x)
inline

Definition at line 39 of file ODWeightsDat.h.

References m_wei3, and x.

Referenced by EcalDccWeightBuilder::writeWeightToDB().

39 { m_wei3 = x; }
void ODWeightsDat::setWeight4 ( float  x)
inline

Definition at line 40 of file ODWeightsDat.h.

References m_wei4, and x.

Referenced by EcalDccWeightBuilder::writeWeightToDB().

40 { m_wei4 = x; }
void ODWeightsDat::setWeight5 ( float  x)
inline

Definition at line 41 of file ODWeightsDat.h.

References m_wei5, and x.

Referenced by EcalDccWeightBuilder::writeWeightToDB().

41 { m_wei5 = x; }
void ODWeightsDat::writeArrayDB ( const std::vector< ODWeightsDat > &  data,
ODFEWeightsInfo iov 
)
privatenoexcept

Definition at line 167 of file ODWeightsDat.cc.

References KineDebug3::count(), data, MillePedeFileConverter_cfg::e, getCrystalId(), getFedId(), getSMId(), getTTId(), getWeight0(), getWeight1(), getWeight2(), getWeight3(), getWeight4(), getWeight5(), createfilelist::int, geometryCSVtoXML::xx, geometryCSVtoXML::yy, and geometryCSVtoXML::zz.

Referenced by getWeight().

169 {
170  this->checkConnection();
171 
172  int iovID = iov->fetchID();
173  if (!iovID) { throw(std::runtime_error("ODDelays::writeArrayDB: ODFEDelaysInfo not in DB")); }
174 
175 
176  int nrows=data.size();
177  int* ids= new int[nrows];
178  int* xx= new int[nrows];
179  int* yy= new int[nrows];
180  int* zz= new int[nrows];
181  int* st= new int[nrows];
182  float* xx1= new float[nrows];
183  float* yy1= new float[nrows];
184  float* zz1= new float[nrows];
185  float* xx2= new float[nrows];
186  float* yy2= new float[nrows];
187  float* zz2= new float[nrows];
188 
189 
190  ub2* ids_len= new ub2[nrows];
191  ub2* x_len= new ub2[nrows];
192  ub2* y_len= new ub2[nrows];
193  ub2* z_len= new ub2[nrows];
194  ub2* st_len= new ub2[nrows];
195  ub2* x1_len= new ub2[nrows];
196  ub2* y1_len= new ub2[nrows];
197  ub2* z1_len= new ub2[nrows];
198  ub2* x2_len= new ub2[nrows];
199  ub2* y2_len= new ub2[nrows];
200  ub2* z2_len= new ub2[nrows];
201 
202  ODWeightsDat dataitem;
203 
204  int n_data= (int) data.size();
205  for (int count = 0; count <n_data ; count++) {
206  dataitem=data[count];
207  ids[count]=iovID;
208  xx[count]=dataitem.getSMId();
209  yy[count]=dataitem.getFedId();
210  zz[count]=dataitem.getTTId();
211  st[count]=dataitem.getCrystalId();
212  xx1[count]=dataitem.getWeight0();
213  yy1[count]=dataitem.getWeight1();
214  zz1[count]=dataitem.getWeight2();
215  xx2[count]=dataitem.getWeight3();
216  yy2[count]=dataitem.getWeight4();
217  zz2[count]=dataitem.getWeight5();
218 
219 
220  ids_len[count]=sizeof(ids[count]);
221  x_len[count]=sizeof(xx[count]);
222  y_len[count]=sizeof(yy[count]);
223  z_len[count]=sizeof(zz[count]);
224  st_len[count]=sizeof(st[count]);
225  x1_len[count]=sizeof(xx1[count]);
226  y1_len[count]=sizeof(yy1[count]);
227  z1_len[count]=sizeof(zz1[count]);
228  x2_len[count]=sizeof(xx2[count]);
229  y2_len[count]=sizeof(yy2[count]);
230  z2_len[count]=sizeof(zz2[count]);
231 
232  }
233 
234 
235  try {
236  m_writeStmt->setDataBuffer(1, (dvoid*)ids, OCCIINT, sizeof(ids[0]),ids_len);
237  m_writeStmt->setDataBuffer(2, (dvoid*)xx, OCCIINT , sizeof(xx[0]), x_len );
238  m_writeStmt->setDataBuffer(3, (dvoid*)yy, OCCIINT , sizeof(yy[0]), y_len );
239  m_writeStmt->setDataBuffer(4, (dvoid*)zz, OCCIINT , sizeof(zz[0]), z_len );
240  m_writeStmt->setDataBuffer(5, (dvoid*)st, OCCIINT , sizeof(st[0]), st_len );
241  m_writeStmt->setDataBuffer(6, (dvoid*)xx1, OCCIFLOAT , sizeof(xx1[0]), x1_len );
242  m_writeStmt->setDataBuffer(7, (dvoid*)yy1, OCCIFLOAT , sizeof(yy1[0]), y1_len );
243  m_writeStmt->setDataBuffer(8, (dvoid*)zz1, OCCIFLOAT , sizeof(zz1[0]), z1_len );
244  m_writeStmt->setDataBuffer(9, (dvoid*)xx2, OCCIFLOAT , sizeof(xx2[0]), x2_len );
245  m_writeStmt->setDataBuffer(10, (dvoid*)yy2, OCCIFLOAT , sizeof(yy2[0]), y2_len );
246  m_writeStmt->setDataBuffer(11, (dvoid*)zz2, OCCIFLOAT , sizeof(zz2[0]), z2_len );
247 
248 
249  m_writeStmt->executeArrayUpdate(nrows);
250 
251  delete [] ids;
252  delete [] xx;
253  delete [] yy;
254  delete [] zz;
255  delete [] st;
256  delete [] xx1;
257  delete [] yy1;
258  delete [] zz1;
259  delete [] xx2;
260  delete [] yy2;
261  delete [] zz2;
262 
263  delete [] ids_len;
264  delete [] x_len;
265  delete [] y_len;
266  delete [] z_len;
267  delete [] st_len;
268  delete [] x1_len;
269  delete [] y1_len;
270  delete [] z1_len;
271  delete [] x2_len;
272  delete [] y2_len;
273  delete [] z2_len;
274 
275  } catch (SQLException &e) {
276  throw(std::runtime_error("ODWeightsDat::writeArrayDB(): "+e.getMessage()));
277  }
278 }
float getWeight0() const
Definition: ODWeightsDat.h:45
Statement * m_writeStmt
Definition: IODConfig.h:36
float getWeight5() const
Definition: ODWeightsDat.h:50
int getCrystalId() const
Definition: ODWeightsDat.h:34
float getWeight3() const
Definition: ODWeightsDat.h:48
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
float getWeight4() const
Definition: ODWeightsDat.h:49
int getTTId() const
Definition: ODWeightsDat.h:31
int fetchID() noexcept(false)
float getWeight1() const
Definition: ODWeightsDat.h:46
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
float getWeight2() const
Definition: ODWeightsDat.h:47
int getSMId() const
Definition: ODWeightsDat.h:25
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int getFedId() const
Definition: ODWeightsDat.h:28
void ODWeightsDat::writeDB ( const ODWeightsDat item,
ODFEWeightsInfo iov 
)
privatenoexcept

Definition at line 60 of file ODWeightsDat.cc.

References MillePedeFileConverter_cfg::e.

Referenced by getWeight().

62 {
63  this->checkConnection();
64 
65  try {
66  m_writeStmt->setInt(1, item->getId());
67  m_writeStmt->setInt(2, item->getSMId());
68  m_writeStmt->setInt(3, item->getFedId() );
69  m_writeStmt->setInt(4, item->getTTId() );
70  m_writeStmt->setInt(5, item->getCrystalId() );
71 
72  m_writeStmt->setFloat(6, item->getWeight0() );
73  m_writeStmt->setFloat(7, item->getWeight1() );
74  m_writeStmt->setFloat(8, item->getWeight2() );
75  m_writeStmt->setFloat(9, item->getWeight3() );
76  m_writeStmt->setFloat(10, item->getWeight4() );
77  m_writeStmt->setFloat(11, item->getWeight5() );
78 
79  m_writeStmt->executeUpdate();
80  } catch (SQLException &e) {
81  throw(std::runtime_error("ODWeightsDat::writeDB(): "+e.getMessage()));
82  }
83 }
float getWeight0() const
Definition: ODWeightsDat.h:45
Statement * m_writeStmt
Definition: IODConfig.h:36
int getId() const
Definition: ODWeightsDat.h:22
float getWeight5() const
Definition: ODWeightsDat.h:50
int getCrystalId() const
Definition: ODWeightsDat.h:34
float getWeight3() const
Definition: ODWeightsDat.h:48
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:27
float getWeight4() const
Definition: ODWeightsDat.h:49
int getTTId() const
Definition: ODWeightsDat.h:31
float getWeight1() const
Definition: ODWeightsDat.h:46
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
float getWeight2() const
Definition: ODWeightsDat.h:47
int getSMId() const
Definition: ODWeightsDat.h:25
int getFedId() const
Definition: ODWeightsDat.h:28

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 14 of file ODWeightsDat.h.

Member Data Documentation

std::vector<std::vector<float> > ODWeightsDat::dccw
private

Definition at line 86 of file ODWeightsDat.h.

Referenced by getWeight().

int ODWeightsDat::m_fed
private

Definition at line 73 of file ODWeightsDat.h.

Referenced by getFedId(), and setFedId().

int ODWeightsDat::m_ID
private

Definition at line 76 of file ODWeightsDat.h.

Referenced by getId(), and setId().

int ODWeightsDat::m_sm
private

Definition at line 72 of file ODWeightsDat.h.

Referenced by getSMId(), and setSMId().

int ODWeightsDat::m_tt
private

Definition at line 74 of file ODWeightsDat.h.

Referenced by getTTId(), and setTTId().

float ODWeightsDat::m_wei[6]
private

Definition at line 85 of file ODWeightsDat.h.

Referenced by setWeight().

float ODWeightsDat::m_wei0
private

Definition at line 78 of file ODWeightsDat.h.

Referenced by getWeight0(), and setWeight0().

float ODWeightsDat::m_wei1
private

Definition at line 79 of file ODWeightsDat.h.

Referenced by getWeight1(), and setWeight1().

float ODWeightsDat::m_wei2
private

Definition at line 80 of file ODWeightsDat.h.

Referenced by getWeight2(), and setWeight2().

float ODWeightsDat::m_wei3
private

Definition at line 81 of file ODWeightsDat.h.

Referenced by getWeight3(), and setWeight3().

float ODWeightsDat::m_wei4
private

Definition at line 82 of file ODWeightsDat.h.

Referenced by getWeight4(), and setWeight4().

float ODWeightsDat::m_wei5
private

Definition at line 83 of file ODWeightsDat.h.

Referenced by getWeight5(), and setWeight5().

int ODWeightsDat::m_xt
private

Definition at line 75 of file ODWeightsDat.h.

Referenced by getCrystalId(), and setCrystalId().