24 std::vector<DetId>::iterator cell;
25 bool failflag =
false;
26 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
28 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
29 if (cell == listNewChan.end()) {
33 const float* oldvalue = (myRefPeds->
getValues(mydetid))->getValues();
34 if ((*values == 0) && (*(values + 1) == 0) && (*(values + 2) == 0) && (*(values + 3) == 0))
36 if ((*oldvalue - *values) + (*(oldvalue + 1) - *(values + 1)) + (*(oldvalue + 2) - *(values + 2)) +
37 (*(oldvalue + 3) - *(values + 3)) / 4 >
40 << (*oldvalue - *
values) <<
" " << (*(oldvalue + 1) - *(values + 1)) <<
" " 41 << (*(oldvalue + 2) - *(values + 2)) <<
" " << (*(oldvalue + 3) - *(values + 3)) << std::endl;
44 listNewChan.erase(cell);
49 std::cout <<
"These are identical to within deltaP" << std::endl;
52 std::ofstream outStream3(
outfile.c_str());
53 std::cout <<
"--- Pedestals changed! ---" << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
constexpr uint32_t rawId() const
get the raw id
const Item * getValues(DetId fId, bool throwOnFail=true) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
#define DEFINE_FWK_MODULE(type)
std::vector< DetId > getAllChannels() const
void analyze(const edm::Event &ev, const edm::EventSetup &es) override
HcalAutoPedestalValidator(edm::ParameterSet const &ps)
~HcalAutoPedestalValidator() override
T const * product() const