CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

ecaldqm::MESetEcal Class Reference

#include <MESetEcal.h>

Inheritance diagram for ecaldqm::MESetEcal:
ecaldqm::MESet ecaldqm::MESetDet0D ecaldqm::MESetDet1D ecaldqm::MESetDet2D ecaldqm::MESetTrend

List of all members.

Public Member Functions

void book ()
void fill (DetId const &, double _wx=1., double _wy=1., double _w=1.)
void fill (unsigned, double _wx=1., double _wy=1., double _w=1.)
void fill (double, double _wy=1., double _w=1.)
std::vector< std::string > generateNames () const
double getBinContent (DetId const &, int _bin=0) const
double getBinContent (unsigned, int _bin=0) const
double getBinEntries (unsigned, int _bin=0) const
double getBinEntries (DetId const &, int _bin=0) const
double getBinError (unsigned, int _bin=0) const
double getBinError (DetId const &, int _bin=0) const
 MESetEcal (std::string const &, MEData const &, int logicalDimensions_, bool _readOnly=false)
void reset (double _content=0., double _err=0., double _entries=0.)
bool retrieve () const
void setBinContent (unsigned, double, double _err=0.)
void setBinContent (DetId const &, double, double _err=0.)
void setBinEntries (unsigned, double)
void setBinEntries (DetId const &, double)
 ~MESetEcal ()

Protected Member Functions

virtual void fill_ (double)
virtual void find_ (uint32_t) const

Protected Attributes

std::pair< unsigned,
std::vector< int > > 
cache_
uint32_t cacheId_
const unsigned logicalDimensions_

Detailed Description

Definition at line 9 of file MESetEcal.h.


Constructor & Destructor Documentation

ecaldqm::MESetEcal::MESetEcal ( std::string const &  _fullpath,
MEData const &  _data,
int  logicalDimensions_,
bool  _readOnly = false 
)

Definition at line 12 of file MESetEcal.cc.

References ecaldqm::MEData::btype, ecaldqm::MESet::data_, Exception, EcalDQMBinningService::kUser, logicalDimensions_, ecaldqm::MEData::xaxis, and ecaldqm::MEData::yaxis.

                                                                                                               :
    MESet(_fullpath, _data, _readOnly),
    logicalDimensions_(_logicalDimensions),
    cacheId_(0),
    cache_(std::make_pair(-1, std::vector<int>(0)))
  {
    if(data_->btype == BinService::kUser && ((logicalDimensions_ > 0 && !data_->xaxis) || (logicalDimensions_ > 1 && !data_->yaxis)))
      throw cms::Exception("InvalidCall") << "Need axis specifications" << std::endl;
  }
ecaldqm::MESetEcal::~MESetEcal ( )

Definition at line 22 of file MESetEcal.cc.

  {
  }

Member Function Documentation

void ecaldqm::MESetEcal::book ( ) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetTrend.

Definition at line 27 of file MESetEcal.cc.

