22 std::vector<DetId>::iterator cell;
23 bool failflag =
false;
24 for (std::vector<DetId>::iterator it = listRefChan.begin(); it != listRefChan.end(); it++) {
26 cell =
std::find(listNewChan.begin(), listNewChan.end(), mydetid);
27 if (cell == listNewChan.end()) {
31 const float* oldvalue = (myRefPeds->
getValues(mydetid))->getValues();
34 if ((*oldvalue - *
values) + (*(oldvalue + 1) - *(
values + 1)) + (*(oldvalue + 2) - *(
values + 2)) +
35 (*(oldvalue + 3) - *(
values + 3)) / 4 >
38 << (*oldvalue - *
values) <<
" " << (*(oldvalue + 1) - *(
values + 1)) <<
" " 39 << (*(oldvalue + 2) - *(
values + 2)) <<
" " << (*(oldvalue + 3) - *(
values + 3)) << std::endl;
42 listNewChan.erase(cell);
47 std::cout <<
"These are identical to within deltaP" << std::endl;
50 std::ofstream outStream3(
outfile.c_str());
51 std::cout <<
"--- Pedestals changed! ---" << std::endl;
#define DEFINE_FWK_MODULE(type)
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > m_tok2
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const Item * getValues(DetId fId, bool throwOnFail=true) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< DetId > getAllChannels() const
void analyze(const edm::Event &ev, const edm::EventSetup &es) override
bool getData(T &iHolder) const
edm::ESGetToken< HcalPedestals, HcalPedestalsRcd > m_tok1
constexpr uint32_t rawId() const
get the raw id
HcalAutoPedestalValidator(edm::ParameterSet const &ps)
~HcalAutoPedestalValidator() override