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 
26 void EcalErrorMask::readDB(EcalCondDBInterface* eConn, RunIOV* runIOV) noexcept(false) {
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 }
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
RunIOV
Definition: RunIOV.h:13
EcalErrorMask::mapCrystalErrors_
static std::map< EcalLogicID, RunCrystalErrorsDat > mapCrystalErrors_
Definition: EcalErrorMask.h:31
RunMemTTErrorsDat.h
RunIOV.h
RunTag
Definition: RunTag.h:13
gather_cfg.cout
cout
Definition: gather_cfg.py:144
LocationDef::getLocation
std::string getLocation() const
Definition: LocationDef.cc:18
EcalErrorMask::runNb_
static int runNb_
Definition: EcalErrorMask.h:29
EcalErrorMask.h
EcalErrorMask::fetchDataSet
static void fetchDataSet(std::map< EcalLogicID, RunCrystalErrorsDat > *fillMap)
Definition: EcalErrorMask.cc:79
RunCrystalErrorsDat.h
RunTag::getLocationDef
LocationDef getLocationDef() const
Definition: RunTag.cc:31
RunTTErrorsDat.h
RunIOV::getRunNumber
run_t getRunNumber() const
Definition: RunIOV.cc:31
EcalErrorMask::mapMemChErrors_
static std::map< EcalLogicID, RunMemChErrorsDat > mapMemChErrors_
Definition: EcalErrorMask.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalSubdetector.h
EcalErrorMask::readDB
static void readDB(EcalCondDBInterface *eConn, RunIOV *runIOV) noexcept(false)
Definition: EcalErrorMask.cc:26
RunPNErrorsDat.h
EcalErrorMask::mapMemTTErrors_
static std::map< EcalLogicID, RunMemTTErrorsDat > mapMemTTErrors_
Definition: EcalErrorMask.h:35
EcalErrorMask::mapPNErrors_
static std::map< EcalLogicID, RunPNErrorsDat > mapPNErrors_
Definition: EcalErrorMask.h:33
EcalLogicID.h
EcalErrorMask::mapTTErrors_
static std::map< EcalLogicID, RunTTErrorsDat > mapTTErrors_
Definition: EcalErrorMask.h:32
EcalCondDBWriter_cfi.location
location
Definition: EcalCondDBWriter_cfi.py:63
EcalErrorDictionary.h
RunMemChErrorsDat.h
EcalCondDBInterface.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37