CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalCondDBInterface.cc
Go to the documentation of this file.
1 // $Id: EcalCondDBInterface.cc,v 1.29 2010/12/21 16:56:16 organtin Exp $
2 
3 #include <iostream>
4 #include <string>
5 #include <vector>
6 #include <sstream>
7 #include <stdlib.h>
8 #include <cstdlib>
9 #include <time.h>
10 #include <stdexcept>
12 
18 
25 
26 using namespace std;
27 using namespace oracle::occi;
28 
29 
31  throw(std::runtime_error)
32 {
33 
34  string sql = "SELECT name, logic_id, id1, id2, id3, maps_to FROM channelView WHERE logic_id = :logicID AND name=maps_to";
35 
36  int id1, id2, id3;
37  string name, mapsTo;
38 
39  try {
40  stmt->setSQL(sql);
41  stmt->setInt(1, logicID);
42  ResultSet* rset = stmt->executeQuery();
43 
44  if (rset->next()) {
45  name = rset->getString(1);
46  logicID = rset->getInt(2);
47  id1 = rset->getInt(3);
48  if (rset->isNull(3)) { id1 = EcalLogicID::NULLID; }
49  id2 = rset->getInt(4);
50  if (rset->isNull(4)) { id2 = EcalLogicID::NULLID; }
51  id3 = rset->getInt(5);
52  if (rset->isNull(5)) { id3 = EcalLogicID::NULLID; }
53  mapsTo = rset->getString(6);
54  } else {
55  stringstream msg;
56  msg << "ERROR: Cannot build EcalLogicID for logic_id " << logicID;
57  throw(std::runtime_error(msg.str()));
58  }
59 
60  } catch (SQLException &e) {
61  throw(std::runtime_error("ERROR: Failed to retrive ids: " + e.getMessage() ));
62  }
63 
64  return EcalLogicID( name, logicID, id1, id2, id3, mapsTo );
65 }
66 
67 
68 
70  int id1,
71  int id2,
72  int id3,
73  string mapsTo )
74  throw(std::runtime_error)
75 {
76 
77  if (mapsTo == "") {
78  mapsTo = name;
79  }
80 
81  // build the sql string
82  stringstream ss;
83  ss << "SELECT logic_id FROM channelView WHERE name = :n AND";
84  int idarray[] = {id1, id2, id3};
85  for (int i=1; i<=3; i++) {
86  if (idarray[i-1] == EcalLogicID::NULLID) {
87  ss << " id"<<i<<" IS NULL AND";
88  } else {
89  ss << " id"<<i<<" = :id"<<i<<" AND";
90  }
91  }
92  ss <<" maps_to = :m";
93 
94  // cout << "SQL: " << ss.str() << endl;
95 
96  int logic_id;
97  try {
98  stmt->setSQL(ss.str());
99 
100  // bind the parameters
101  int j = 1; // parameter number counter
102  stmt->setString(j, name);
103  j++;
104  for (int i=0; i<3; i++) {
105  if (idarray[i] != EcalLogicID::NULLID) {
106  stmt->setInt(j, idarray[i]);
107  j++;
108  }
109  }
110  stmt->setString(j, mapsTo);
111 
112  // execute the statement and retrieve the logic_id
113  ResultSet* rset = stmt->executeQuery();
114  if ( rset->next() ) {
115  logic_id = rset->getInt(1);
116  } else {
117  stringstream msg;
118  msg << "ERROR: Query for EcalLogicID failed for parameters [" <<
119  "name=" << name << ",maps_to=" << mapsTo <<
120  ",id1=" << id1 << ",id2=" << id2 << ",id3=" << id3 << "]";
121  throw(std::runtime_error(msg.str()));
122  }
123  } catch (SQLException &e) {
124  throw(std::runtime_error("ERROR: Failed to retrive logic_id: " + e.getMessage() ));
125  }
126 
127  // create and return the EcalLogicID object
128  return EcalLogicID(name, logic_id, id1, id2, id3, mapsTo);
129 }
130 
131 std::vector<EcalLogicID> EcalCondDBInterface::getEcalLogicIDSet( string name,
132  int fromId1, int toId1,
133  int fromId2, int toId2,
134  int fromId3, int toId3,
135  string mapsTo )
136  throw(std::runtime_error)
137 {
138  if (mapsTo == "") {
139  mapsTo = name;
140  }
141 
142  int idArray[] = { fromId1, toId1, fromId2, toId2, fromId3, toId3 };
143  int from, to;
144 
145  stringstream ss;
146  ss << "SELECT name, logic_id, id1, id2, id3, maps_to FROM channelView WHERE name = :name AND ";
147 
148  // loop through the three ids
149  for (int i=1; i<=3; i++) {
150  from = idArray[2*(i-1)];
151  to = idArray[2*(i-1) + 1];
152 
153  // check the id arguments in pairs
154  if ((from == EcalLogicID::NULLID && to != EcalLogicID::NULLID) || // one is null
155  (from != EcalLogicID::NULLID && to == EcalLogicID::NULLID) || // but not the other
156  (from > to)) { // negative interval
157  throw(std::runtime_error("ERROR: Bad arguments for getEcalLogicIDSet"));
158  }
159 
160  // build the sql
161  if (from == EcalLogicID::NULLID && to == EcalLogicID::NULLID) {
162  ss << "id" << i << " IS NULL AND ";
163  } else {
164  ss << "id" << i << " >= :id" << i << "from AND " <<
165  "id" << i << " <= :id" << i << "to AND ";
166  }
167  }
168  ss << "maps_to = :maps_to ORDER BY id1, id2, id3";
169 
170  std::vector<EcalLogicID> result;
171 
172  try {
173  stmt->setSQL(ss.str());
174 
175  // bind the parameters
176  int j = 1; // parameter number counter
177  stmt->setString(j, name);
178  j++;
179 
180  for (int i=0; i<3; i++) {
181  from = idArray[2*i];
182  to = idArray[2*i + 1];
183  if (from != EcalLogicID::NULLID) {
184  stmt->setInt(j, from);
185  j++;
186  stmt->setInt(j, to);
187  j++;
188  }
189  }
190 
191  stmt->setString(j, mapsTo);
192 
193 
194  stmt->setPrefetchRowCount(IDBObject::ECALDB_NROWS);
195 
196  ResultSet* rset = stmt->executeQuery();
197 
198  int id1, id2, id3, logicId;
199 
200  while (rset->next()) {
201  name = rset->getString(1);
202  logicId = rset->getInt(2);
203  id1 = rset->getInt(3);
204  if (rset->isNull(3)) { id1 = EcalLogicID::NULLID; }
205  id2 = rset->getInt(4);
206  if (rset->isNull(4)) { id2 = EcalLogicID::NULLID; }
207  id3 = rset->getInt(5);
208  if (rset->isNull(5)) { id3 = EcalLogicID::NULLID; }
209  mapsTo = rset->getString(6);
210 
211  EcalLogicID ecid = EcalLogicID( name, logicId, id1, id2, id3, mapsTo );
212  result.push_back(ecid);
213  }
214  stmt->setPrefetchRowCount(0);
215 
216  } catch (SQLException &e) {
217  throw(std::runtime_error("ERROR: Failure while getting EcalLogicID set: " + e.getMessage() ));
218  }
219 
220  return result;
221 }
222 
224  std::map<int, int> ret;
225  std::vector<EcalLogicID> crystals_EB =
226  getEcalLogicIDSetOrdered( "EB_crystal_number",
227  1,36,1,1700,
229  "EB_crystal_number", EcalLogicID::NULLID);
230  std::vector<EcalLogicID> crystals_EE =
231  getEcalLogicIDSetOrdered( "EE_crystal_number",
232  -1,1,1,100,
233  1,100,
234  "EE_crystal_number", EcalLogicID::NULLID);
235  std::vector<EcalLogicID> EB_lmr =
236  getEcalLogicIDSetOrdered( "EB_crystal_number",
237  1,36,1,1700,
239  "ECAL_LMR", EcalLogicID::NULLID);
240  std::vector<EcalLogicID> EE_lmr =
241  getEcalLogicIDSetOrdered( "EE_crystal_number",
242  -1,1,1,100,
243  1,100,
244  "ECAL_LMR", EcalLogicID::NULLID);
245  unsigned int neb = crystals_EB.size();
246  unsigned int nee = crystals_EE.size();
247  if (neb != EB_lmr.size()) {
248  throw(std::runtime_error("ERROR: EB Vectors size do not agree"));
249  }
250  if (nee != EE_lmr.size()) {
251  throw(std::runtime_error("ERROR: EE Vectors size do not agree"));
252  }
253  for (unsigned int i = 0; i < neb; i++) {
254  ret[crystals_EB[i].getLogicID()] = EB_lmr[i].getLogicID() % 100;
255  }
256  for (unsigned int i = 0; i < nee; i++) {
257  ret[crystals_EE[i].getLogicID()] = EE_lmr[i].getLogicID() % 100;
258  }
259  return ret;
260 }
261 
262 std::vector<EcalLogicID> EcalCondDBInterface::getEcalLogicIDSetOrdered( string name,
263  int fromId1, int toId1,
264  int fromId2, int toId2,
265  int fromId3, int toId3,
266  string mapsTo, int orderedBy )
267  // the orderedBy can be 1, 2, 3, 4
268  // corresponding to id1 id2 id3 or logic_id
269  throw(std::runtime_error)
270 {
271  if (mapsTo == "") {
272  mapsTo = name;
273  }
274 
275  int idArray[] = { fromId1, toId1, fromId2, toId2, fromId3, toId3 };
276  int from, to;
277 
278  stringstream ss;
279  ss << "SELECT name, logic_id, id1, id2, id3, maps_to FROM channelView WHERE name = :name AND ";
280 
281  // loop through the three ids
282  for (int i=1; i<=3; i++) {
283  from = idArray[2*(i-1)];
284  to = idArray[2*(i-1) + 1];
285 
286  // check the id arguments in pairs
287  if ((from == EcalLogicID::NULLID && to != EcalLogicID::NULLID) || // one is null
288  (from != EcalLogicID::NULLID && to == EcalLogicID::NULLID) || // but not the other
289  (from > to)) { // negative interval
290  throw(std::runtime_error("ERROR: Bad arguments for getEcalLogicIDSet"));
291  }
292 
293  // build the sql
294  if (from == EcalLogicID::NULLID && to == EcalLogicID::NULLID) {
295  ss << "id" << i << " IS NULL AND ";
296  } else {
297  ss << "id" << i << " >= :id" << i << "from AND " <<
298  "id" << i << " <= :id" << i << "to AND ";
299  }
300  }
301  ss << "maps_to = :maps_to ";
302 
303  if(orderedBy==EcalLogicID::NULLID){
304  ss<<" ORDER BY id1, id2, id3";
305  } else if(orderedBy==1 || orderedBy==12 || orderedBy==123){
306  ss<<" ORDER BY id1, id2, id3 ";
307  } else if (orderedBy==213 || orderedBy==21 ){
308  ss<<" ORDER BY id2, id1, id3 ";
309  } else if (orderedBy==231|| orderedBy==23){
310  ss<<" ORDER BY id2, id3, id1 ";
311  } else if (orderedBy==321|| orderedBy==32){
312  ss<<" ORDER BY id3, id2, id1 ";
313  } else if (orderedBy==312|| orderedBy==31){
314  ss<<" ORDER BY id3, id1, id2 ";
315  } else if (orderedBy==132|| orderedBy==13){
316  ss<<" ORDER BY id1, id3, id2 ";
317  } else if (orderedBy==1234 ){
318  ss<<" ORDER BY id1, id2, id3, logic_id ";
319  } else if (orderedBy==4) {
320  ss<<" ORDER BY logic_id ";
321  } else {
322  ss<<" ORDER BY id1, id2, id3";
323  }
324 
325  std::vector<EcalLogicID> result;
326 
327  try {
328  stmt->setSQL(ss.str());
329 
330  // bind the parameters
331  int j = 1; // parameter number counter
332  stmt->setString(j, name);
333  j++;
334 
335  for (int i=0; i<3; i++) {
336  from = idArray[2*i];
337  to = idArray[2*i + 1];
338  if (from != EcalLogicID::NULLID) {
339  stmt->setInt(j, from);
340  j++;
341  stmt->setInt(j, to);
342  j++;
343  }
344  }
345 
346  stmt->setString(j, mapsTo);
347 
348 
349  stmt->setPrefetchRowCount(IDBObject::ECALDB_NROWS);
350 
351  ResultSet* rset = stmt->executeQuery();
352 
353  int id1, id2, id3, logicId;
354 
355  while (rset->next()) {
356  name = rset->getString(1);
357  logicId = rset->getInt(2);
358  id1 = rset->getInt(3);
359  if (rset->isNull(3)) { id1 = EcalLogicID::NULLID; }
360  id2 = rset->getInt(4);
361  if (rset->isNull(4)) { id2 = EcalLogicID::NULLID; }
362  id3 = rset->getInt(5);
363  if (rset->isNull(5)) { id3 = EcalLogicID::NULLID; }
364  mapsTo = rset->getString(6);
365 
366  EcalLogicID ecid = EcalLogicID( name, logicId, id1, id2, id3, mapsTo );
367  result.push_back(ecid);
368  }
369  stmt->setPrefetchRowCount(0);
370 
371  } catch (SQLException &e) {
372  throw(std::runtime_error("ERROR: Failure while getting EcalLogicID set: " + e.getMessage() ));
373  }
374 
375  return result;
376 }
377 
378 
379 
381  throw(std::runtime_error)
382 {
383  try {
384  iov->setConnection(env, conn);
385  iov->writeDB();
386  } catch(std::runtime_error &e) {
387  conn->rollback();
388  throw(e);
389  }
390  conn->commit();
391 }
392 
394  throw(std::runtime_error)
395 {
396  try {
397  iov->setConnection(env, conn);
398  iov->writeDB();
399  } catch(std::runtime_error &e) {
400  conn->rollback();
401  throw(e);
402  }
403  conn->commit();
404 }
405 
407  throw(std::runtime_error)
408 {
409  try {
410  iov->setConnection(env, conn);
411  iov->writeDB();
412  } catch(std::runtime_error &e) {
413  conn->rollback();
414  throw(e);
415  }
416  conn->commit();
417 }
418 
420  throw(std::runtime_error)
421 {
422  try {
423  iov->setConnection(env, conn);
424  iov->writeDB();
425  } catch(std::runtime_error &e) {
426  conn->rollback();
427  throw(e);
428  }
429  conn->commit();
430 }
431 
433  throw(std::runtime_error)
434 {
435  try {
436  dat->setConnection(env, conn);
437  dat->writeDB();
438  } catch(std::runtime_error &e) {
439  conn->rollback();
440  throw(e);
441  }
442  conn->commit();
443 }
444 
445 void EcalCondDBInterface::insertLmfDat(std::list<LMFDat *> dat)
446  throw(std::runtime_error)
447 {
448  try {
449  std::list<LMFDat *>::iterator i = dat.begin();
450  std::list<LMFDat *>::iterator e = dat.end();
451  while (i != e) {
452  (*i)->setConnection(env, conn);
453  (*i)->writeDB();
454  i++;
455  }
456  } catch(std::runtime_error &e) {
457  conn->rollback();
458  throw(e);
459  }
460  conn->commit();
461 }
462 
464  throw(std::runtime_error)
465 {
466  try {
467  iov->setConnection(env, conn);
468  iov->writeDB();
469  } catch(std::runtime_error &e) {
470  conn->rollback();
471  throw(e);
472  }
473  conn->commit();
474 }
475 
477  throw(std::runtime_error)
478 {
479  try {
480  iov->setConnection(env, conn);
481  iov->updateEndTimeDB();
482  } catch(std::runtime_error &e) {
483  conn->rollback();
484  throw(e);
485  }
486  conn->commit();
487 }
488 
490  throw(std::runtime_error)
491 {
492  try {
493  iov->setConnection(env, conn);
494  iov->updateEndTimeDB();
495  } catch(std::runtime_error &e) {
496  conn->rollback();
497  throw(e);
498  }
499  conn->commit();
500 }
501 
503  throw(std::runtime_error)
504 {
505  try {
506  iov->setConnection(env, conn);
507  iov->updateStartTimeDB();
508  } catch(std::runtime_error &e) {
509  conn->rollback();
510  throw(e);
511  }
512  conn->commit();
513 }
514 
516  throw(std::runtime_error)
517 {
518  try {
519  od->setConnection(env, conn);
520  od->updateDefaultCycle();
521  } catch(std::runtime_error &e) {
522  conn->rollback();
523  throw(e);
524  }
525  conn->commit();
526 }
527 
529  throw(std::runtime_error)
530 {
531  RunIOV iov;
532  iov.setConnection(env, conn);
533  iov.setByRun(tag, run);
534  return iov;
535 }
536 
537 
538 
540  throw(std::runtime_error)
541 {
542  RunIOV iov;
543  iov.setConnection(env, conn);
544  iov.setByRun(location, run);
545  return iov;
546 }
547 
548 
549 
550 
552  throw(std::runtime_error)
553 {
554  try {
555  iov->setConnection(env, conn);
556  iov->writeDB();
557  } catch(std::runtime_error &e) {
558  conn->rollback();
559  throw(e);
560  }
561  conn->commit();
562 }
563 
565  throw(std::runtime_error)
566 {
567  try {
568  iov->setConnection(env, conn);
569  iov->writeDB();
570  } catch(std::runtime_error &e) {
571  conn->rollback();
572  throw(e);
573  }
574  conn->commit();
575 }
576 
577 
578 
579 
581  throw(std::runtime_error)
582 {
583  RunIOV runiov = fetchRunIOV(runtag, run);
584  MonRunIOV moniov;
585  moniov.setConnection(env, conn);
586  moniov.setByRun(montag, &runiov, subrun);
587  return moniov;
588 }
589 
590 
591 
593  throw(std::runtime_error)
594 {
595  DCUIOV dcuiov;
596  dcuiov.setConnection(env, conn);
597  dcuiov.setByTm(tag, eventTm);
598  return dcuiov;
599 }
600 
602  LMFSeqDat seq(env, conn);
603  return seq.fetchLastRun();
604 }
605 
607  throw(std::runtime_error)
608 {
609  RunIOV runiov = fetchRunIOV(runtag, run);
610  LMFRunIOV lmfiov;
611  lmfiov.setConnection(env, conn);
612  // lmfiov.setByRun(lmftag, &runiov, subrun);
613  return lmfiov;
614 }
615 
617  int lmr, int type, int color ) const {
618  bool ret = false;
619  iov.setConnection(env, conn);
620  std::list<LMFRunIOV> iovlist = iov.fetchBySequence(seq, lmr, type, color);
621  int s = iovlist.size();
622  if (s > 0) {
623  iov = iovlist.front();
624  ret = true;
625  if (s > 1) {
626  // should not happen
627  std::cout << "################################" << std::endl;
628  std::cout << "################################" << std::endl;
629  std::cout << "WARNING: More than one LMFRUNIOV" << std::endl;
630  std::cout << " Found for seq " << seq.getID() << std::endl;
631  std::cout << " lmr " << lmr << " type " << type << std::endl;
632  std::cout << " and color " << color << std::endl;
633  std::cout << "################################" << std::endl;
634  std::cout << "################################" << std::endl;
635  }
636  } else {
637  // find the most recent data
638  iovlist = iov.fetchLastBeforeSequence(seq, lmr, type, color);
639  s = iovlist.size();
640  if (s == 1) {
641  iov = iovlist.front();
642  }
643  }
644  return ret;
645 }
646 
648  throw(std::runtime_error)
649 {
650  CaliIOV caliiov;
651  caliiov.setConnection(env, conn);
652  caliiov.setByTm(tag, eventTm);
653  return caliiov;
654 }
655 
657  throw(std::runtime_error)
658 {
660  r.setConnection(env, conn);
661  r.fetchValuesForECID(ecid);
662  return r;
663 }
664 
666  throw(std::runtime_error)
667 {
669  r.setConnection(env, conn);
670  r.fetchValuesForECIDAndTime(ecid, start, end);
671  return r;
672 }
673 
675  throw(std::runtime_error)
676 {
677  RunList r;
678  r.setConnection(env, conn);
679  r.setRunTag(tag);
680  r.fetchRuns();
681  return r;
682 }
683 
684 RunList EcalCondDBInterface::fetchRunList(RunTag tag, int min_run, int max_run) throw(std::runtime_error){
685  RunList r;
686  r.setConnection(env, conn);
687  r.setRunTag(tag);
688  r.fetchRuns( min_run, max_run);
689  return r;
690 }
691 
693  throw(std::runtime_error) {
694  RunList r;
695  r.setConnection(env, conn);
696  r.setRunTag(tag);
697  r.fetchRunsByLocation( min_run, max_run, locDef);
698  return r;
699 }
700 
702  throw(std::runtime_error) {
703  RunList r;
704  r.setConnection(env, conn);
705  r.setRunTag(tag);
706  r.fetchGlobalRunsByLocation( min_run, max_run, locDef);
707  return r;
708 }
709 
711  throw(std::runtime_error){
712  RunList r;
713  r.setConnection(env, conn);
714  r.setRunTag(tag);
715  r.fetchLastNRuns( max_run, n_runs);
716  return r;
717 }
718 
719 
720 
721 
722 // from here it is for the MonRunList
723 
725  throw(std::runtime_error)
726 {
727  MonRunList r;
728  r.setConnection(env, conn);
729  r.setRunTag(tag);
730  r.setMonRunTag(monrunTag);
731  r.fetchRuns();
732  return r;
733 }
734 
736  throw(std::runtime_error)
737 {
738  MonRunList r;
739  r.setConnection(env, conn);
740  r.setRunTag(tag);
741  r.setMonRunTag(monrunTag);
742  r.fetchRuns(min_run, max_run);
743  return r;
744 }
745 
747  throw(std::runtime_error)
748 {
749  MonRunList r;
750  r.setConnection(env, conn);
751  r.setRunTag(tag);
752  r.setMonRunTag(monrunTag);
753  r.fetchLastNRuns(max_run, n_runs );
754  return r;
755 }
756 
757 
758 
760 {
761 }
std::vector< EcalLogicID > getEcalLogicIDSet(std::string name, int fromId1=EcalLogicID::NULLID, int toId1=EcalLogicID::NULLID, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="")
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
int run_t
Definition: CaliIOV.h:11
int getID() const
Definition: LMFUnique.h:51
void insertRunIOV(RunIOV *iov)
std::list< LMFRunIOV > fetchBySequence(const LMFSeqDat &s)
Definition: LMFRunIOV.cc:345
void setByTm(DCUTag *tag, Tm time)
Definition: DCUIOV.cc:214
void setRunTag(RunTag tag)
Definition: RunList.cc:22
void fetchRuns()
Definition: MonRunList.cc:52
Definition: RunTag.h:13
RunList fetchRunListByLocation(RunTag tag, int min_run, int max_run, const LocationDef locDef)
DCSPTMTempList fetchDCSPTMTempList(EcalLogicID ecid)
void fetchLastNRuns(int max_run, int n_runs)
Definition: RunList.cc:137
void insertLmfDat(LMFDat *dat)
RunIOV fetchRunIOV(RunTag *tag, run_t run)
void updateRunIOVStartTime(RunIOV *iov)
void fetchRuns()
Definition: RunList.cc:40
void insertLmfSeq(LMFSeqDat *iov)
Definition: DCUIOV.h:13
oracle::occi::SQLException SQLException
Definition: HcalDbOmds.cc:22
void setRunTag(RunTag tag)
Definition: MonRunList.cc:23
DCUIOV fetchDCUIOV(DCUTag *tag, Tm evenTm)
LMFRunIOV fetchLMFRunIOV(RunTag *runtag, LMFRunTag *lmftag, run_t run, subrun_t lmfrun)
std::vector< EcalLogicID > getEcalLogicIDSetOrdered(std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID)
CaliIOV fetchCaliIOV(CaliTag *tag, Tm evenTm)
void setByRun(RunTag *tag, run_t run)
Definition: RunIOV.cc:376
RunList fetchGlobalRunListByLocation(RunTag tag, int min_run, int max_run, const LocationDef locDef)
void setByRun(MonRunTag *montag, RunIOV *runiov, subrun_t subrun)
Definition: MonRunIOV.cc:292
tuple iov
Definition: o2o.py:307
RunList fetchRunList(RunTag tag)
MonRunList fetchMonRunListLastNRuns(RunTag tag, MonRunTag monruntag, int max_run, int n_runs)
Definition: LMFDat.h:19
tuple result
Definition: query.py:137
std::map< int, int > getEcalLogicID2LmrMap()
int subrun_t
Definition: MODRunIOV.h:11
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="")
RunIOV fetchLMFLastRun() const
int j
Definition: DBlmapReader.cc:9
void insertDCUIOV(DCUIOV *iov)
#define end
Definition: vmac.h:38
void fetchValuesForECIDAndTime(EcalLogicID ecid, Tm start, Tm end)
void insertLmfRunIOV(LMFRunIOV *iov)
Definition: LMFIOV.h:17
void insertLmfIOV(LMFIOV *iov)
void updateRunConfig(ODRunConfigInfo *od)
void fetchGlobalRunsByLocation(int min_run, int max_run, const LocationDef locDef)
Definition: RunList.cc:300
static std::string from(" from ")
MonRunList fetchMonRunList(RunTag tag, MonRunTag monruntag)
void fetchLastNRuns(int max_run, int n_runs)
Definition: MonRunList.cc:259
RunIOV fetchLastRun()
Definition: LMFSeqDat.cc:262
oracle::occi::ResultSet ResultSet
Definition: HcalDbOmds.cc:21
MonRunIOV fetchMonRunIOV(RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun)
static int const ECALDB_NROWS
Definition: IDBObject.h:18
void fetchValuesForECID(EcalLogicID ecid)
RunList fetchRunListLastNRuns(RunTag tag, int max_run, int n_runs)
void fetchRunsByLocation(int min_run, int max_run, const LocationDef locDef)
Definition: RunList.cc:211
void insertMonRunIOV(MonRunIOV *iov)
static const int NULLID
Definition: EcalLogicID.h:43
void setMonRunTag(MonRunTag tag)
Definition: MonRunList.cc:29
tuple cout
Definition: gather_cfg.py:41
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
string s
Definition: asciidump.py:422
void updateRunIOV(RunIOV *iov)
std::list< LMFRunIOV > fetchLastBeforeSequence(const LMFSeqDat &s, int lmr, int type, int color)
Definition: LMFRunIOV.cc:377
void updateRunIOVEndTime(RunIOV *iov)
Definition: RunIOV.h:13
void insertLmfLmrSubIOV(LMFLmrSubIOV *iov)
Definition: Tm.h:14
void setByTm(CaliTag *tag, Tm time)
Definition: CaliIOV.cc:215
Definition: DCUTag.h:13