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