31 std::cout <<
"--- Dumping QIEs - update ---" << std::endl;
35 std::ofstream outStream2(
dumprefs.c_str());
36 std::cout <<
"--- Dumping QIEs - reference ---" << std::endl;
45 std::vector<DetId>::iterator cell;
48 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
50 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
51 if (cell == listNewChan.end())
53 throw cms::Exception(
"DataDoesNotMatch") <<
"Value not found in reference" << std::endl;
59 bool failflag =
false;
100 if (first->
slope(1, 0) != second->
slope(1, 0))
102 if (first->
slope(1, 1) != second->
slope(1, 1))
104 if (first->
slope(1, 2) != second->
slope(1, 2))
106 if (first->
slope(1, 3) != second->
slope(1, 3))
108 if (first->
slope(2, 0) != second->
slope(2, 0))
110 if (first->
slope(2, 1) != second->
slope(2, 1))
112 if (first->
slope(2, 2) != second->
slope(2, 2))
114 if (first->
slope(2, 3) != second->
slope(2, 3))
116 if (first->
slope(3, 0) != second->
slope(3, 0))
118 if (first->
slope(3, 1) != second->
slope(3, 1))
120 if (first->
slope(3, 2) != second->
slope(3, 2))
122 if (first->
slope(3, 3) != second->
slope(3, 3))
125 throw cms::Exception(
"DataDoesNotMatch") <<
"Values are do not match";
127 listNewChan.erase(cell);
130 std::cout <<
"These are identical" << std::endl;
138 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
140 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
141 if (cell == listNewChan.end())
151 listNewChan.erase(cell);
154 for (std::vector<DetId>::iterator it = listNewChan.begin(); it != listNewChan.end(); it++)
162 std::ofstream outStream3(
outfile.c_str());
163 std::cout <<
"--- Dumping QIEs - the combined ones ---" << std::endl;
172 std::vector<HcalGenericDetId> listEMap = myRefEMap->
allPrecisionId();
173 for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); it++) {
175 if (
std::find(listResult.begin(), listResult.end(), mydetid) == listResult.end()) {
HcalQIEDataCheck(edm::ParameterSet const &ps)
T getUntrackedParameter(std::string const &, T const &) const
float slope(unsigned fCapId, unsigned fRange) const
const HcalQIECoder * getCoder(DetId fId) const
get QIE parameters
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool addCoder(const HcalQIECoder &fCoder)
U second(std::pair< T, U > const &p)
#define DEFINE_FWK_MODULE(type)
float offset(unsigned fCapId, unsigned fRange) const
std::vector< DetId > getAllChannels() const
std::vector< HcalGenericDetId > allPrecisionId() const
~HcalQIEDataCheck() override
void analyze(const edm::Event &ev, const edm::EventSetup &es) override
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
T const * product() const
const HcalTopology * topo() const