CMS 3D CMS Logo

LMFDat.cc
Go to the documentation of this file.
2 
3 #include <sstream>
4 #include <cmath>
5 
6 using std::cout;
7 using std::endl;
8 
10  m_tableName = "";
11  m_max = -1;
12  _where = "";
13  _wherePars.clear();
14 }
15 
17  m_tableName = "";
18  m_max = -1;
19  _where = "";
20  _wherePars.clear();
21 }
22 
23 LMFDat::LMFDat(oracle::occi::Environment *env, oracle::occi::Connection *conn) : LMFUnique(env, conn) {
24  m_tableName = "";
25  m_max = -1;
26  _where = "";
27  _wherePars.clear();
28 }
29 
30 std::string LMFDat::foreignKeyName() const { return "lmfRunIOV"; }
31 
33  int id = getInt(foreignKeyName());
34  if (id == 0) {
35  // try to get it from the list of foreign keys
36  std::map<std::string, LMFUnique *>::iterator i = m_foreignKeys.find(foreignKeyName());
37  if (i != m_foreignKeys.end()) {
38  LMFRunIOV *iov = (LMFRunIOV *)(i->second);
39  if (iov != nullptr) {
40  id = iov->fetchID();
41  setInt(foreignKeyName(), id);
42  }
43  }
44  }
45  return id;
46 }
47 
49  m_max = n;
50  return *this;
51 }
52 
53 std::map<unsigned int, std::string> LMFDat::getReverseMap() const {
54  std::map<unsigned int, std::string> m;
55  std::map<std::string, unsigned int>::const_iterator i = m_keys.begin();
56  std::map<std::string, unsigned int>::const_iterator e = m_keys.end();
57  while (i != e) {
58  m[i->second] = i->first;
59  i++;
60  }
61  return m;
62 }
63 
64 void LMFDat::dump() const { dump(0, m_max); }
65 
66 void LMFDat::dump(int n) const { dump(n, m_max); }
67 
68 void LMFDat::dump(int n, int max) const {
70  int s = m_data.size();
71  cout << "Stored data: " << s << endl;
72  if (max >= 0) {
73  std::map<int, std::vector<float> >::const_iterator p = m_data.begin();
74  std::map<int, std::vector<float> >::const_iterator end = m_data.end();
75  int c = 0;
76  std::map<unsigned int, std::string> rm = getReverseMap();
77  while ((p != end) && (c < max)) {
78  int id = p->first;
79  std::vector<float> x = p->second;
80  cout << c << " -------------------------------------------" << endl;
81  cout << " ID: " << id << endl;
82  for (unsigned int j = 0; j < x.size(); j++) {
83  if (j % 4 == 0) {
84  cout << endl << " ";
85  }
86  cout << rm[j] << ":" << x[j] << "\t";
87  }
88  cout << endl;
89  p++;
90  c++;
91  }
92  }
93 }
94 
96  // create the insert statement
97  std::stringstream sql;
98  sql << "INSERT INTO " + getTableName() + " VALUES (";
99  unsigned int nParameters = m_keys.size() + 2;
100  for (unsigned int i = 0; i < nParameters - 1; i++) {
101  sql << ":" << i + 1 << ", ";
102  }
103  sql << ":" << nParameters << ")";
104  std::string sqls = sql.str();
105  if (m_debug) {
106  cout << m_className << "::writeDB: " << sqls << endl;
107  }
108  return sqls;
109 }
110 
111 std::string LMFDat::getIovIdFieldName() const { return "LMF_IOV_ID"; }
112 
114  // to be used by experts to restrict the results of a query
115  _where = where;
116 }
117 
118 void LMFDat::setWhereClause(std::string where, const std::vector<std::string> &parameters) {
119  // to be used by experts to restrict the results of a query
120  // in this case the where clause can contains positional parameter,
121  // identified as :/I, :/S, :/F for, respectively, integer, string or
122  // float parameters. The parameters are all passed as strings
123  // in parameters
125  _where = where;
126 }
127 
128 std::string LMFDat::buildSelectSql(int logic_id, int direction) {
129  // create the insert statement
130  // if logic_id = 0 select all channels for a given iov_id
131  std::stringstream sql;
132  int count = 1;
133  if (getLMFRunIOVID() > 0) {
134  if (_where.length() > 0) {
135  // check if this is an expert query. If so, add a WHERE clause
136  _where = " AND " + _where;
137  }
138  // in this case we are looking for all data collected during the same
139  // IOV. There can be many logic_ids per IOV.
140  sql << "SELECT * FROM CMS_ECAL_LASER_COND." << getTableName() << " WHERE " << getIovIdFieldName() << " = "
141  << getLMFRunIOVID() << _where;
142  // the expert query must be specified each time the expert makes the query
143  // then empty it
144  _where = "";
145  } else {
146  // in this case we are looking for a specific logic_id whose
147  // data have been collected at a given time. There is only
148  // one record in this case.
149  std::string op = ">";
150  std::string order = "ASC";
151  if (direction < 0) {
152  op = "<";
153  order = "DESC";
154  }
155  sql << "SELECT * FROM (SELECT CMS_ECAL_LASER_COND." << getTableName() << ".* FROM CMS_ECAL_LASER_COND."
156  << getTableName() << " JOIN LMF_RUN_IOV ON "
157  << "LMF_RUN_IOV.LMF_IOV_ID = " << getTableName() << "." << getIovIdFieldName() << " "
158  << "WHERE SUBRUN_START " << op << "= TO_DATE(:" << count;
159  count++;
160  sql << ", 'YYYY-MM-DD HH24:MI:SS') ORDER BY SUBRUN_START " << order << ") WHERE ROWNUM <= 1";
161  }
162  if (logic_id > 0) {
163  sql << " AND LOGIC_ID = :" << count;
164  }
165  std::string sqls = sql.str();
166  if (m_debug) {
167  cout << m_className << "::buildSelectSqlDB: " << sqls << endl;
168  }
169  return sqls;
170 }
171 
172 void LMFDat::getPrevious(LMFDat *dat) noexcept(false) { getNeighbour(dat, -1); }
173 
174 void LMFDat::getNext(LMFDat *dat) noexcept(false) { getNeighbour(dat, +1); }
175 
176 void LMFDat::getNeighbour(LMFDat *dat, int which) noexcept(false) {
177  // there should be just one record in this case
178  if (m_data.size() == 1) {
179  dat->setConnection(this->getEnv(), this->getConn());
180  int logic_id = m_data.begin()->first;
181  Tm lastMeasuredOn = getSubrunStart();
182  lastMeasuredOn += which;
183  dat->fetch(logic_id, &lastMeasuredOn, which);
184  dat->setMaxDataToDump(m_max);
185  } else {
186  dump();
187  throw(std::runtime_error(m_className + "::getPrevious: Too many LOGIC_IDs in "
188  "this object"));
189  }
190 }
191 
192 void LMFDat::fetch(const EcalLogicID &id) noexcept(false) { fetch(id.getLogicID()); }
193 
194 void LMFDat::fetch(const EcalLogicID &id, const Tm &tm) noexcept(false) { fetch(id.getLogicID(), &tm, 1); }
195 
196 void LMFDat::fetch(const EcalLogicID &id, const Tm &tm, int direction) noexcept(false) {
197  setInt(foreignKeyName(), 0); /* set the LMF_IOV_ID to undefined */
198  fetch(id.getLogicID(), &tm, direction);
199 }
200 
201 void LMFDat::fetch() noexcept(false) { fetch(0); }
202 
203 void LMFDat::fetch(int logic_id) noexcept(false) { fetch(logic_id, nullptr, 0); }
204 
205 void LMFDat::fetch(int logic_id, const Tm &tm) noexcept(false) { fetch(logic_id, &tm, 1); }
206 
208  // adjust positional parameters and change them according to their
209  // decalred type
210  std::size_t nw = 0;
211  std::size_t n = sql.find(':');
212  for (int done = 1; done < count; done++) {
213  // skip already bound variables
214  n = sql.find(':', n + 1);
215  }
216  while (n != std::string::npos) {
217  char type = sql.at(n + 1);
218  if (type == 'S') {
219  stmt->setString(nw + count, _wherePars[nw]);
220  nw++;
221  } else if (type == 'F') {
222  stmt->setFloat(nw + count, atof(_wherePars[nw].c_str()));
223  nw++;
224  } else if (type == 'I') {
225  stmt->setInt(nw + count, atoi(_wherePars[nw].c_str()));
226  nw++;
227  }
228  n = sql.find(':', n + 1);
229  }
230 }
231 
232 void LMFDat::fetch(int logic_id, const Tm *timestamp, int direction) noexcept(false) {
233  bool ok = check();
234  if ((timestamp == nullptr) && (getLMFRunIOVID() == 0)) {
235  throw(std::runtime_error(m_className + "::fetch: Cannot fetch data with "
236  "timestamp = 0 and LMFRunIOV = 0"));
237  }
238  if (ok && isValid()) {
239  if (m_debug) {
240  std::cout << "[LMFDat] This object is valid..." << std::endl;
241  }
242  try {
243  Statement *stmt = m_conn->createStatement();
244  std::string sql = buildSelectSql(logic_id, direction);
245  if (m_debug) {
246  std::cout << "[LMFDat] Executing query " << std::endl;
247  std::cout << " " << sql << std::endl << std::flush;
248  }
249  if (logic_id == 0) {
250  // get data for all crystals with a given timestamp
251  stmt->setPrefetchRowCount(10000);
252  }
253  stmt->setSQL(sql);
254  int count = 1;
255  if (logic_id > 0) {
256  if (timestamp != nullptr) {
257  stmt->setString(count, timestamp->str());
258  count++;
259  }
260  stmt->setInt(count++, logic_id);
261  }
262  adjustParameters(count, sql, stmt);
263  ResultSet *rset = stmt->executeQuery();
264  std::vector<float> x;
265  int nData = m_keys.size();
266  x.reserve(nData);
267  while (rset->next() != 0) {
268  for (int i = 0; i < nData; i++) {
269  x.push_back(rset->getFloat(i + 3));
270  }
271  int id = rset->getInt(2);
272  if (timestamp != nullptr) {
273  setInt(foreignKeyName(), rset->getInt(1));
274  }
275  this->setData(id, x);
276  x.clear();
277  }
278  stmt->setPrefetchRowCount(0);
279  m_conn->terminateStatement(stmt);
280  } catch (oracle::occi::SQLException &e) {
281  throw(std::runtime_error(m_className + "::fetch: " + e.getMessage()));
282  }
283  m_ID = m_data.size();
284  }
285 }
286 
288  bool ret = true;
289  if (m_foreignKeys.find(foreignKeyName()) == m_foreignKeys.end()) {
290  ret = false;
291  m_Error += " Can't find lmfRunIOV within foreign keys.";
292  if (m_debug) {
293  cout << m_className << ": Foreign keys map size: " << m_foreignKeys.size() << endl;
294  }
295  }
296  return ret;
297 }
298 
299 std::map<int, std::vector<float> > LMFDat::fetchData() noexcept(false) {
300  // see if any of the data is already in the database
301  std::map<int, std::vector<float> > s = m_data;
302  std::string sql =
303  "SELECT LOGIC_ID FROM CMS_ECAL_LASER_COND." + getTableName() + " WHERE " + getIovIdFieldName() + " = :1";
304  if (m_debug) {
305  cout << m_className << ":: candidate data items to be written = " << s.size() << endl;
306  cout << m_className << " Executing " << sql;
307  cout << " where " << getIovIdFieldName() << " = " << getLMFRunIOVID() << endl;
308  }
309  try {
310  Statement *stmt = m_conn->createStatement();
311  stmt->setSQL(sql);
312  stmt->setInt(1, getLMFRunIOVID());
313  stmt->setPrefetchRowCount(10000);
314  ResultSet *rset = stmt->executeQuery();
315  std::map<int, std::vector<float> >::iterator i = s.end();
316  std::map<int, std::vector<float> >::iterator e = s.end();
317  while (rset->next() != 0) {
318  if (m_debug) {
319  cout << m_className << ":: checking " << rset->getInt(1) << endl << std::flush;
320  }
321  i = s.find(rset->getInt(1));
322  if (i != e) {
323  s.erase(i);
324  }
325  }
326  stmt->setPrefetchRowCount(0);
327  m_conn->terminateStatement(stmt);
328  } catch (oracle::occi::SQLException &e) {
329  throw(std::runtime_error(m_className + "::fetchData: " + e.getMessage()));
330  }
331  if (m_debug) {
332  cout << m_className << ":: data items to write = " << s.size() << endl;
333  }
334  return s;
335 }
336 
337 int LMFDat::writeDB() noexcept(false) {
338  // first of all check if data already present
339  if (m_debug) {
340  cout << m_className << ": Writing foreign keys" << endl;
341  }
343  if (m_debug) {
344  cout << m_className << ": Foreign keys written" << endl;
345  }
346  // write data on the database
347  int ret = 0;
348  std::map<int, std::vector<float> > data2write = fetchData();
349  if (!data2write.empty()) {
350  this->checkConnection();
351  bool ok = check();
352  // write
353  if (ok && isValid()) {
354  std::list<dvoid *> bufPointers;
355  int nParameters = m_keys.size();
356  int nData = data2write.size();
357  if (m_debug) {
358  cout << m_className << ": # data items = " << nData << endl;
359  cout << m_className << ": # parameters = " << nParameters << endl;
360  }
361  int *iovid_vec = new int[nData];
362  int *logicid_vec = new int[nData];
363  int *intArray = new int[nData];
364  float *floatArray = new float[nData];
365  ub2 *intSize = new ub2[nData];
366  ub2 *floatSize = new ub2[nData];
367  size_t intTotalSize = sizeof(int) * nData;
368  size_t floatTotalSize = sizeof(float) * nData;
369  try {
370  Statement *stmt = m_conn->createStatement();
371  std::string sql = buildInsertSql();
372  stmt->setSQL(sql);
373  // build the array of the size of each column
374  for (int i = 0; i < nData; i++) {
375  intSize[i] = sizeof(int);
376  floatSize[i] = sizeof(int);
377  }
378  // build the data array for first column: the same run iov id
380  int iov_id = runiov->getID();
381  std::map<int, std::vector<float> >::const_iterator b = data2write.begin();
382  std::map<int, std::vector<float> >::const_iterator e = data2write.end();
383  for (int i = 0; i < nData; i++) {
384  iovid_vec[i] = iov_id;
385  }
386  stmt->setDataBuffer(1, (dvoid *)iovid_vec, oracle::occi::OCCIINT, sizeof(iovid_vec[0]), intSize);
387  // build the data array for second column: the logic ids
388  int c = 0;
389  while (b != e) {
390  int id = b->first;
391  logicid_vec[c++] = id;
392  b++;
393  }
394  stmt->setDataBuffer(2, (dvoid *)logicid_vec, oracle::occi::OCCIINT, sizeof(logicid_vec[0]), intSize);
395  // for each column build the data array
396  oracle::occi::Type type = oracle::occi::OCCIFLOAT;
397  for (int i = 0; i < nParameters; i++) {
398  b = data2write.begin();
399  // loop on all logic ids
400  c = 0;
401  while (b != e) {
402  std::vector<float> x = b->second;
403  if (m_type[i] == "INT") {
404  intArray[c] = (int)rint(x[i]);
405  } else if ((m_type[i] == "FLOAT") || (m_type[i] == "NUMBER")) {
406  floatArray[c] = x[i];
407  } else {
408  throw(std::runtime_error("ERROR: LMFDat::writeDB: unsupported type"));
409  }
410  c++;
411  b++;
412  }
413  // copy data into a "permanent" buffer
414  dvoid *buffer;
415  type = oracle::occi::OCCIINT;
416  ub2 *sizeArray = intSize;
417  int size = sizeof(intArray[0]);
418  if ((m_type[i] == "FLOAT") || (m_type[i] == "NUMBER")) {
419  buffer = (dvoid *)malloc(sizeof(float) * nData);
420  memcpy(buffer, floatArray, floatTotalSize);
421  type = oracle::occi::OCCIFLOAT;
422  sizeArray = floatSize;
423  size = sizeof(floatArray[0]);
424  } else {
425  buffer = (dvoid *)malloc(sizeof(int) * nData);
426  memcpy(buffer, intArray, intTotalSize);
427  }
428  bufPointers.push_back(buffer);
429  if (m_debug) {
430  for (int k = 0; ((k < nData) && (k < m_max)); k++) {
431  cout << m_className << ": === Index=== " << k << endl;
432  cout << m_className << ": RUN_IOV_ID = " << iovid_vec[k] << endl;
433  cout << m_className << ": LOGIC_ID = " << logicid_vec[k] << endl;
434  cout << m_className << ": FIELD " << i << ": " << ((float *)(buffer))[k] << endl;
435  }
436  }
437  stmt->setDataBuffer(i + 3, buffer, type, size, sizeArray);
438  }
439  stmt->executeArrayUpdate(nData);
440  delete[] intArray;
441  delete[] floatArray;
442  delete[] intSize;
443  delete[] floatSize;
444  delete[] logicid_vec;
445  delete[] iovid_vec;
446  std::list<dvoid *>::const_iterator bi = bufPointers.begin();
447  std::list<dvoid *>::const_iterator be = bufPointers.end();
448  while (bi != be) {
449  free(*bi);
450  bi++;
451  }
452  m_conn->commit();
453  m_conn->terminateStatement(stmt);
454  ret = nData;
455  } catch (oracle::occi::SQLException &e) {
456  debug();
457  setMaxDataToDump(nData);
458  // get the Foreign Key
460  int iov_id = runiov->getID();
461  std::cout << "==== This object refers to IOV " << iov_id << std::endl;
462  dump();
463  m_conn->rollback();
464  throw(std::runtime_error(m_className + "::writeDB: " + e.getMessage()));
465  }
466  } else {
467  cout << m_className << "::writeDB: Cannot write because " << m_Error << endl;
468  dump();
469  }
470  }
471  return ret;
472 }
473 
474 void LMFDat::getKeyTypes() noexcept(false) {
475  m_type.reserve(m_keys.size());
476  for (unsigned int i = 0; i < m_keys.size(); i++) {
477  m_type.push_back("");
478  }
479  // get the description of the table
480  std::string sql = "";
481  try {
482  Statement *stmt = m_conn->createStatement();
483  sql = "SELECT * FROM TABLE(CMS_ECAL_LASER_COND.LMF_TAB_COLS(:1, :2))";
484  /*
485  sql = "SELECT COLUMN_NAME, DATA_TYPE FROM "
486  "USER_TAB_COLS WHERE TABLE_NAME = '" + getTableName() + "' "
487  "AND COLUMN_NAME != '" + getIovIdFieldName() + "' AND COLUMN_NAME != "
488  "'LOGIC_ID'";
489  */
490  stmt->setSQL(sql);
491  stmt->setString(1, getTableName());
492  stmt->setString(2, getIovIdFieldName());
493  ResultSet *rset = stmt->executeQuery();
494  while (rset->next() != 0) {
495  std::string name = rset->getString(1);
496  std::string t = rset->getString(2);
497  m_type[m_keys[name]] = t;
498  }
499  m_conn->terminateStatement(stmt);
500  } catch (oracle::occi::SQLException &e) {
501  throw(std::runtime_error(m_className + "::getKeyTypes: " + e.getMessage() + " [" + sql + "]"));
502  }
503 }
504 
506  // check that everything has been correctly setup
507  bool ret = true;
508  m_Error = "";
509  // first of all we need to check that the class name has been set
510  if (m_className == "LMFUnique") {
511  m_Error = "class name not set ";
512  ret = false;
513  }
514  //then check that the table name has been set
515  if (getTableName().empty()) {
516  m_Error += "table name not set ";
517  ret = false;
518  }
519  // fill key types if not yet done
520  if (m_type.size() != m_keys.size()) {
521  getKeyTypes();
522  if (m_type.size() != m_keys.size()) {
523  m_Error += "key size does not correspond to table definition";
524  ret = false;
525  }
526  }
527  return ret;
528 }
529 
530 /* unsafe methods */
531 
532 std::vector<float> LMFDat::getData(int id) {
533  std::vector<float> ret;
534  if (m_data.find(id) != m_data.end()) {
535  ret = m_data[id];
536  }
537  return ret;
538 }
539 
540 std::vector<float> LMFDat::operator[](int id) { return getData(id); }
541 
542 std::vector<float> LMFDat::getData(const EcalLogicID &id) { return getData(id.getLogicID()); }
543 
544 /* safe methods */
545 
546 bool LMFDat::getData(int id, std::vector<float> &ret) {
547  bool retval = false;
548  if (m_data.find(id) != m_data.end()) {
549  ret = m_data[id];
550  retval = true;
551  }
552  return retval;
553 }
554 
555 bool LMFDat::getData(const EcalLogicID &id, std::vector<float> &ret) { return getData(id.getLogicID(), ret); }
556 
557 /* all data */
558 
559 std::map<int, std::vector<float> > LMFDat::getData() { return m_data; }
560 
561 /* unsafe */
562 
563 float LMFDat::getData(int id, unsigned int k) { return m_data[id][k]; }
564 
565 float LMFDat::getData(const EcalLogicID &id, unsigned int k) { return getData(id.getLogicID(), k); }
566 
567 float LMFDat::getData(const EcalLogicID &id, const std::string &key) { return getData(id.getLogicID(), m_keys[key]); }
568 
569 float LMFDat::getData(int id, const std::string &key) { return getData(id, m_keys[key]); }
570 
571 /* safe */
572 
573 bool LMFDat::getData(int id, unsigned int k, float &ret) {
574  bool retval = false;
575  std::vector<float> v;
576  retval = getData(id, v);
577  if ((retval) && (v.size() > k)) {
578  ret = v[k];
579  retval = true;
580  } else {
581  retval = false;
582  }
583  return retval;
584 }
585 
586 bool LMFDat::getData(const EcalLogicID &id, unsigned int k, float &ret) { return getData(id.getLogicID(), k, ret); }
587 
588 bool LMFDat::getData(int id, const std::string &key, float &ret) {
589  bool retval = false;
590  if (m_keys.find(key) != m_keys.end()) {
591  retval = getData(id, m_keys[key], ret);
592  }
593  return retval;
594 }
595 
596 bool LMFDat::getData(const EcalLogicID &id, const std::string &key, float &ret) {
597  return getData(id.getLogicID(), key, ret);
598 }
std::string m_className
Definition: LMFUnique.h:99
std::vector< std::string > _wherePars
Definition: LMFDat.h:150
def rm(path, rec=False)
Definition: eostools.py:363
LMFUnique & setInt(std::string key, int value)
Definition: LMFUnique.cc:31
void getNeighbour(LMFDat *dat, int which) noexcept(false)
Definition: LMFDat.cc:176
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void adjustParameters(int n, std::string &sql, Statement *stmt)
Definition: LMFDat.cc:207
bool isValid() override
Definition: LMFDat.cc:287
int getID() const
Definition: LMFUnique.h:58
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
void getPrevious(LMFDat *dat) noexcept(false)
Definition: LMFDat.cc:172
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
ret
prodAgent to be discontinued
int writeDB() noexcept(false) override
Definition: LMFDat.cc:337
int size() const
Definition: LMFDat.h:63
std::string buildInsertSql()
Definition: LMFDat.cc:95
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:23
std::map< std::string, LMFUnique * > m_foreignKeys
Definition: LMFUnique.h:106
std::map< int, std::vector< float > > m_data
Definition: LMFDat.h:143
std::vector< std::string > m_type
Definition: LMFDat.h:140
bool check()
Definition: LMFDat.cc:505
void getNext(LMFDat *dat) noexcept(false)
Definition: LMFDat.cc:174
std::map< int, std::vector< float > > fetchData() noexcept(false)
Definition: LMFDat.cc:299
int m_max
Definition: LMFDat.h:139
void fetch() noexcept(false)
Definition: LMFDat.cc:201
oracle::occi::Statement Statement
Definition: LMFUnique.h:24
Definition: LMFDat.h:18
std::string m_Error
Definition: LMFDat.h:147
virtual void dump() const
Definition: LMFUnique.cc:104
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559
LMFDat & setMaxDataToDump(int n)
Definition: LMFDat.cc:48
virtual std::string foreignKeyName() const
Definition: LMFDat.cc:30
void dump() const override
Definition: LMFDat.cc:64
int getLMFRunIOVID()
Definition: LMFDat.cc:32
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:187
LMFDat()
Definition: LMFDat.cc:9
void setWhereClause(std::string w)
Definition: LMFDat.cc:113
std::vector< float > operator[](int id)
Definition: LMFDat.cc:540
virtual std::string getIovIdFieldName() const
Definition: LMFDat.cc:111
double b
Definition: hdecay.h:118
std::map< std::string, unsigned int > m_keys
Definition: LMFDat.h:145
conn
Definition: getInfo.py:9
float x
std::string _where
Definition: LMFDat.h:149
def which(cmd)
Definition: eostools.py:336
virtual int writeForeignKeys() noexcept(false)
Definition: LMFUnique.cc:302
char m_debug
Definition: LMFUnique.h:100
std::string buildSelectSql(int logic_id=0, int direction=0)
Definition: LMFDat.cc:128
virtual std::string getTableName() const
Definition: LMFDat.h:45
std::map< unsigned int, std::string > getReverseMap() const
Definition: LMFDat.cc:53
void debug()
Definition: LMFUnique.h:74
std::pair< std::string, std::shared_ptr< void > > fetch(const cond::Hash &payloadId, Session &session)
Definition: CondDBFetch.cc:343
Definition: Tm.h:13
int fetchID() noexcept(false) override
Definition: LMFUnique.cc:197
void getKeyTypes() noexcept(false)
Definition: LMFDat.cc:474
std::string m_tableName
Definition: LMFDat.h:146