CMS 3D CMS Logo

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

#include <DCUCCSDat.h>

Inheritance diagram for DCUCCSDat:
IDataItem IDBObject

Public Member Functions

 DCUCCSDat ()
 
float getCCSTempHigh () const
 
float getCCSTempLow () const
 
float getM1DCUTemp () const
 
float getM1Vcc () const
 
float getM1VDD1 () const
 
float getM1VDD2 () const
 
float getM1Vinj () const
 
float getM2DCUTemp () const
 
float getM2Vcc () const
 
float getM2VDD1 () const
 
float getM2VDD2 () const
 
float getM2Vinj () const
 
std::string getTable () override
 
void setCCSTemp (float low, float high)
 
void setCCSTempHigh (float temp)
 
void setCCSTempLow (float temp)
 
void setDCUTemp (float t1, float t2)
 
void setM1 (float vdd1, float vdd2, float vinj, float vcc, float dcutemp)
 
void setM1DCUTemp (float temp)
 
void setM1Vcc (float temp)
 
void setM1VDD1 (float temp)
 
void setM1VDD2 (float temp)
 
void setM1Vinj (float temp)
 
void setM2 (float vdd1, float vdd2, float vinj, float vcc, float dcutemp)
 
void setM2DCUTemp (float temp)
 
void setM2Vcc (float temp)
 
void setM2VDD1 (float temp)
 
void setM2VDD2 (float temp)
 
void setM2Vinj (float temp)
 
void setVcc (float v1, float v2)
 
void setVDD (float m1vdd1, float m1vdd2, float m2vdd1, float m2vdd2)
 
void setVinj (float v1, float v2)
 
 ~DCUCCSDat () override
 
- 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, DCUCCSDat > *fillVec, DCUIOV *iov) noexcept(false)
 
void prepareWrite () noexcept(false) override
 
void writeArrayDB (const std::map< EcalLogicID, DCUCCSDat > *data, DCUIOV *iov) noexcept(false)
 
void writeDB (const EcalLogicID *ecid, const DCUCCSDat *item, DCUIOV *iov) noexcept(false)
 

Private Attributes

float m_ccstemphigh
 
float m_ccstemplow
 
float m_m1_dcutemp
 
float m_m1_vcc
 
float m_m1_vdd1
 
float m_m1_vdd2
 
float m_m1_vinj
 
float m_m2_dcutemp
 
float m_m2_vcc
 
float m_m2_vdd1
 
float m_m2_vdd2
 
float m_m2_vinj
 

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 () noexcept(false)
 
void createReadStatement () 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 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 DCUCCSDat.h.

Constructor & Destructor Documentation

DCUCCSDat::DCUCCSDat ( )

Definition at line 12 of file DCUCCSDat.cc.

13 {
14  m_env = nullptr;
15  m_conn = nullptr;
16  m_writeStmt = nullptr;
17  m_readStmt = nullptr;
18 
19  m_m1_vdd1 = 0;
20  m_m2_vdd1 = 0;
21  m_m1_vdd2 = 0;
22  m_m2_vdd2 = 0;
23  m_m1_vinj = 0;
24  m_m2_vinj = 0;
25  m_m1_vcc = 0;
26  m_m2_vcc = 0;
27  m_m1_dcutemp = 0;
28  m_m2_dcutemp = 0;
29  m_ccstemplow = 0;
30  m_ccstemphigh = 0;
31 }
float m_ccstemphigh
Definition: DCUCCSDat.h:109
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_m2_vinj
Definition: DCUCCSDat.h:103
float m_m2_vcc
Definition: DCUCCSDat.h:105
float m_m1_dcutemp
Definition: DCUCCSDat.h:106
float m_m2_dcutemp
Definition: DCUCCSDat.h:107
float m_m2_vdd2
Definition: DCUCCSDat.h:101
float m_m1_vdd1
Definition: DCUCCSDat.h:98
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
float m_m1_vcc
Definition: DCUCCSDat.h:104
float m_m1_vinj
Definition: DCUCCSDat.h:102
float m_m1_vdd2
Definition: DCUCCSDat.h:100
float m_m2_vdd1
Definition: DCUCCSDat.h:99
float m_ccstemplow
Definition: DCUCCSDat.h:108
DCUCCSDat::~DCUCCSDat ( )
override

