CMS 3D CMS Logo

ConfigurationDatabaseImplOracle.cc
Go to the documentation of this file.
1 
2 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImplOracle.hh"
3 #include <iostream> // std::cout
4 
5 #ifdef HAVE_XDAQ
6 #include <toolbox/string.h>
7 #else
8 #include "CaloOnlineTools/HcalOnlineDb/interface/xdaq_compat.h" // Replaces toolbox::toString
9 #endif
10 
11 using namespace std;
12 using namespace oracle::occi;
13 using namespace hcal;
14 //
15 // provides factory method for instantion of ConfigurationDatabaseImplOracle application
16 //
17 DECLARE_PLUGGABLE(hcal::ConfigurationDatabaseImpl, ConfigurationDatabaseImplOracle)
18 
19 ConfigurationDatabaseImplOracle::ConfigurationDatabaseImplOracle() {}
20 
21 bool ConfigurationDatabaseImplOracle::canHandleMethod(const std::string& method) const { return (method == "occi"); }
22 
23 ConfigurationDatabaseImplOracle::~ConfigurationDatabaseImplOracle() { disconnect(); }
24 
25 void ConfigurationDatabaseImplOracle::connect(const std::string& accessor) noexcept(false) {
26  std::map<std::string, std::string> params;
28  ConfigurationDatabaseImpl::parseAccessor(accessor, method, host, port, user, db, params);
29 
30  if (method != "occi")
31  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
32  std::string("Invalid accessor for Oracle : ") + accessor);
33 
34  if (params.find("PASSWORD") != params.end())
35  password = params["PASSWORD"];
36  if (params.find("LHWM_VERSION") != params.end())
37  lhwm_version = params["LHWM_VERSION"];
38 
39  try {
40  env_ = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::DEFAULT);
41  conn_ = env_->createConnection(user, password, db);
42  } catch (SQLException& e) {
43  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
44  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
45  }
46 
47  if (env_ == nullptr || conn_ == nullptr) {
48  std::string message("Error connecting on accessor '");
49  message += accessor;
50  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException, message);
51  }
52 }
53 
54 void ConfigurationDatabaseImplOracle::disconnect() {
55  try {
56  //terminate environment and connection
57  env_->terminateConnection(conn_);
58  Environment::terminateEnvironment(env_);
59  } catch (SQLException& e) {
60  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
61  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
62  }
63 }
64 
65 //Utility function that cnverts oracle::occi::Clob to std::string
66 string ConfigurationDatabaseImplOracle::clobToString(const oracle::occi::Clob& _clob) {
67  oracle::occi::Clob clob = _clob;
68  Stream* instream = clob.getStream(1, 0);
69  unsigned int size = clob.length();
70  char* cbuffer = new char[size];
71  memset(cbuffer, 0, size);
72  instream->readBuffer(cbuffer, size);
73  std::string str(cbuffer, size);
74  return str;
75 }
76 //inline function to convert hex2integer
77 inline static int cvtChar(int c) {
78  if (c >= '0' && c <= '9')
79  c -= '0';
80  if ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
81  c -= 'A' + 10;
82  return c & 0xF;
83 }
84 
85 void ConfigurationDatabaseImplOracle::getLUTChecksums(
86  const std::string& tag,
87  std::map<hcal::ConfigurationDatabase::LUTId, hcal::ConfigurationDatabase::MD5Fingerprint>&
88  checksums) noexcept(false) {
89  if (env_ == nullptr || conn_ == nullptr)
90  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException, "Database is not open");
91  checksums.clear();
92 
93  try {
94  Statement* stmt = conn_->createStatement();
95 
97  ("SELECT TRIG_PRIM_LOOKUPTBL_DATA_CLOB FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_TRIG_LOOKUP_TABLES");
98  query += " WHERE CRATE=-1";
99  //query+=toolbox::toString(" WHERE TAG_NAME='%s' CRATE=-1", tag.c_str());
100 
101  //SELECT
102  ResultSet* rs = stmt->executeQuery(query);
103 
104  while (rs->next()) {
105  oracle::occi::Clob clob = rs->getClob(1);
106  std::list<ConfigurationDatabaseStandardXMLParser::Item> items;
107  std::string buffer = clobToString(clob);
108 
109  m_parser.parseMultiple(buffer, items);
110 
111  for (std::list<ConfigurationDatabaseStandardXMLParser::Item>::iterator i = items.begin(); i != items.end(); ++i) {
112  hcal::ConfigurationDatabase::FPGASelection ifpga =
113  (hcal::ConfigurationDatabase::FPGASelection)atoi(i->parameters["topbottom"].c_str());
114  int islot = atoi(i->parameters["slot"].c_str());
115  hcal::ConfigurationDatabase::LUTType ilut_type =
116  (hcal::ConfigurationDatabase::LUTType)atoi(i->parameters["luttype"].c_str());
117  int crate = atoi(i->parameters["crate"].c_str());
118  int islb = atoi(i->parameters["slb"].c_str());
119  int islbch = atoi(i->parameters["slbchan"].c_str());
120  hcal::ConfigurationDatabase::LUTId lut_id;
121  lut_id = hcal::ConfigurationDatabase::LUTId(crate, islot, ifpga, islb, islbch, ilut_type);
122 
123  hcal::ConfigurationDatabase::MD5Fingerprint csum(16);
124  std::string encoded = (std::string)i->items[0];
125  for (int i = 0; i < 16; i++) {
126  //converting hex2integer
127  csum[i] = cvtChar(encoded[i * 2]) * 16 + cvtChar(encoded[i * 2 + 1]);
128  }
129 
130  checksums[lut_id] = csum;
131  }
132  }
133  //Always terminate statement
134  conn_->terminateStatement(stmt);
135  } catch (SQLException& e) {
136  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
137  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
138  }
139 }
140 
141 void ConfigurationDatabaseImplOracle::getLUTs(
142  const std::string& tag,
143  int crate,
144  int slot,
145  std::map<hcal::ConfigurationDatabase::LUTId, hcal::ConfigurationDatabase::LUT>& LUTs) noexcept(false) {
146  if (m_lutCache.crate != crate || m_lutCache.tag != tag) {
147  m_lutCache.clear();
148  getLUTs_real(tag, crate, m_lutCache.luts);
149  m_lutCache.crate = crate;
150  m_lutCache.tag = tag;
151  }
152 
153  LUTs.clear();
154  std::map<hcal::ConfigurationDatabase::LUTId, hcal::ConfigurationDatabase::LUT>::const_iterator i;
155  for (i = m_lutCache.luts.begin(); i != m_lutCache.luts.end(); i++) {
156  if (i->first.slot == slot)
157  LUTs.insert(*i);
158  }
159 }
160 
161 void ConfigurationDatabaseImplOracle::getLUTs_real(
162  const std::string& tag,
163  int crate,
164  std::map<hcal::ConfigurationDatabase::LUTId, hcal::ConfigurationDatabase::LUT>& LUTs) noexcept(false) {
165  try {
166  //Lets run the SQl Query
167  Statement* stmt = conn_->createStatement();
168 
170  ("SELECT TRIG_PRIM_LOOKUPTBL_DATA_CLOB FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_TRIG_LOOKUP_TABLES");
171  query += toolbox::toString(" WHERE TAG_NAME='%s' AND CRATE=%d", tag.c_str(), crate);
172 
173  //SELECT
174  ResultSet* rs = stmt->executeQuery(query);
175 
176  LUTs.clear();
177 
178  while (rs->next()) {
179  oracle::occi::Clob clob = rs->getClob(1);
180  std::list<ConfigurationDatabaseStandardXMLParser::Item> items;
181  std::string buffer = clobToString(clob);
182  m_parser.parseMultiple(buffer, items);
183 
184  for (std::list<ConfigurationDatabaseStandardXMLParser::Item>::iterator i = items.begin(); i != items.end(); ++i) {
185  hcal::ConfigurationDatabase::FPGASelection ifpga =
186  (hcal::ConfigurationDatabase::FPGASelection)atoi(i->parameters["TOPBOTTOM"].c_str());
187  int islot = atoi(i->parameters["SLOT"].c_str());
188 
189  //If this is the desired slot
190  //if (islot == slot) {
191  hcal::ConfigurationDatabase::LUTType ilut_type =
192  (hcal::ConfigurationDatabase::LUTType)atoi(i->parameters["LUT_TYPE"].c_str());
193  hcal::ConfigurationDatabase::LUTId lut_id;
194  if (ilut_type == hcal::ConfigurationDatabase::LinearizerLUT) {
195  int ifiber = atoi(i->parameters["FIBER"].c_str());
196  int ifiberch = atoi(i->parameters["FIBERCHAN"].c_str());
197  lut_id = hcal::ConfigurationDatabase::LUTId(crate, islot, ifpga, ifiber, ifiberch, ilut_type);
198  } else {
199  int islb = atoi(i->parameters["SLB"].c_str());
200  int islbch = atoi(i->parameters["SLBCHAN"].c_str());
201  lut_id = hcal::ConfigurationDatabase::LUTId(crate, islot, ifpga, islb, islbch, ilut_type);
202  }
203 
205  lut.reserve(i->items.size());
206 
207  int strtol_base = 0;
208  if (i->encoding == "hex")
209  strtol_base = 16;
210  else if (i->encoding == "dec")
211  strtol_base = 10;
212 
213  // convert the data
214  for (unsigned int j = 0; j < i->items.size(); j++)
215  lut.push_back(strtol(i->items[j].c_str(), nullptr, strtol_base));
216 
217  LUTs.insert(make_pair(lut_id, lut));
218  //}
219  }
220  }
221 
222  //Always terminate statement
223  conn_->terminateStatement(stmt);
224  } catch (SQLException& e) {
225  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
226  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
227  }
228 }
229 
230 void ConfigurationDatabaseImplOracle::getPatterns(
231  const std::string& tag,
232  int crate,
233  int slot,
234  std::map<hcal::ConfigurationDatabase::PatternId, hcal::ConfigurationDatabase::HTRPattern>& patterns) noexcept(false) {
235  if (m_patternCache.crate != crate || m_patternCache.tag != tag) {
236  m_patternCache.clear();
237  getPatterns_real(tag, crate, m_patternCache.patterns);
238  m_patternCache.crate = crate;
239  m_patternCache.tag = tag;
240  }
241 
242  patterns.clear();
243  std::map<hcal::ConfigurationDatabase::PatternId, hcal::ConfigurationDatabase::HTRPattern>::const_iterator i;
244  for (i = m_patternCache.patterns.begin(); i != m_patternCache.patterns.end(); i++) {
245  if (i->first.slot == slot)
246  patterns.insert(*i);
247  }
248 }
249 
250 void ConfigurationDatabaseImplOracle::getPatterns_real(
251  const std::string& tag,
252  int crate,
253  std::map<hcal::ConfigurationDatabase::PatternId, hcal::ConfigurationDatabase::HTRPattern>& patterns) noexcept(false) {
254  try {
255  //Lets run the SQl Query
256  Statement* stmt = conn_->createStatement();
257 
259  ("SELECT HTR_DATA_PATTERNS_DATA_CLOB FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_HTR_DATA_PATTERNS");
260  query += toolbox::toString(" WHERE TAG_NAME='%s' AND CRATE=%d", tag.c_str(), crate);
261 
262  //SELECT
263  ResultSet* rs = stmt->executeQuery(query);
264 
265  patterns.clear();
266 
267  while (rs->next()) {
268  oracle::occi::Clob clob = rs->getClob(1);
269  std::list<ConfigurationDatabaseStandardXMLParser::Item> items;
270  std::string buffer = clobToString(clob);
271 
272  m_parser.parseMultiple(buffer, items);
273 
274  for (std::list<ConfigurationDatabaseStandardXMLParser::Item>::iterator i = items.begin(); i != items.end(); ++i) {
275  int islot = atoi(i->parameters["SLOT"].c_str());
276  //If this is the desired slot
277  //if (islot == slot) {
278  hcal::ConfigurationDatabase::FPGASelection ifpga =
279  (hcal::ConfigurationDatabase::FPGASelection)atoi(i->parameters["TOPBOTTOM"].c_str());
280  int ifiber = atoi(i->parameters["FIBER"].c_str());
281 
282  hcal::ConfigurationDatabase::PatternId pat_id(crate, islot, ifpga, ifiber);
283  hcal::ConfigurationDatabase::HTRPattern& pat = patterns[pat_id];
284  pat.reserve(i->items.size());
285 
286  int strtol_base = 0;
287  if (i->encoding == "hex")
288  strtol_base = 16;
289  else if (i->encoding == "dec")
290  strtol_base = 10;
291 
292  // convert the data
293  for (unsigned int j = 0; j < i->items.size(); j++)
294  pat.push_back(strtol(i->items[j].c_str(), nullptr, strtol_base));
295  //}
296  }
297  }
298  //Always terminate statement
299  conn_->terminateStatement(stmt);
300  } catch (SQLException& e) {
301  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
302  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
303  }
304 }
305 
306 void ConfigurationDatabaseImplOracle::getRBXdata(
307  const std::string& tag,
308  const std::string& rbx,
309  hcal::ConfigurationDatabase::RBXdatumType dtype,
310  std::map<ConfigurationDatabase::RBXdatumId, hcal::ConfigurationDatabase::RBXdatum>& RBXdata) noexcept(false) {
311  RBXdata.clear();
312 
313  Statement* stmt = conn_->createStatement();
315 
316  //std::string datatypestr;
317  switch (dtype) {
318  case (ConfigurationDatabase::eRBXpedestal):
319  //datatypestr="PEDESTAL";
320 
321  //Lets run the SQl Query
322  query = "SELECT MODULE_POSITION, QIE_CARD_POSITION, QIE_ADC_NUMBER, INTEGER_VALUE ";
323  query += " FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_RBX_PEDESTAL_CONFIG ";
324  query += toolbox::toString(" WHERE TAG_NAME='%s' AND NAME_LABEL='%s'", tag.c_str(), rbx.c_str());
325 
326  break;
327 
328  case (ConfigurationDatabase::eRBXdelay):
329  //datatypestr="DELAY";
330 
331  query = "SELECT MODULE_POSITION, QIE_CARD_POSITION, QIE_ADC_NUMBER, INTEGER_VALUE ";
332  query += " FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_RBX_DELAY_CONFIG ";
333  query += toolbox::toString(" WHERE TAG_NAME='%s' AND NAME_LABEL='%s'", tag.c_str(), rbx.c_str());
334 
335  break;
336 
337  case (ConfigurationDatabase::eRBXgolCurrent):
338  //datatypestr="GOL";
339 
340  query = "SELECT MODULE_POSITION, QIE_CARD_POSITION, FIBER_NUMBER, INTEGER_VALUE ";
341  query += " FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_RBX_GOL_CONFIG ";
342  query += toolbox::toString(" WHERE TAG_NAME='%s' AND NAME_LABEL='%s'", tag.c_str(), rbx.c_str());
343 
344  break;
345  case (ConfigurationDatabase::eRBXledData):
346  //datatypestr="LED";
347  query = "SELECT LED_AMPLITUDE, SET_LEDS_IS_CHECKED, BUNCH_NUMBER ";
348  query += " FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_RBX_INITPAR_T02_CONFIG ";
349  query += toolbox::toString(" WHERE TAG_NAME='%s' AND NAME_LABEL='%s'", tag.c_str(), rbx.c_str());
350  break;
351 
352  case (ConfigurationDatabase::eRBXbroadcast):
353  //datatypestr="";
354  printf("ConfigurationDatabaseImplMySQL::getRBXdata Can't handle BROADCAST yet\n");
355  return;
356  case (ConfigurationDatabase::eRBXttcrxPhase):
357  //datatypestr="PHASE";
358  printf("ConfigurationDatabaseImplMySQL::getRBXdata Can't handle TTCRX PHASE yet\n");
359  return;
360  case (ConfigurationDatabase::eRBXqieResetDelay):
361  //datatypestr="";
362  printf("ConfigurationDatabaseImplMySQL::getRBXdata Can't handle QIE RESET DELAY yet\n");
363  return;
364  case (ConfigurationDatabase::eRBXccaPatterns):
365  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException, "Patterns must use getRBXPatterns, not getRBXData");
366  return;
367  default:
368  printf("ConfigurationDatabaseImplMySQL::getRBXdata Can't handle dtype=%d yet\n", dtype);
369  return;
370  }
371 
372  try {
373  //SELECT
374  ResultSet* rs = stmt->executeQuery(query);
375  while (rs->next()) {
376  if (dtype == ConfigurationDatabase::eRBXledData) {
377  //LED_AMPLITUDE, SET_LEDS_IS_CHECKED, BUNCH_NUMBER
378  unsigned int ampl = rs->getInt(1);
379  unsigned int enable = rs->getInt(2);
380  unsigned int bunch = rs->getInt(3);
381 
382  if (enable)
383  enable |= 0x1; // global enable if either is on
384  RBXdata.insert(std::pair<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>(
385  ConfigurationDatabase::eLEDenable, enable));
386  RBXdata.insert(std::pair<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>(
387  ConfigurationDatabase::eLEDamplitude, ampl));
388  RBXdata.insert(std::pair<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>(
389  ConfigurationDatabase::eLEDtiming_hb, ((bunch & 0xFF00) >> 8)));
390  RBXdata.insert(std::pair<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>(
391  ConfigurationDatabase::eLEDtiming_lb, (bunch & 0xFF)));
392  } else {
393  //MODULE_POSITION, QIE_CARD_POSITION, QIE_ADC_NUMBER/FIBER_NUMBER, INTEGER_VALUE
394  int rm = rs->getInt(1);
395  int card = rs->getInt(2);
396  int qie_or_gol = rs->getInt(3);
397  unsigned int data = rs->getInt(4);
398 
399  ConfigurationDatabase::RBXdatumId id(rm, card, qie_or_gol, dtype);
400  RBXdata.insert(
401  std::pair<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>(id, (unsigned char)(data)));
402  }
403  }
404 
405  //Always terminate statement
406  conn_->terminateStatement(stmt);
407  } catch (SQLException& e) {
408  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
409  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
410  }
411 }
412 
413 void ConfigurationDatabaseImplOracle::getZSThresholds(
414  const std::string& tag,
415  int crate,
416  int slot,
417  std::map<hcal::ConfigurationDatabase::ZSChannelId, int>& thresholds) noexcept(false) {
418  try {
419  //Lets run the SQl Query
420  Statement* stmt = conn_->createStatement();
421  //SELECT HTR_FIBER, FIBER_CHANNEL, ZERO_SUPPRESSION, HTR_FPGA
422  //FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_ZERO_SUPPRESSION_LHWM
423  //WHERE TAG_NAME='Kukartsev test 1' AND CRATE=2 AND HTR_SLOT=2
424  //AND LHWM_VERSION='20'
425 
426  std::string query = ("SELECT HTR_FIBER, FIBER_CHANNEL, ZERO_SUPPRESSION, HTR_FPGA ");
427  query += " FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_ZERO_SUPPRESSION_LHWM ";
428  query += toolbox::toString(" WHERE TAG_NAME='%s' AND CRATE=%d AND HTR_SLOT=%d", tag.c_str(), crate, slot);
429  query += toolbox::toString(" AND LHWM_VERSION='%s'", lhwm_version.c_str());
430 
431  //SELECT
432  ResultSet* rs = stmt->executeQuery(query);
433 
434  thresholds.clear();
435 
436  while (rs->next()) {
437  unsigned int fiber = rs->getInt(1);
438  unsigned int fc = rs->getInt(2);
439  unsigned int zs = rs->getInt(3);
440  std::string fpga = rs->getString(4);
441  int tb;
442  if (fpga == "top")
443  tb = 1;
444  else
445  tb = 0;
446  std::cout << "crate,slot,tb,fiber,fc:" << crate << slot << tb << fiber << fc << std::endl;
447  hcal::ConfigurationDatabase::ZSChannelId id(
448  crate, slot, (hcal::ConfigurationDatabase::FPGASelection)tb, fiber, fc);
449  thresholds[id] = zs;
450  }
451  //Always terminate statement
452  conn_->terminateStatement(stmt);
453  } catch (SQLException& e) {
454  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
455  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
456  }
457 }
458 
459 void ConfigurationDatabaseImplOracle::getHLXMasks(
460  const std::string& tag,
461  int crate,
462  int slot,
463  std::map<hcal::ConfigurationDatabase::FPGAId, hcal::ConfigurationDatabase::HLXMasks>& masks) noexcept(false) {
464  if (m_hlxMaskCache.crate != crate || m_hlxMaskCache.tag != tag) {
465  m_hlxMaskCache.clear();
466  getHLXMasks_real(tag, crate, m_hlxMaskCache.masks);
467  m_hlxMaskCache.crate = crate;
468  m_hlxMaskCache.tag = tag;
469  }
470 
471  masks.clear();
472  std::map<ConfigurationDatabase::FPGAId, ConfigurationDatabase::HLXMasks>::const_iterator i;
473  for (i = m_hlxMaskCache.masks.begin(); i != m_hlxMaskCache.masks.end(); i++) {
474  if (i->first.slot == slot)
475  masks.insert(*i);
476  }
477 }
478 
479 void ConfigurationDatabaseImplOracle::getHLXMasks_real(
480  const std::string& tag,
481  int crate,
482  std::map<ConfigurationDatabase::FPGAId, ConfigurationDatabase::HLXMasks>& masks) noexcept(false) {
483  try {
484  //Lets run the SQl Query
485  Statement* stmt = conn_->createStatement();
486  std::string query = ("SELECT SLOT_NUMBER, FPGA, OCC_MASK, LHC_MASK, SUM_ET_MASK ");
487  query += " FROM CMS_HCL_HCAL_CONDITION_OWNER.V_HCAL_HLX_MASKS ";
488  query += toolbox::toString(" WHERE TAG_NAME='%s' AND CRATE_NUMBER=%d ", tag.c_str(), crate);
489 
490  //SELECT
491  ResultSet* rs = stmt->executeQuery(query);
492  masks.clear();
493  while (rs->next()) {
494  int islot = rs->getInt(1);
495  std::string fpga = rs->getString(2);
496 
497  int ifpga;
498  if (fpga == "top")
499  ifpga = 1;
500  else
501  ifpga = 0;
502 
503  hcal::ConfigurationDatabase::FPGAId fpga_id;
504  fpga_id =
505  hcal::ConfigurationDatabase::FPGAId(crate, islot, (hcal::ConfigurationDatabase::FPGASelectionEnum)ifpga);
506  hcal::ConfigurationDatabase::HLXMasks hlxMask;
507  hlxMask.occMask = rs->getInt(3);
508  hlxMask.lhcMask = rs->getInt(4);
509  hlxMask.sumEtMask = rs->getInt(5);
510 
511  masks[fpga_id] = hlxMask;
512  }
513  //Always terminate statement
514  conn_->terminateStatement(stmt);
515  } catch (SQLException& e) {
516  XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
517  ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
518  }
519 }
520 
521 // added by Gena Kukartsev
522 oracle::occi::Connection* ConfigurationDatabaseImplOracle::getConnection(void) { return conn_; }
523 
524 oracle::occi::Environment* ConfigurationDatabaseImplOracle::getEnvironment(void) { return env_; }
size
Write out results.
def rm(path, rec=False)
Definition: eostools.py:363
string host
Definition: query.py:115
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
static int cvtChar(int c)
int port
Definition: query.py:116
Definition: HeavyIon.h:7
Definition: query.py:1
std::string toString(const char *format,...)
Definition: xdaq_compat.cc:4
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:31
#define str(s)