#include <MESetDet1D.h>
Public Member Functions | |
void | fill (DetId const &, double _wy=1., double _w=1., double _unused=0.) |
void | fill (unsigned, double _wy=1., double _w=1., double _unused=0.) |
double | getBinContent (DetId const &, int _bin=0) const |
double | getBinContent (unsigned, int _bin=0) const |
double | getBinEntries (DetId const &, int _bin=0) const |
double | getBinEntries (unsigned, int _bin=0) const |
double | getBinError (unsigned, int _bin=0) const |
double | getBinError (DetId const &, int _bin=0) const |
MESetDet1D (std::string const &, MEData const &, bool _readOnly=false) | |
~MESetDet1D () | |
Private Member Functions | |
void | fill_ (double, double) |
void | find_ (uint32_t) const |
Definition at line 8 of file MESetDet1D.h.
ecaldqm::MESetDet1D::MESetDet1D | ( | std::string const & | _fullpath, |
MEData const & | _data, | ||
bool | _readOnly = false |
||
) |
Definition at line 10 of file MESetDet1D.cc.
: MESetEcal(_fullpath, _data, 1, _readOnly) { }
ecaldqm::MESetDet1D::~MESetDet1D | ( | ) |
Definition at line 15 of file MESetDet1D.cc.
{ }
void ecaldqm::MESetDet1D::fill | ( | DetId const & | _id, |
double | _wy = 1. , |
||
double | _w = 1. , |
||
double | _unused = 0. |
||
) | [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 20 of file MESetDet1D.cc.
void ecaldqm::MESetDet1D::fill | ( | unsigned | _dcctccid, |
double | _wy = 1. , |
||
double | _w = 1. , |
||
double | _unused = 0. |
||
) | [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 28 of file MESetDet1D.cc.
void ecaldqm::MESetDet1D::fill_ | ( | double | _wy, |
double | _w | ||
) | [private] |
Definition at line 168 of file MESetDet1D.cc.
References ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, ecaldqm::MESet::fill_(), h, ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
Referenced by fill().
{ if(data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D){ std::vector<int> bins(cache_.second); TH1* h(mes_[cache_.first]->getTH1()); int iy(h->GetYaxis()->FindBin(_wy)); int nbinsX(h->GetNbinsX()); for(unsigned iBin(0); iBin < bins.size(); iBin++) bins[iBin] += (iy - 1) * nbinsX; for(unsigned iBin(0); iBin < bins.size(); iBin++) MESet::fill_(cache_.first, bins[iBin], _w); } else MESetEcal::fill_(_wy); }
void ecaldqm::MESetDet1D::find_ | ( | uint32_t | _id | ) | const [private, virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 138 of file MESetDet1D.cc.
References ecaldqm::MESet::binService_, ecaldqm::MEData::btype, ecaldqm::MESetEcal::cache_, ecaldqm::MESetEcal::cacheId_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, DetId::Ecal, EcalDQMBinningService::findBins(), EcalDQMBinningService::findBinsNoMap(), ecaldqm::MEData::kind, ecaldqm::MESet::mes_, and ecaldqm::MEData::otype.
Referenced by fill(), getBinContent(), getBinEntries(), and getBinError().
{ if(_id == cacheId_) return; if(data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D){ DetId id(_id); if(id.det() == DetId::Ecal) cache_ = binService_->findBinsNoMap(data_->otype, data_->btype, id); else cache_ = binService_->findBins(data_->otype, data_->btype, _id); } else{ DetId id(_id); if(id.det() == DetId::Ecal) cache_ = binService_->findBins(data_->otype, data_->btype, id); else cache_ = binService_->findBins(data_->otype, data_->btype, unsigned(_id)); } if(cache_.first >= mes_.size() || !mes_[cache_.first]) throw cms::Exception("InvalidCall") << "ME array index overflow" << std::endl; // some TTs are apparently empty..! // if(cache_.second.size() == 0) // throw cms::Exception("InvalidCall") << "No bins to get content from" << std::endl; cacheId_ = _id; }
double ecaldqm::MESetDet1D::getBinContent | ( | unsigned | _dcctccid, |
int | _bin = 0 |
||
) | const [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 53 of file MESetDet1D.cc.
References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinContent_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
{ find_(_dcctccid); if(cache_.second.size() == 0) return 0.; int bin(cache_.second[0]); if(_bin > 0 && (data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D)){ int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX()); bin += (_bin - 1) * nbinsX; } return getBinContent_(cache_.first, bin); }
double ecaldqm::MESetDet1D::getBinContent | ( | DetId const & | _id, |
int | _bin = 0 |
||
) | const [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 36 of file MESetDet1D.cc.
References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinContent_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
{ find_(_id); if(cache_.second.size() == 0) return 0.; int bin(cache_.second[0]); if(_bin > 0 && (data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D)){ int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX()); bin += (_bin - 1) * nbinsX; } return getBinContent_(cache_.first, bin); }
double ecaldqm::MESetDet1D::getBinEntries | ( | DetId const & | _id, |
int | _bin = 0 |
||
) | const [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 104 of file MESetDet1D.cc.
References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinEntries_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
{ find_(_id); if(cache_.second.size() == 0) return 0.; int bin(cache_.second[0]); if(data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D){ int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX()); bin += (_bin - 1) * nbinsX; } return getBinEntries_(cache_.first, bin); }
double ecaldqm::MESetDet1D::getBinEntries | ( | unsigned | _dcctccid, |
int | _bin = 0 |
||
) | const [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 121 of file MESetDet1D.cc.
References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinEntries_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
{ find_(_dcctccid); if(cache_.second.size() == 0) return 0.; int bin(cache_.second[0]); if(data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D){ int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX()); bin += (_bin - 1) * nbinsX; } return getBinEntries_(cache_.first, bin); }
double ecaldqm::MESetDet1D::getBinError | ( | unsigned | _dcctccid, |
int | _bin = 0 |
||
) | const [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 87 of file MESetDet1D.cc.
References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinError_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
{ find_(_dcctccid); if(cache_.second.size() == 0) return 0.; int bin(cache_.second[0]); if(data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D){ int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX()); bin += (_bin - 1) * nbinsX; } return getBinError_(cache_.first, bin); }
double ecaldqm::MESetDet1D::getBinError | ( | DetId const & | _id, |
int | _bin = 0 |
||
) | const [virtual] |
Reimplemented from ecaldqm::MESetEcal.
Definition at line 70 of file MESetDet1D.cc.
References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinError_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.
{ find_(_id); if(cache_.second.size() == 0) return 0.; int bin(cache_.second[0]); if(data_->kind == MonitorElement::DQM_KIND_TH2F || data_->kind == MonitorElement::DQM_KIND_TPROFILE2D){ int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX()); bin += (_bin - 1) * nbinsX; } return getBinError_(cache_.first, bin); }