34 std::ofstream outStream(
dumprefs.c_str());
35 std::cout <<
"--- Dumping Pedestals - reference ---" << std::endl;
40 std::cout <<
"--- Dumping Pedestals - updated ---" << std::endl;
47 std::vector<DetId>::iterator cell;
48 bool failflag =
false;
49 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
51 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
52 if (cell == listNewChan.end())
60 const float* oldvalue = (myRefPeds->
getValues(mydetid))->getValues();
61 if ((*oldvalue != *
values) || (*(oldvalue + 1) != *(
values + 1)) || (*(oldvalue + 2) != *(
values + 2)) ||
62 (*(oldvalue + 3) != *(
values + 3))) {
63 throw cms::Exception(
"DataDoesNotMatch") <<
"Value does not match";
69 listNewChan.erase(cell);
73 std::cout <<
"These are identical" << std::endl;
79 std::vector<DetId>::iterator cell;
80 bool failflag =
false;
81 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
83 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
84 if (cell == listNewChan.end()) {
88 const float* oldvalue = (myRefPeds->
getValues(mydetid))->getValues();
91 throw cms::Exception(
"DataDoesNotMatch") <<
"Values differ by more than deltaP";
95 listNewChan.erase(cell);
99 std::cout <<
"These are identical to within deltaP" << std::endl;
110 std::vector<DetId>::iterator cell;
111 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
113 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
114 if (cell == listNewChan.end())
126 listNewChan.erase(cell);
130 for (std::vector<DetId>::iterator it = listNewChan.begin(); it != listNewChan.end(); it++)
142 std::vector<HcalGenericDetId> listEMap = myRefEMap->
allPrecisionId();
145 for (std::vector<HcalGenericDetId>::const_iterator it = listEMap.begin(); it != listEMap.end(); it++) {
149 if (
std::find(listResult.begin(), listResult.end(), mydetid) == listResult.end()) {
156 std::ofstream outStream3(
outfile.c_str());
157 std::cout <<
"--- Dumping Pedestals - the combined ones ---" << std::endl;