35 std::cout <<
"--- Dumping PedestalWidths - update ---" << std::endl;
39 std::ofstream outStream2(
dumprefs.c_str());
40 std::cout <<
"--- Dumping PedestalWidths - reference ---" << std::endl;
51 std::vector<DetId>::iterator cell;
54 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
56 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
57 if (cell == listNewChan.end())
59 throw cms::Exception(
"DataDoesNotMatch") <<
"Value not found in reference" << std::endl;
64 const float* newwidth =
first->getValues();
65 const float* oldwidth =
second->getValues();
66 if ((*newwidth != *oldwidth) || (*(newwidth + 1) != *(oldwidth + 1)) || (*(newwidth + 2) != *(oldwidth + 2)) ||
67 (*(newwidth + 3) != *(oldwidth + 3)) || (*(newwidth + 4) != *(oldwidth + 4)) ||
68 (*(newwidth + 5) != *(oldwidth + 5)) || (*(newwidth + 6) != *(oldwidth + 6)) ||
69 (*(newwidth + 7) != *(oldwidth + 7)) || (*(newwidth + 8) != *(oldwidth + 8)) ||
70 (*(newwidth + 9) != *(oldwidth + 9))) {
71 throw cms::Exception(
"DataDoesNotMatch") <<
"Values are not identical" << std::endl;
73 listNewChan.erase(cell);
76 std::cout <<
"These are identical" << std::endl;
80 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
82 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
83 if (cell == listNewChan.end())
85 throw cms::Exception(
"DataDoesNotMatch") <<
"Value not found in reference" << std::endl;
90 const float* newwidth =
first->getValues();
91 const float* oldwidth =
second->getValues();
92 if (fabs(*newwidth - *oldwidth) >
epsilon || fabs(*(newwidth + 1) - *(oldwidth + 1)) >
epsilon ||
93 fabs(*(newwidth + 2) - *(oldwidth + 2)) >
epsilon || fabs(*(newwidth + 3) - *(oldwidth + 3)) >
epsilon ||
94 fabs(*(newwidth + 4) - *(oldwidth + 4)) >
epsilon || fabs(*(newwidth + 5) - *(oldwidth + 5)) >
epsilon ||
95 fabs(*(newwidth + 6) - *(oldwidth + 6)) >
epsilon || fabs(*(newwidth + 7) - *(oldwidth + 7)) >
epsilon ||
96 fabs(*(newwidth + 8) - *(oldwidth + 8)) >
epsilon || fabs(*(newwidth + 9) - *(oldwidth + 9)) >
epsilon) {
97 throw cms::Exception(
"DataDoesNotMatch") <<
"Values differ by more than deltaW" << std::endl;
99 listNewChan.erase(cell);
102 std::cout <<
"These are identical" << std::endl;
105 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
107 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
108 if (cell == listNewChan.end())
119 listNewChan.erase(cell);
123 for (std::vector<DetId>::iterator it = listNewChan.begin(); it != listNewChan.end(); it++)
131 std::ofstream outStream3(
outfile.c_str());
132 std::cout <<
"--- Dumping PedestalWidths - the combined ones ---" << std::endl;
139 std::vector<HcalGenericDetId> listEMap = myRefEMap->
allPrecisionId();
141 for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); it++) {
143 if (
std::find(listResult.begin(), listResult.end(), mydetid) == listResult.end()) {