21 currentPedestals_(0),channelStatus_(0){
105 edm::LogError(
"Large Variations found wrt to old pedestals, no file created");
115 "EcalPedestalsRcd" );
117 throw std::runtime_error(
"PoolDBService required.");
152 std::vector<int>::const_iterator
res =
163 uint32_t nAnomaliesEB =0;
164 uint32_t nAnomaliesEE =0;
203 MonitorElement * pmeb = ibooker.
book2D(
"meaneb",
"Pedestal Means",360, 1., 361., 171, -85., 86.);
212 MonitorElement * pmebd = ibooker.
book2D(
"meanebdiff",
"Pedestal Means Diff",360, 1., 361., 171, -85., 86.);
213 MonitorElement * prebd = ibooker.
book2D(
"rmsebdiff",
"Pedestal RMS Diff",360, 1., 361., 171, -85., 86.);
215 MonitorElement * pmeepd = ibooker.
book2D(
"meaneepdiff",
"Pedestal Means Diff",100,1,101,100,1,101);
218 MonitorElement * pmeemd = ibooker.
book2D(
"meaneemdiff",
"Pedestal Means Diff",100,1,101,100,1,101);
225 float mean= newpeds[di].mean_x12;
226 float rms = newpeds[di].rms_x12;
228 float cmean = (*currentPedestals_)[di].mean_x12;
229 float crms = (*currentPedestals_)[di].rms_x12;
242 float mean= newpeds[di].mean_x12;
243 float rms = newpeds[di].rms_x12;
244 float cmean = (*currentPedestals_)[di].mean_x12;
245 float crms = (*currentPedestals_)[di].rms_x12;
250 pmeepd->
Fill(di.
ix(),di.
iy(),(mean-cmean)/cmean);
251 preepd->
Fill(di.
ix(),di.
iy(),(rms-crms)/crms);
255 pmeemd->
Fill(di.
ix(),di.
iy(),(mean-cmean)/cmean);
256 preemd->
Fill(di.
ix(),di.
iy(),(rms-crms)/crms);
static EEDetId detIdFromDenseIndex(uint32_t din)
T getParameter(std::string const &) const
double thresholdAnomalies_
const self & getMap() const
MonitorElement * get(const std::string &path)
bool checkVariation(const EcalPedestalsMap &oldPedestals, const EcalPedestalsMap &newPedestals)
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual void endRun(edm::Run const &run, edm::EventSetup const &isetup)
int iphi() const
get the crystal iphi
static EBDetId detIdFromDenseIndex(uint32_t di)
void setValue(const uint32_t id, const Item &item)
ECALpedestalPCLHarvester(const edm::ParameterSet &ps)
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< int > chStatusToExclude_
Abs< T >::type abs(const T &t)
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
int ieta() const
get the crystal ieta
void dqmPlots(const EcalPedestals &newpeds, DQMStore::IBooker &ibooker)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
const EcalChannelStatus * channelStatus_
std::vector< Item >::const_iterator const_iterator
bool checkStatusCode(const DetId &id)
const EcalPedestals * currentPedestals_
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
cond::Time_t currentTime() const
const_iterator find(uint32_t rawId) const
T const * product() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)