References ecaldqm::MESet::active_, ecaldqm::MESet::binService_, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookFloat(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), ecaldqm::MEData::btype, EcalDQMBinningService::channelName(), ecaldqm::MESet::clear(), ecaldqm::MESet::data_, ecaldqm::MESet::dir_, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, ecaldqm::MESet::dqmStore_, EcalDQMBinningService::AxisSpecs::edges, prof2calltree::edges, Exception, generateNames(), EcalDQMBinningService::getBinning(), MonitorElement::getNbinsX(), MonitorElement::getTH1(), EcalDQMBinningService::AxisSpecs::high, i, EcalDQMBinningService::kDCC, EcalDQMBinningService::kEB, ecaldqm::kEBmLow, EcalDQMBinningService::kEE, EcalDQMBinningService::kEEm, EcalDQMBinningService::kEEp, ecaldqm::MEData::kind, EcalDQMBinningService::kReport, logicalDimensions_, EcalDQMBinningService::AxisSpecs::low, max(), ecaldqm::MESet::mes_, ecaldqm::MESet::name_, pileupCalc::nbins, EcalDQMBinningService::AxisSpecs::nbins, EcalDQMBinningService::objectFromOffset(), ecaldqm::MEData::otype, ecaldqm::MESet::resetAll(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), EcalDQMBinningService::AxisSpecs::title, ecaldqm::MEData::xaxis, ecaldqm::MEData::yaxis, and ecaldqm::MEData::zaxis.

  {
    using namespace std;

    clear();

    dqmStore_->setCurrentFolder(dir_);

    if(data_->btype == BinService::kReport && name_ == "")
      name_ = dir_.substr(0, dir_.find_first_of('/'));

    std::vector<std::string> meNames(generateNames());

    for(unsigned iME(0); iME < meNames.size(); iME++){
      unsigned iObj(iME);

      BinService::ObjectType actualObject(binService_->objectFromOffset(data_->otype, iObj));

      BinService::AxisSpecs xaxis, yaxis, zaxis;

      if(logicalDimensions_ > 0){
        if(data_->xaxis){
          xaxis = *data_->xaxis;
        }
        else{ // uses preset
          bool isMap(logicalDimensions_ > 1);
          vector<BinService::AxisSpecs> presetAxes(binService_->getBinning(actualObject, data_->btype, isMap, iObj));
          if(presetAxes.size() != logicalDimensions_)
            throw cms::Exception("InvalidCall") << "Dimensionality mismatch " << data_->otype << " " << data_->btype << " " << iObj << std::endl;

          xaxis = presetAxes[0];
          if(isMap) yaxis = presetAxes[1];
        }

        if(data_->yaxis){
          yaxis = *data_->yaxis;
        }
        if(logicalDimensions_ == 1 && yaxis.high - yaxis.low < 0.0001){
          yaxis.low = -numeric_limits<double>::max();
          yaxis.high = numeric_limits<double>::max();
        }

        if(data_->zaxis){
          zaxis = *data_->zaxis;
        }
        if(logicalDimensions_ > 1 && zaxis.high - zaxis.low < 0.0001){
          zaxis.low = -numeric_limits<double>::max();
          zaxis.high = numeric_limits<double>::max();
        }
      }

      MonitorElement* me(0);

      switch(data_->kind) {
      case MonitorElement::DQM_KIND_REAL :
        me = dqmStore_->bookFloat(meNames[iME]);

        break;

      case MonitorElement::DQM_KIND_TH1F :
        if(xaxis.edges){
          float* edges(new float[xaxis.nbins + 1]);
          for(int i(0); i < xaxis.nbins + 1; i++)
            edges[i] = xaxis.edges[i];
          me = dqmStore_->book1D(meNames[iME], meNames[iME], xaxis.nbins, edges);
          delete [] edges;
        }
        else
          me = dqmStore_->book1D(meNames[iME], meNames[iME], xaxis.nbins, xaxis.low, xaxis.high);

        break;

      case MonitorElement::DQM_KIND_TPROFILE :
        if(xaxis.edges) {
          me = dqmStore_->bookProfile(meNames[iME], meNames[iME], xaxis.nbins, xaxis.edges, yaxis.low, yaxis.high, "");
        }
        else
          me = dqmStore_->bookProfile(meNames[iME], meNames[iME], xaxis.nbins, xaxis.low, xaxis.high, yaxis.low, yaxis.high, "");

        break;

      case MonitorElement::DQM_KIND_TH2F :
        if(xaxis.edges || yaxis.edges) {
          BinService::AxisSpecs* specs[] = {&xaxis, &yaxis};
          float* edges[] = {new float[xaxis.nbins + 1], new float[yaxis.nbins + 1]};
          for(int iSpec(0); iSpec < 2; iSpec++){
            if(specs[iSpec]->edges){
              for(int i(0); i < specs[iSpec]->nbins + 1; i++)
                edges[iSpec][i] = specs[iSpec]->edges[i];
            }
            else{
              int nbins(specs[iSpec]->nbins);
              double low(specs[iSpec]->low), high(specs[iSpec]->high);
              for(int i(0); i < nbins + 1; i++)
                edges[iSpec][i] = low + (high - low) / nbins * i;
            }
          }
          me = dqmStore_->book2D(meNames[iME], meNames[iME], xaxis.nbins, edges[0], yaxis.nbins, edges[1]);
          for(int iSpec(0); iSpec < 2; iSpec++)
            delete [] edges[iSpec];
        }
        else
          me = dqmStore_->book2D(meNames[iME], meNames[iME], xaxis.nbins, xaxis.low, xaxis.high, yaxis.nbins, yaxis.low, yaxis.high);

        break;

      case MonitorElement::DQM_KIND_TPROFILE2D :
        if(zaxis.edges) {
          zaxis.low = zaxis.edges[0];
          zaxis.high = zaxis.edges[zaxis.nbins];
        }
        if(xaxis.edges || yaxis.edges)
          throw cms::Exception("InvalidCall") << "Variable bin size for 2D profile not implemented" << std::endl;
        me = dqmStore_->bookProfile2D(meNames[iME], meNames[iME], xaxis.nbins, xaxis.low, xaxis.high, yaxis.nbins, yaxis.low, yaxis.high, zaxis.low, zaxis.high, "");

        break;

      default :
        break;
      }

      if(!me)
        throw cms::Exception("InvalidCall") << "ME could not be booked" << std::endl;

      if(logicalDimensions_ > 0){
        me->setAxisTitle(xaxis.title, 1);
        me->setAxisTitle(yaxis.title, 2);
        // For plot tagging in RenderPlugin; default values are 1 for both
        me->getTH1()->SetMarkerStyle(actualObject + 2);
        me->getTH1()->SetMarkerStyle(data_->btype + 2);
      }

      if(logicalDimensions_ == 1 && data_->btype == BinService::kDCC){
        if(actualObject == BinService::kEB){
          for(int iBin(1); iBin <= me->getNbinsX(); iBin++)
            me->setBinLabel(iBin, binService_->channelName(iBin + kEBmLow));
        }
        else if(actualObject == BinService::kEE){
          for(int iBin(1); iBin <= me->getNbinsX() / 2; iBin++){
            unsigned dccid((iBin + 2) % 9 + 1);
            me->setBinLabel(iBin, binService_->channelName(dccid));
          }
          for(int iBin(1); iBin <= me->getNbinsX() / 2; iBin++){
            unsigned dccid((iBin + 2) % 9 + 46);
            me->setBinLabel(iBin + me->getNbinsX() / 2, binService_->channelName(dccid));
          }
        }
        else if(actualObject == BinService::kEEm){
          for(int iBin(1); iBin <= me->getNbinsX(); iBin++){
            unsigned dccid((iBin + 2) % 9 + 1);
            me->setBinLabel(iBin, binService_->channelName(dccid));
          }
        }
        else if(actualObject == BinService::kEEp){
          for(int iBin(1); iBin <= me->getNbinsX(); iBin++){
            unsigned dccid((iBin + 2) % 9 + 46);
            me->setBinLabel(iBin, binService_->channelName(dccid));
          }
        }
      }
      
      mes_.push_back(me);
    }

    // To avoid the ambiguity between "content == 0 because the mean is 0" and "content == 0 because the entry is 0"
    // RenderPlugin must be configured accordingly
    if(data_->kind == MonitorElement::DQM_KIND_TPROFILE2D)
      resetAll(std::numeric_limits<double>::max(), 0., -1.);

    active_ = true;
  }
