CMS 3D CMS Logo

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