CMS 3D CMS Logo

EcalErrorMask.cc
Go to the documentation of this file.
4 
6 
8 
10 
11 #include <iostream>
12 
13 void EcalErrorMask::readDB(EcalCondDBInterface* eConn, RunIOV* runIOV) noexcept(false) {
14  if (eConn) {
15  RunIOV validIOV;
16  RunTag runTag = runIOV->getRunTag();
17 
19 
20  std::cout << std::endl;
21  std::cout << " RunCrystalErrorsDat: ";
22  try {
23  eConn->fetchValidDataSet(&mapCrystalErrors_, &validIOV, location, runIOV->getRunNumber());
24  std::cout << "found" << std::endl;
25  } catch (std::runtime_error& e) {
26  std::cout << "not found" << std::endl;
27  throw(std::runtime_error(e.what()));
28  }
29 
30  // use the IOV for CrystalErrors as reference
31  runNb_ = validIOV.getRunNumber();
32 
33  std::cout << " RunTTErrorsDat: ";
34  try {
35  eConn->fetchValidDataSet(&mapTTErrors_, &validIOV, location, runIOV->getRunNumber());
36  std::cout << "found" << std::endl;
37  } catch (std::runtime_error& e) {
38  std::cout << "not found" << std::endl;
39  }
40  std::cout << " RunPNErrorsDat: ";
41  try {
42  eConn->fetchValidDataSet(&mapPNErrors_, &validIOV, location, runIOV->getRunNumber());
43  std::cout << "found" << std::endl;
44  } catch (std::runtime_error& e) {
45  std::cout << "not found" << std::endl;
46  }
47  std::cout << " RunMemChErrorsDat: ";
48  try {
49  eConn->fetchValidDataSet(&mapMemChErrors_, &validIOV, location, runIOV->getRunNumber());
50  std::cout << "found" << std::endl;
51  } catch (std::runtime_error& e) {
52  std::cout << "not found" << std::endl;
53  }
54  std::cout << " RunMemTTErrorsDat: ";
55  try {
56  eConn->fetchValidDataSet(&mapMemTTErrors_, &validIOV, location, runIOV->getRunNumber());
57  std::cout << "found" << std::endl;
58  } catch (std::runtime_error& e) {
59  std::cout << "not found" << std::endl;
60  }
61 
62  std::cout << std::endl;
63  }
64 }
65 
66 void EcalErrorMask::fetchDataSet(std::map<EcalLogicID, RunCrystalErrorsDat>* fillMap) {
67  fillMap->clear();
68  *fillMap = mapCrystalErrors_;
69  return;
70 }
71 
72 void EcalErrorMask::fetchDataSet(std::map<EcalLogicID, RunTTErrorsDat>* fillMap) {
73  fillMap->clear();
74  *fillMap = mapTTErrors_;
75  return;
76 }
77 
78 void EcalErrorMask::fetchDataSet(std::map<EcalLogicID, RunPNErrorsDat>* fillMap) {
79  fillMap->clear();
80  *fillMap = mapPNErrors_;
81  return;
82 }
83 
84 void EcalErrorMask::fetchDataSet(std::map<EcalLogicID, RunMemChErrorsDat>* fillMap) {
85  fillMap->clear();
86  *fillMap = mapMemChErrors_;
87  return;
88 }
89 
90 void EcalErrorMask::fetchDataSet(std::map<EcalLogicID, RunMemTTErrorsDat>* fillMap) {
91  fillMap->clear();
92  *fillMap = mapMemTTErrors_;
93  return;
94 }
void readDB(EcalCondDBInterface *eConn, RunIOV *runIOV) noexcept(false)
std::map< EcalLogicID, RunPNErrorsDat > mapPNErrors_
Definition: EcalErrorMask.h:31
std::map< EcalLogicID, RunTTErrorsDat > mapTTErrors_
Definition: EcalErrorMask.h:30
std::map< EcalLogicID, RunMemTTErrorsDat > mapMemTTErrors_
Definition: EcalErrorMask.h:33
Definition: RunTag.h:13
std::map< EcalLogicID, RunCrystalErrorsDat > mapCrystalErrors_
Definition: EcalErrorMask.h:29
void fetchDataSet(std::map< EcalLogicID, RunCrystalErrorsDat > *fillMap)
run_t getRunNumber() const
Definition: RunIOV.cc:31
std::map< EcalLogicID, RunMemChErrorsDat > mapMemChErrors_
Definition: EcalErrorMask.h:32
std::string getLocation() const
Definition: LocationDef.cc:18
LocationDef getLocationDef() const
Definition: RunTag.cc:31
Definition: RunIOV.h:13