void ecaldqm::MESetEcal::fill ( unsigned  _dcctccid,
double  _wx = 1.,
double  _wy = 1.,
double  _w = 1. 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet0D, ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 231 of file MESetEcal.cc.

References ecaldqm::MESet::binService_, ecaldqm::MEData::btype, ecaldqm::MESet::data_, fill_(), EcalDQMBinningService::findOffset(), ecaldqm::MESet::mes_, evf::evtn::offset(), and ecaldqm::MEData::otype.

  {
    unsigned offset(binService_->findOffset(data_->otype, data_->btype, _dcctccid));

    if(offset >= mes_.size() || !mes_[offset])
      throw cms::Exception("InvalidCall") << "ME array index overflow" << offset << std::endl;

    MESet::fill_(offset, _x, _wy, _w);
  }
void ecaldqm::MESetEcal::fill ( double  _x,
double  _wy = 1.,
double  _w = 1. 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet0D, and ecaldqm::MESetTrend.

Definition at line 242 of file MESetEcal.cc.

References fill_(), and ecaldqm::MESet::mes_.

  {
    if(mes_.size() != 1)
      throw cms::Exception("InvalidCall") << "MESet type incompatible" << std::endl;

    MESet::fill_(0, _x, _wy, _w);
  }
void ecaldqm::MESetEcal::fill ( DetId const &  _id,
double  _wx = 1.,
double  _wy = 1.,
double  _w = 1. 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet0D, ecaldqm::MESetDet1D, ecaldqm::MESetDet2D, and ecaldqm::MESetTrend.

Definition at line 221 of file MESetEcal.cc.

References ecaldqm::MESet::binService_, ecaldqm::MESet::data_, fill_(), EcalDQMBinningService::findOffset(), ecaldqm::MESet::mes_, evf::evtn::offset(), and ecaldqm::MEData::otype.

  {
    unsigned offset(binService_->findOffset(data_->otype, _id));
    if(offset >= mes_.size() || !mes_[offset])
      throw cms::Exception("InvalidCall") << "ME array index overflow" << std::endl;

    MESet::fill_(offset, _x, _wy, _w);
  }
void ecaldqm::MESetEcal::fill_ ( double  _w) [protected, virtual]

Definition at line 491 of file MESetEcal.cc.

References cache_, and ecaldqm::MESet::fill_().

Referenced by ecaldqm::MESetDet2D::fill(), and fill().

  {
    for(unsigned iBin(0); iBin < cache_.second.size(); iBin++)
      MESet::fill_(cache_.first, cache_.second[iBin], _w);
  }
void ecaldqm::MESetEcal::find_ ( uint32_t  _id) const [protected, virtual]

Reimplemented in ecaldqm::MESetDet1D.

Definition at line 470 of file MESetEcal.cc.

References ecaldqm::MESet::binService_, ecaldqm::MEData::btype, cache_, cacheId_, ecaldqm::MESet::data_, DetId::Ecal, EcalDQMBinningService::findBins(), errorMatrix2Lands_multiChannel::id, ecaldqm::MESet::mes_, and ecaldqm::MEData::otype.

Referenced by ecaldqm::MESetDet2D::fill(), getBinContent(), getBinEntries(), getBinError(), setBinContent(), and setBinEntries().

  {
    if(_id == cacheId_) return;

    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;
  }
std::vector< std::string > ecaldqm::MESetEcal::generateNames ( ) const

Definition at line 402 of file MESetEcal.cc.

References ecaldqm::MESet::binService_, ecaldqm::MEData::btype, EcalDQMBinningService::channelName(), ecaldqm::MESet::data_, ecaldqm::dccId(), EcalDQMBinningService::kEB, EcalDQMBinningService::kEBMEM, EcalDQMBinningService::kEcal2P, EcalDQMBinningService::kEcal3P, EcalDQMBinningService::kEcalMEM2P, EcalDQMBinningService::kEE, EcalDQMBinningService::kEEm, EcalDQMBinningService::kEEMEM, EcalDQMBinningService::kEEp, EcalDQMBinningService::kProjEta, EcalDQMBinningService::kProjPhi, EcalDQMBinningService::kReport, EcalDQMBinningService::kSM, EcalDQMBinningService::kSMMEM, ecaldqm::MESet::name(), ecaldqm::MESet::name_, h::names, EcalDQMBinningService::nDCC, EcalDQMBinningService::nDCCMEM, EcalDQMBinningService::objectFromOffset(), and ecaldqm::MEData::otype.

Referenced by book(), and retrieve().

  {
    using namespace std;

    unsigned nME(1);
    switch(data_->otype){
    case BinService::kSM:
      nME = BinService::nDCC;
      break;
    case BinService::kSMMEM:
      nME = BinService::nDCCMEM;
      break;
    case BinService::kEcal2P:
      nME = 2;
      break;
    case BinService::kEcal3P:
      nME = 3;
      break;
    case BinService::kEcalMEM2P:
      nME = 2;
      break;
    default:
      break;
    }

    std::vector<std::string> names(0);

    for(unsigned iME(0); iME < nME; iME++) {

      unsigned iObj(iME);

      BinService::ObjectType actualObject(binService_->objectFromOffset(data_->otype, iObj));

      string name(name_);
      string spacer(" ");

      if(data_->btype == BinService::kProjEta) name += " eta";
      else if(data_->btype == BinService::kProjPhi) name += " phi";
      else if(data_->btype == BinService::kReport) spacer = "_";

      switch(actualObject){
      case BinService::kEB:
      case BinService::kEBMEM:
        name += spacer + "EB"; break;
      case BinService::kEE:
      case BinService::kEEMEM:
        name += spacer + "EE"; break;
      case BinService::kEEm:
        name += spacer + "EE-"; break;
      case BinService::kEEp:
        name += spacer + "EE+"; break;
      case BinService::kSM:
        name += spacer + binService_->channelName(iObj + 1); break;
      case BinService::kSMMEM:
        //dccId(unsigned) skips DCCs without MEM
        iObj = dccId(iME) - 1;
        name += spacer + binService_->channelName(iObj + 1); break;
      default:
        break;
      }

      names.push_back(name);
    }

    return names;
  }
double ecaldqm::MESetEcal::getBinContent ( DetId const &  _id,
int  _bin = 0 
) const [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 291 of file MESetEcal.cc.

References cache_, find_(), and ecaldqm::MESet::getBinContent_().

  {
    find_(_id);

    if(cache_.second.size() == 0) return 0.;

    return getBinContent_(cache_.first, cache_.second[0]);
  }
double ecaldqm::MESetEcal::getBinContent ( unsigned  _dcctccid,
int  _bin = 0 
) const [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 301 of file MESetEcal.cc.

References cache_, find_(), and ecaldqm::MESet::getBinContent_().

  {
    find_(_dcctccid);

    if(cache_.second.size() == 0) return 0.;

    return getBinContent_(cache_.first, cache_.second[0]);
  }
double ecaldqm::MESetEcal::getBinEntries ( DetId const &  _id,
int  _bin = 0 
) const [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 331 of file MESetEcal.cc.

References cache_, find_(), and ecaldqm::MESet::getBinEntries_().

Referenced by ecaldqm::MESetDet2D::fill().

  {
    find_(_id);

    if(cache_.second.size() == 0) return 0.;

    return getBinEntries_(cache_.first, cache_.second[0]);
  }
double ecaldqm::MESetEcal::getBinEntries ( unsigned  _dcctccid,
int  _bin = 0 
) const [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 341 of file MESetEcal.cc.

References cache_, find_(), and ecaldqm::MESet::getBinEntries_().

  {
    find_(_dcctccid);

    if(cache_.second.size() == 0) return 0.;
    
    return getBinEntries_(cache_.first, cache_.second[0]);
  }
double ecaldqm::MESetEcal::getBinError ( unsigned  _dcctccid,
int  _bin = 0 
) const [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 321 of file MESetEcal.cc.

References cache_, find_(), and ecaldqm::MESet::getBinError_().

  {
    find_(_dcctccid);

    if(cache_.second.size() == 0) return 0.;
    
    return getBinError_(cache_.first, cache_.second[0]);
  }
double ecaldqm::MESetEcal::getBinError ( DetId const &  _id,
int  _bin = 0 
) const [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetDet1D, and ecaldqm::MESetTrend.

Definition at line 311 of file MESetEcal.cc.

References cache_, find_(), and ecaldqm::MESet::getBinError_().

  {
    find_(_id);

    if(cache_.second.size() == 0) return 0.;

    return getBinError_(cache_.first, cache_.second[0]);
  }
void ecaldqm::MESetEcal::reset ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
) [virtual]

Reimplemented from ecaldqm::MESet.

Definition at line 351 of file MESetEcal.cc.

References newFWLiteAna::bin, ecaldqm::MESet::binService_, ecaldqm::MEData::btype, ecaldqm::MESet::data_, Exception, EcalDQMBinningService::getBinMap(), EcalDQMBinningService::kEcal2P, EcalDQMBinningService::kEcal3P, EcalDQMBinningService::kEcalMEM2P, EcalDQMBinningService::kSM, EcalDQMBinningService::kSMMEM, EcalDQMBinningService::nDCC, EcalDQMBinningService::nDCCMEM, EcalDQMBinningService::nObjType, EcalDQMBinningService::nPresetBinnings, EcalDQMBinningService::objectFromOffset(), ecaldqm::MEData::otype, ecaldqm::MESet::setBinContent_(), ecaldqm::MESet::setBinEntries_(), and EcalDQMBinningService::smOffsetBins().

  {
    using namespace std;

    if(data_->btype >= unsigned(BinService::nPresetBinnings)){
      MESet::reset(_content, _err, _entries);
      return;
    }

    unsigned nME(1);
    switch(data_->otype){
    case BinService::kSM:
      nME = BinService::nDCC;
      break;
    case BinService::kSMMEM:
      nME = BinService::nDCCMEM;
      break;
    case BinService::kEcal2P:
      nME = 2;
      break;
    case BinService::kEcal3P:
      nME = 3;
      break;
    case BinService::kEcalMEM2P:
      nME = 2;
      break;
    default:
      break;
    }

    for(unsigned iME(0); iME < nME; iME++) {
      unsigned iObj(iME);

      BinService::ObjectType okey(binService_->objectFromOffset(data_->otype, iObj));
      BinService::BinningType bkey(data_->btype);
      if(okey == BinService::nObjType)
        throw cms::Exception("InvalidCall") << "Undefined object & bin type";

      std::vector<int> const* binMap(binService_->getBinMap(okey, bkey));
      if(!binMap)
        throw cms::Exception("InvalidCall") << "Cannot retrieve bin map";

      for(std::vector<int>::const_iterator binItr(binMap->begin()); binItr != binMap->end(); ++binItr){
        int bin(*binItr - binService_->smOffsetBins(okey, bkey, iObj));
        setBinContent_(iME, bin, _content, _err);
        setBinEntries_(iME, bin, 0.);
      }
    }
  }
bool ecaldqm::MESetEcal::retrieve ( ) const [virtual]

Reimplemented from ecaldqm::MESet.

Definition at line 200 of file MESetEcal.cc.

References ecaldqm::MESet::active_, ecaldqm::MESet::clear(), ecaldqm::MESet::dir_, ecaldqm::MESet::dqmStore_, generateNames(), DQMStore::get(), and ecaldqm::MESet::mes_.

  {
    clear();

    std::vector<std::string> meNames(generateNames());
    if(meNames.size() == 0) return false;

    for(unsigned iME(0); iME < meNames.size(); iME++){
      MonitorElement* me(dqmStore_->get(dir_ + "/" + meNames[iME]));
      if(me) mes_.push_back(me);
      else{
        clear();
        return false;
      }
    }

    active_ = true;
    return true;
  }
void ecaldqm::MESetEcal::setBinContent ( unsigned  _dcctccid,
double  _content,
double  _err = 0. 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetTrend.

Definition at line 261 of file MESetEcal.cc.

References combineCards::bins, cache_, find_(), and ecaldqm::MESet::setBinContent_().

  {
    find_(_dcctccid);

    std::vector<int>& bins(cache_.second);
    for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
      setBinContent_(cache_.first, *binItr, _content, _err);
  }
void ecaldqm::MESetEcal::setBinContent ( DetId const &  _id,
double  _content,
double  _err = 0. 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetTrend.

Definition at line 251 of file MESetEcal.cc.

References combineCards::bins, cache_, find_(), and ecaldqm::MESet::setBinContent_().

Referenced by ecaldqm::MESetDet2D::fill().

  {
    find_(_id);

    std::vector<int>& bins(cache_.second);
    for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
      setBinContent_(cache_.first, *binItr, _content, _err);
  }
void ecaldqm::MESetEcal::setBinEntries ( unsigned  _dcctccid,
double  _entries 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetTrend.

Definition at line 281 of file MESetEcal.cc.

References combineCards::bins, cache_, find_(), and ecaldqm::MESet::setBinEntries_().

  {
    find_(_dcctccid);

    std::vector<int>& bins(cache_.second);
    for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
      setBinEntries_(cache_.first, *binItr, _entries);
  }
void ecaldqm::MESetEcal::setBinEntries ( DetId const &  _id,
double  _entries 
) [virtual]

Reimplemented from ecaldqm::MESet.

Reimplemented in ecaldqm::MESetTrend.

Definition at line 271 of file MESetEcal.cc.

References combineCards::bins, cache_, find_(), and ecaldqm::MESet::setBinEntries_().

Referenced by ecaldqm::MESetDet2D::fill().

  {
    find_(_id);

    std::vector<int>& bins(cache_.second);
    for(std::vector<int>::iterator binItr(bins.begin()); binItr != bins.end(); ++binItr)
      setBinEntries_(cache_.first, *binItr, _entries);
  }

Member Data Documentation

std::pair<unsigned, std::vector<int> > ecaldqm::MESetEcal::cache_ [mutable, protected]
uint32_t ecaldqm::MESetEcal::cacheId_ [mutable, protected]

Definition at line 47 of file MESetEcal.h.

Referenced by ecaldqm::MESetDet1D::find_(), and find_().

const unsigned ecaldqm::MESetEcal::logicalDimensions_ [protected]

Definition at line 45 of file MESetEcal.h.

Referenced by book(), and MESetEcal().