Definition at line 33 of file DCUCCSDat.cc.

34 {
35 }

Member Function Documentation

void DCUCCSDat::fetchData ( std::map< EcalLogicID, DCUCCSDat > *  fillVec,
DCUIOV iov 
)
privatenoexcept

Definition at line 100 of file DCUCCSDat.cc.

References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setCCSTemp(), setDCUTemp(), setVcc(), setVDD(), setVinj(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getCCSTempHigh().

103 {
104  this->checkConnection();
105  fillMap->clear();
106 
107  iov->setConnection(m_env, m_conn);
108  int iovID = iov->fetchID();
109  if (!iovID) {
110  // throw(std::runtime_error("DCUCCSDat::writeDB: IOV not in DB"));
111  return;
112  }
113 
114  try {
115 
116  m_readStmt->setSQL("SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, "
117  "cv.maps_to, "
118  "d.m1_vdd1, d.m2_vdd1, d.m1_vdd2, d.m2_vdd2, "
119  "d.m1_vinj, d.m2_vinj, "
120  "d.m1_vcc, d.m2_vcc, "
121  "d.m1_dcutemp, d.m2_dcutemp, "
122  "d.ccstemplow, d.ccstemphigh "
123  "FROM channelview cv JOIN dcu_ccs_dat d "
124  "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
125  "WHERE d.iov_id = :iov_id");
126  m_readStmt->setInt(1, iovID);
127  ResultSet* rset = m_readStmt->executeQuery();
128 
129  std::pair< EcalLogicID, DCUCCSDat > p;
130  DCUCCSDat dat;
131  while(rset->next()) {
132  p.first = EcalLogicID( getOraString(rset,1), // name
133  rset->getInt(2), // logic_id
134  rset->getInt(3), // id1
135  rset->getInt(4), // id2
136  rset->getInt(5), // id3
137  getOraString(rset,6)); // maps_to
138 
139  dat.setVDD(rset->getFloat(7), rset->getFloat(9), rset->getFloat(8),
140  rset->getFloat(10));
141  dat.setVinj(rset->getFloat(11), rset->getFloat(12));
142  dat.setVcc(rset->getFloat(13), rset->getFloat(14));
143  dat.setDCUTemp(rset->getFloat(15), rset->getFloat(16));
144  dat.setCCSTemp(rset->getFloat(17), rset->getFloat(18));
145  p.second = dat;
146  fillMap->insert(p);
147  }
148  } catch (SQLException &e) {
149  throw(std::runtime_error(std::string("DCUCCSDat::fetchData(): ")+getOraMessage(&e)));
150  }
151 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
void setVinj(float v1, float v2)
Definition: DCUCCSDat.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
void setVDD(float m1vdd1, float m1vdd2, float m2vdd1, float m2vdd2)
Definition: DCUCCSDat.h:25
void setCCSTemp(float low, float high)
Definition: DCUCCSDat.h:51
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void setVcc(float v1, float v2)
Definition: DCUCCSDat.h:39
void setDCUTemp(float t1, float t2)
Definition: DCUCCSDat.h:45
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:29
int fetchID() noexcept(false) override
Definition: DCUIOV.cc:79
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
float DCUCCSDat::getCCSTempHigh ( ) const
inline

Definition at line 82 of file DCUCCSDat.h.

References data, fetchData(), m_ccstemphigh, noexcept, prepareWrite(), writeArrayDB(), and writeDB().

Referenced by writeArrayDB().

82 { return m_ccstemphigh; }
float m_ccstemphigh
Definition: DCUCCSDat.h:109
float DCUCCSDat::getCCSTempLow ( ) const
inline

Definition at line 81 of file DCUCCSDat.h.

References m_ccstemplow.

Referenced by writeArrayDB().

81 { return m_ccstemplow; }
float m_ccstemplow
Definition: DCUCCSDat.h:108
float DCUCCSDat::getM1DCUTemp ( ) const
inline

Definition at line 79 of file DCUCCSDat.h.

References m_m1_dcutemp.

Referenced by writeArrayDB().

79 { return m_m1_dcutemp; }
float m_m1_dcutemp
Definition: DCUCCSDat.h:106
float DCUCCSDat::getM1Vcc ( ) const
inline

Definition at line 77 of file DCUCCSDat.h.

References m_m1_vcc.

Referenced by writeArrayDB().

77 { return m_m1_vcc; }
float m_m1_vcc
Definition: DCUCCSDat.h:104
float DCUCCSDat::getM1VDD1 ( ) const
inline

Definition at line 71 of file DCUCCSDat.h.

References m_m1_vdd1.

Referenced by writeArrayDB().

71 { return m_m1_vdd1; }
float m_m1_vdd1
Definition: DCUCCSDat.h:98
float DCUCCSDat::getM1VDD2 ( ) const
inline

Definition at line 72 of file DCUCCSDat.h.

References m_m1_vdd2.

Referenced by writeArrayDB().

72 { return m_m1_vdd2; }
float m_m1_vdd2
Definition: DCUCCSDat.h:100
float DCUCCSDat::getM1Vinj ( ) const
inline

Definition at line 75 of file DCUCCSDat.h.

References m_m1_vinj.

Referenced by writeArrayDB().

75 { return m_m1_vinj; }
float m_m1_vinj
Definition: DCUCCSDat.h:102
float DCUCCSDat::getM2DCUTemp ( ) const
inline

Definition at line 80 of file DCUCCSDat.h.

References m_m2_dcutemp.

Referenced by writeArrayDB().

80 { return m_m2_dcutemp; }
float m_m2_dcutemp
Definition: DCUCCSDat.h:107
float DCUCCSDat::getM2Vcc ( ) const
inline

Definition at line 78 of file DCUCCSDat.h.

References m_m2_vcc.

Referenced by writeArrayDB().

78 { return m_m2_vcc; }
float m_m2_vcc
Definition: DCUCCSDat.h:105
float DCUCCSDat::getM2VDD1 ( ) const
inline

Definition at line 73 of file DCUCCSDat.h.

References m_m2_vdd1.

Referenced by writeArrayDB().

73 { return m_m2_vdd1; }
float m_m2_vdd1
Definition: DCUCCSDat.h:99
float DCUCCSDat::getM2VDD2 ( ) const
inline

Definition at line 74 of file DCUCCSDat.h.

References m_m2_vdd2.

Referenced by writeArrayDB().

74 { return m_m2_vdd2; }
float m_m2_vdd2
Definition: DCUCCSDat.h:101
float DCUCCSDat::getM2Vinj ( ) const
inline

Definition at line 76 of file DCUCCSDat.h.

References m_m2_vinj.

Referenced by writeArrayDB().

76 { return m_m2_vinj; }
float m_m2_vinj
Definition: DCUCCSDat.h:103
std::string DCUCCSDat::getTable ( )
inlineoverridevirtual

Implements IDataItem.

Definition at line 19 of file DCUCCSDat.h.

19 { return "DCU_CCS_DAT"; }
void DCUCCSDat::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IDataItem.

Definition at line 37 of file DCUCCSDat.cc.

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getCCSTempHigh().

39 {
40  this->checkConnection();
41 
42  try {
43  m_writeStmt = m_conn->createStatement();
44  m_writeStmt->setSQL("INSERT INTO dcu_ccs_dat (iov_id, logic_id, "
45  "m1_vdd1, m2_vdd1, m1_vdd2, m2_vdd2, m1_vinj, "
46  "m2_vinj, m1_vcc, m2_vcc, m1_dcutemp, m2_dcutemp, "
47  "ccstemplow, ccstemphigh) "
48  "VALUES (:iov_id, :logic_id, "
49  ":m1_vdd1, :m2_vdd1, :m1_vdd2, :m2_vdd2, :m1_vinj, "
50  ":m2_vinj, :m1_vcc, :m2_vcc, :m1_dcutemp, "
51  ":m2_dcutemp, :ccstemplow, :ccstemphigh)");
52  } catch (SQLException &e) {
53  throw(std::runtime_error(std::string("DCUCCSDat::prepareWrite(): ") +
54  getOraMessage(&e)));
55  }
56 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
void DCUCCSDat::setCCSTemp ( float  low,
float  high 
)
inline

Definition at line 51 of file DCUCCSDat.h.

References setCCSTempHigh(), and setCCSTempLow().

Referenced by fetchData().

51  {
52  setCCSTempLow(low);
53  setCCSTempHigh(high);
54  }
void setCCSTempLow(float temp)
Definition: DCUCCSDat.h:49
void setCCSTempHigh(float temp)
Definition: DCUCCSDat.h:50
void DCUCCSDat::setCCSTempHigh ( float  temp)
inline

Definition at line 50 of file DCUCCSDat.h.

References m_ccstemphigh, and groupFilesInBlocks::temp.

Referenced by setCCSTemp().

void DCUCCSDat::setCCSTempLow ( float  temp)
inline

Definition at line 49 of file DCUCCSDat.h.

References m_ccstemplow, and groupFilesInBlocks::temp.

Referenced by setCCSTemp().

void DCUCCSDat::setDCUTemp ( float  t1,
float  t2 
)
inline

Definition at line 45 of file DCUCCSDat.h.

References setM1DCUTemp(), and setM2DCUTemp().

Referenced by fetchData().

45  {
46  setM1DCUTemp(t1);
47  setM2DCUTemp(t2);
48  }
void setM1DCUTemp(float temp)
Definition: DCUCCSDat.h:43
void setM2DCUTemp(float temp)
Definition: DCUCCSDat.h:44
void DCUCCSDat::setM1 ( float  vdd1,
float  vdd2,
float  vinj,
float  vcc,
float  dcutemp 
)
inline

Definition at line 55 of file DCUCCSDat.h.

References setM1DCUTemp(), setM1Vcc(), setM1VDD1(), setM1VDD2(), and setM1Vinj().

56  {
57  setM1VDD1(vdd1);
58  setM1VDD2(vdd2);
59  setM1Vinj(vinj);
60  setM1Vcc(vcc);
61  setM1DCUTemp(dcutemp);
62  }
void setM1DCUTemp(float temp)
Definition: DCUCCSDat.h:43
void setM1Vinj(float temp)
Definition: DCUCCSDat.h:31
void setM1Vcc(float temp)
Definition: DCUCCSDat.h:37
void setM1VDD2(float temp)
Definition: DCUCCSDat.h:23
void setM1VDD1(float temp)
Definition: DCUCCSDat.h:21
void DCUCCSDat::setM1DCUTemp ( float  temp)
inline

Definition at line 43 of file DCUCCSDat.h.

References m_m1_dcutemp, and groupFilesInBlocks::temp.

Referenced by setDCUTemp(), and setM1().

void DCUCCSDat::setM1Vcc ( float  temp)
inline

Definition at line 37 of file DCUCCSDat.h.

References m_m1_vcc, and groupFilesInBlocks::temp.

Referenced by setM1(), and setVcc().

void DCUCCSDat::setM1VDD1 ( float  temp)
inline

Definition at line 21 of file DCUCCSDat.h.

References m_m1_vdd1, and groupFilesInBlocks::temp.

Referenced by setM1(), and setVDD().

void DCUCCSDat::setM1VDD2 ( float  temp)
inline

Definition at line 23 of file DCUCCSDat.h.

References m_m1_vdd2, and groupFilesInBlocks::temp.

Referenced by setM1(), and setVDD().

void DCUCCSDat::setM1Vinj ( float  temp)
inline

Definition at line 31 of file DCUCCSDat.h.

References m_m1_vinj, and groupFilesInBlocks::temp.

Referenced by setM1(), and setVinj().

void DCUCCSDat::setM2 ( float  vdd1,
float  vdd2,
float  vinj,
float  vcc,
float  dcutemp 
)
inline

Definition at line 63 of file DCUCCSDat.h.

References setM2DCUTemp(), setM2Vcc(), setM2VDD1(), setM2VDD2(), and setM2Vinj().

64  {
65  setM2VDD1(vdd1);
66  setM2VDD2(vdd2);
67  setM2Vinj(vinj);
68  setM2Vcc(vcc);
69  setM2DCUTemp(dcutemp);
70  }
void setM2Vcc(float temp)
Definition: DCUCCSDat.h:38
void setM2VDD2(float temp)
Definition: DCUCCSDat.h:24
void setM2DCUTemp(float temp)
Definition: DCUCCSDat.h:44
void setM2Vinj(float temp)
Definition: DCUCCSDat.h:32
void setM2VDD1(float temp)
Definition: DCUCCSDat.h:22
void DCUCCSDat::setM2DCUTemp ( float  temp)
inline

Definition at line 44 of file DCUCCSDat.h.

References m_m2_dcutemp, and groupFilesInBlocks::temp.

Referenced by setDCUTemp(), and setM2().

void DCUCCSDat::setM2Vcc ( float  temp)
inline

Definition at line 38 of file DCUCCSDat.h.

References m_m2_vcc, and groupFilesInBlocks::temp.

Referenced by setM2(), and setVcc().

void DCUCCSDat::setM2VDD1 ( float  temp)
inline

Definition at line 22 of file DCUCCSDat.h.

References m_m2_vdd1, and groupFilesInBlocks::temp.

Referenced by setM2(), and setVDD().

void DCUCCSDat::setM2VDD2 ( float  temp)
inline

Definition at line 24 of file DCUCCSDat.h.

References m_m2_vdd2, and groupFilesInBlocks::temp.

Referenced by setM2(), and setVDD().

void DCUCCSDat::setM2Vinj ( float  temp)
inline

Definition at line 32 of file DCUCCSDat.h.

References m_m2_vinj, and groupFilesInBlocks::temp.

Referenced by setM2(), and setVinj().

void DCUCCSDat::setVcc ( float  v1,
float  v2 
)
inline

Definition at line 39 of file DCUCCSDat.h.

References setM1Vcc(), and setM2Vcc().

Referenced by fetchData().

39  {
40  setM1Vcc(v1);
41  setM2Vcc(v2);
42  }
void setM2Vcc(float temp)
Definition: DCUCCSDat.h:38
void setM1Vcc(float temp)
Definition: DCUCCSDat.h:37
void DCUCCSDat::setVDD ( float  m1vdd1,
float  m1vdd2,
float  m2vdd1,
float  m2vdd2 
)
inline

Definition at line 25 of file DCUCCSDat.h.

References setM1VDD1(), setM1VDD2(), setM2VDD1(), and setM2VDD2().

Referenced by fetchData().

25  {
26  setM1VDD1(m1vdd1);
27  setM1VDD2(m1vdd2);
28  setM2VDD1(m2vdd1);
29  setM2VDD2(m2vdd2);
30  }
void setM2VDD2(float temp)
Definition: DCUCCSDat.h:24
void setM1VDD2(float temp)
Definition: DCUCCSDat.h:23
void setM1VDD1(float temp)
Definition: DCUCCSDat.h:21
void setM2VDD1(float temp)
Definition: DCUCCSDat.h:22
void DCUCCSDat::setVinj ( float  v1,
float  v2 
)
inline

Definition at line 33 of file DCUCCSDat.h.

References setM1Vinj(), and setM2Vinj().

Referenced by fetchData().

33  {
34  setM1Vinj(v1);
35  setM2Vinj(v2);
36  }
void setM1Vinj(float temp)
Definition: DCUCCSDat.h:31
void setM2Vinj(float temp)
Definition: DCUCCSDat.h:32
void DCUCCSDat::writeArrayDB ( const std::map< EcalLogicID, DCUCCSDat > *  data,
DCUIOV iov 
)
privatenoexcept

Definition at line 153 of file DCUCCSDat.cc.

References KineDebug3::count(), data, MillePedeFileConverter_cfg::e, getCCSTempHigh(), getCCSTempLow(), EcalLogicID::getLogicID(), getM1DCUTemp(), getM1Vcc(), getM1VDD1(), getM1VDD2(), getM1Vinj(), getM2DCUTemp(), getM2Vcc(), getM2VDD1(), getM2VDD2(), getM2Vinj(), photons_cff::ids, AlCaHLTBitMon_ParallelJobs::p, AlCaHLTBitMon_QueryRunRegistry::string, globals_cff::x1, and globals_cff::x2.

Referenced by getCCSTempHigh().

155 {
156  this->checkConnection();
157  this->checkPrepare();
158 
159  int iovID = iov->fetchID();
160  if (!iovID) {
161  throw(std::runtime_error("DCUCCSDat::writeArrayDB: IOV not in DB"));
162  }
163 
164  int nrows=data->size();
165  int* ids= new int[nrows];
166  int* iovid_vec= new int[nrows];
167  float* x1= new float[nrows];
168  float* x2= new float[nrows];
169  float* x3= new float[nrows];
170  float* x4= new float[nrows];
171  float* x5= new float[nrows];
172  float* x6= new float[nrows];
173  float* x7= new float[nrows];
174  float* x8= new float[nrows];
175  float* x9= new float[nrows];
176  float* xa= new float[nrows];
177  float* xb= new float[nrows];
178  float* xc= new float[nrows];
179 
180  ub2* ids_len= new ub2[nrows];
181  ub2* iov_len= new ub2[nrows];
182  ub2* x_len = new ub2[nrows];
183 
184  const EcalLogicID* channel;
185  const DCUCCSDat* dataitem;
186  int count=0;
187  typedef map< EcalLogicID, DCUCCSDat >::const_iterator CI;
188  for (CI p = data->begin(); p != data->end(); ++p) {
189  channel = &(p->first);
190  int logicID = channel->getLogicID();
191  if (!logicID) {
192  throw(std::runtime_error("DCUCCSDat::writeArrayDB: Bad EcalLogicID"));
193  }
194  ids[count]=logicID;
195  iovid_vec[count]=iovID;
196 
197  dataitem = &(p->second);
198 
199  x1[count] = dataitem->getM1VDD1();
200  x2[count] = dataitem->getM2VDD1();
201  x3[count] = dataitem->getM1VDD2();
202  x4[count] = dataitem->getM2VDD2();
203  x5[count] = dataitem->getM1Vinj();
204  x6[count] = dataitem->getM2Vinj();
205  x7[count] = dataitem->getM1Vcc();
206  x8[count] = dataitem->getM2Vcc();
207  x9[count] = dataitem->getM1DCUTemp();
208  xa[count] = dataitem->getM2DCUTemp();
209  xb[count] = dataitem->getCCSTempLow();
210  xc[count] = dataitem->getCCSTempHigh();
211 
212  ids_len[count]=sizeof(ids[count]);
213  iov_len[count]=sizeof(iovid_vec[count]);
214 
215  x_len[count]=sizeof(x1[count]);
216 
217  count++;
218  }
219 
220 
221  try {
222  m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
223  sizeof(iovid_vec[0]),iov_len);
224  m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
225  sizeof(ids[0]), ids_len );
226  m_writeStmt->setDataBuffer(3, (dvoid*)x1, OCCIFLOAT ,
227  sizeof(x1[0]), x_len );
228  m_writeStmt->setDataBuffer(3, (dvoid*)x2, OCCIFLOAT ,
229  sizeof(x1[0]), x_len );
230  m_writeStmt->setDataBuffer(3, (dvoid*)x3, OCCIFLOAT ,
231  sizeof(x1[0]), x_len );
232  m_writeStmt->setDataBuffer(3, (dvoid*)x4, OCCIFLOAT ,
233  sizeof(x1[0]), x_len );
234  m_writeStmt->setDataBuffer(3, (dvoid*)x5, OCCIFLOAT ,
235  sizeof(x1[0]), x_len );
236  m_writeStmt->setDataBuffer(3, (dvoid*)x6, OCCIFLOAT ,
237  sizeof(x1[0]), x_len );
238  m_writeStmt->setDataBuffer(3, (dvoid*)x7, OCCIFLOAT ,
239  sizeof(x1[0]), x_len );
240  m_writeStmt->setDataBuffer(3, (dvoid*)x8, OCCIFLOAT ,
241  sizeof(x1[0]), x_len );
242  m_writeStmt->setDataBuffer(3, (dvoid*)x9, OCCIFLOAT ,
243  sizeof(x1[0]), x_len );
244  m_writeStmt->setDataBuffer(3, (dvoid*)xa, OCCIFLOAT ,
245  sizeof(x1[0]), x_len );
246  m_writeStmt->setDataBuffer(3, (dvoid*)xb, OCCIFLOAT ,
247  sizeof(x1[0]), x_len );
248  m_writeStmt->setDataBuffer(3, (dvoid*)xc, OCCIFLOAT ,
249  sizeof(x1[0]), x_len );
250 
251  m_writeStmt->executeArrayUpdate(nrows);
252 
253  delete [] ids;
254  delete [] iovid_vec;
255  delete [] x1;
256  delete [] x2;
257  delete [] x3;
258  delete [] x4;
259  delete [] x5;
260  delete [] x6;
261  delete [] x7;
262  delete [] x8;
263  delete [] x9;
264  delete [] xa;
265  delete [] xb;
266  delete [] xc;
267 
268  delete [] ids_len;
269  delete [] iov_len;
270  delete [] x_len;
271 
272 
273  } catch (SQLException &e) {
274  throw(std::runtime_error(std::string("DCUCCSDat::writeArrayDB(): ") + getOraMessage(&e)));
275  }
276 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
float getM2DCUTemp() const
Definition: DCUCCSDat.h:80
float getM2Vcc() const
Definition: DCUCCSDat.h:78
float getM1VDD2() const
Definition: DCUCCSDat.h:72
float getM1DCUTemp() const
Definition: DCUCCSDat.h:79
float getM1VDD1() const
Definition: DCUCCSDat.h:71
void checkPrepare() noexcept(false)
Definition: IDataItem.h:31
float getM2Vinj() const
Definition: DCUCCSDat.h:76
float getM1Vcc() const
Definition: DCUCCSDat.h:77
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
float getM2VDD2() const
Definition: DCUCCSDat.h:74
int getLogicID() const
Definition: EcalLogicID.cc:41
float getM2VDD1() const
Definition: DCUCCSDat.h:73
float getM1Vinj() const
Definition: DCUCCSDat.h:75
int fetchID() noexcept(false) override
Definition: DCUIOV.cc:79
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float getCCSTempLow() const
Definition: DCUCCSDat.h:81
float getCCSTempHigh() const
Definition: DCUCCSDat.h:82
void DCUCCSDat::writeDB ( const EcalLogicID ecid,
const DCUCCSDat item,
DCUIOV iov 
)
privatenoexcept

Definition at line 60 of file DCUCCSDat.cc.

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getCCSTempHigh().

63 {
64  this->checkConnection();
65  this->checkPrepare();
66 
67  int iovID = iov->fetchID();
68  if (!iovID) {
69  throw(std::runtime_error("DCUCCSDat::writeDB: IOV not in DB"));
70  }
71 
72  int logicID = ecid->getLogicID();
73  if (!logicID) {
74  throw(std::runtime_error("DCUCCSDat::writeDB: Bad EcalLogicID"));
75  }
76 
77  try {
78  m_writeStmt->setInt(1, iovID);
79  m_writeStmt->setInt(2, logicID);
80 
81  m_writeStmt->setFloat( 3, item->getM1VDD1() );
82  m_writeStmt->setFloat( 4, item->getM2VDD1() );
83  m_writeStmt->setFloat( 5, item->getM1VDD2() );
84  m_writeStmt->setFloat( 6, item->getM2VDD2() );
85  m_writeStmt->setFloat( 7, item->getM1Vinj() );
86  m_writeStmt->setFloat( 8, item->getM2Vinj() );
87  m_writeStmt->setFloat( 9, item->getM1Vcc() );
88  m_writeStmt->setFloat(10, item->getM2Vcc() );
89  m_writeStmt->setFloat(11, item->getM1DCUTemp() );
90  m_writeStmt->setFloat(12, item->getM2DCUTemp() );
91  m_writeStmt->setFloat(13, item->getCCSTempLow() );
92  m_writeStmt->setFloat(14, item->getCCSTempHigh() );
93 
94  m_writeStmt->executeUpdate();
95  } catch (SQLException &e) {
96  throw(std::runtime_error(std::string("DCUCCSDat::writeDB(): ") + getOraMessage(&e)));
97  }
98 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:28
float getM2DCUTemp() const
Definition: DCUCCSDat.h:80
float getM2Vcc() const
Definition: DCUCCSDat.h:78
float getM1VDD2() const
Definition: DCUCCSDat.h:72
float getM1DCUTemp() const
Definition: DCUCCSDat.h:79
float getM1VDD1() const
Definition: DCUCCSDat.h:71
void checkPrepare() noexcept(false)
Definition: IDataItem.h:31
float getM2Vinj() const
Definition: DCUCCSDat.h:76
float getM1Vcc() const
Definition: DCUCCSDat.h:77
void checkConnection() const noexcept(false)
Definition: IDBObject.h:41
float getM2VDD2() const
Definition: DCUCCSDat.h:74
int getLogicID() const
Definition: EcalLogicID.cc:41
float getM2VDD1() const
Definition: DCUCCSDat.h:73
float getM1Vinj() const
Definition: DCUCCSDat.h:75
int fetchID() noexcept(false) override
Definition: DCUIOV.cc:79
float getCCSTempLow() const
Definition: DCUCCSDat.h:81
float getCCSTempHigh() const
Definition: DCUCCSDat.h:82

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 14 of file DCUCCSDat.h.

Member Data Documentation

float DCUCCSDat::m_ccstemphigh
private

Definition at line 109 of file DCUCCSDat.h.

Referenced by getCCSTempHigh(), and setCCSTempHigh().

float DCUCCSDat::m_ccstemplow
private

Definition at line 108 of file DCUCCSDat.h.

Referenced by getCCSTempLow(), and setCCSTempLow().

float DCUCCSDat::m_m1_dcutemp
private

Definition at line 106 of file DCUCCSDat.h.

Referenced by getM1DCUTemp(), and setM1DCUTemp().

float DCUCCSDat::m_m1_vcc
private

Definition at line 104 of file DCUCCSDat.h.

Referenced by getM1Vcc(), and setM1Vcc().

float DCUCCSDat::m_m1_vdd1
private

Definition at line 98 of file DCUCCSDat.h.

Referenced by getM1VDD1(), and setM1VDD1().

float DCUCCSDat::m_m1_vdd2
private

Definition at line 100 of file DCUCCSDat.h.

Referenced by getM1VDD2(), and setM1VDD2().

float DCUCCSDat::m_m1_vinj
private

Definition at line 102 of file DCUCCSDat.h.

Referenced by getM1Vinj(), and setM1Vinj().

float DCUCCSDat::m_m2_dcutemp
private

Definition at line 107 of file DCUCCSDat.h.

Referenced by getM2DCUTemp(), and setM2DCUTemp().

float DCUCCSDat::m_m2_vcc
private

Definition at line 105 of file DCUCCSDat.h.

Referenced by getM2Vcc(), and setM2Vcc().

float DCUCCSDat::m_m2_vdd1
private

Definition at line 99 of file DCUCCSDat.h.

Referenced by getM2VDD1(), and setM2VDD1().

float DCUCCSDat::m_m2_vdd2
private

Definition at line 101 of file DCUCCSDat.h.

Referenced by getM2VDD2(), and setM2VDD2().

float DCUCCSDat::m_m2_vinj
private

Definition at line 103 of file DCUCCSDat.h.

Referenced by getM2Vinj(), and setM2Vinj().