CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions

ecaldqm::SummaryClient Class Reference

#include <SummaryClient.h>

Inheritance diagram for ecaldqm::SummaryClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

List of all members.

Public Types

enum  MESets {
  kQualitySummary, kReportSummaryMap, kReportSummaryContents, kReportSummary,
  nMESets
}
enum  Sources {
  sIntegrity, sPresample, sTiming, sRawData,
  sDigiOccupancy, nSources
}

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &)
void bookMEs ()
void producePlots ()
 SummaryClient (const edm::ParameterSet &, const edm::ParameterSet &)
 ~SummaryClient ()

Static Public Member Functions

static void setMEData (std::vector< MEData > &)

Detailed Description

Definition at line 8 of file SummaryClient.h.


Member Enumeration Documentation

Enumerator:
kQualitySummary 
kReportSummaryMap 
kReportSummaryContents 
kReportSummary 
nMESets 

Reimplemented from ecaldqm::DQWorker.

Definition at line 19 of file SummaryClient.h.

Enumerator:
sIntegrity 
sPresample 
sTiming 
sRawData 
sDigiOccupancy 
nSources 

Reimplemented from ecaldqm::DQWorkerClient.

Definition at line 29 of file SummaryClient.h.


Constructor & Destructor Documentation

data refman pasoursint CMSSW_5_3_10_patch1 src DQM EcalBarrelMonitorClient src SummaryClient cc ecaldqm::SummaryClient::SummaryClient ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)
ecaldqm::SummaryClient::~SummaryClient ( ) [inline]

Definition at line 11 of file SummaryClient.h.

{}

Member Function Documentation

void ecaldqm::SummaryClient::beginRun ( const edm::Run ,
const edm::EventSetup  
) [virtual]

Reimplemented from ecaldqm::DQWorker.

Definition at line 32 of file SummaryClient.cc.

References kQualitySummary, kReportSummary, kReportSummaryContents, kReportSummaryMap, and ecaldqm::DQWorker::MEs_.

  {
    for(unsigned iME(0); iME < MEs_.size(); ++iME)
      MEs_[iME]->book();

    MEs_[kQualitySummary]->resetAll(-1.);
    MEs_[kQualitySummary]->reset(1.);
    MEs_[kReportSummaryMap]->resetAll(-1.);
    MEs_[kReportSummaryMap]->reset(1.);
    MEs_[kReportSummaryContents]->reset(1.);
    MEs_[kReportSummary]->reset(1.);
  }

void ecaldqm::SummaryClient::bookMEs ( ) [virtual]

Reimplemented from ecaldqm::DQWorker.

Definition at line 27 of file SummaryClient.cc.

  {
  }

void ecaldqm::SummaryClient::producePlots ( ) [virtual]

Implements ecaldqm::DQWorkerClient.

Definition at line 46 of file SummaryClient.cc.

References ecaldqm::getElectronicsMap(), ecaldqm::getNSuperCrystals(), MonitorElement::getTH1(), kQualitySummary, kReportSummary, kReportSummaryContents, kReportSummaryMap, ecaldqm::DQWorker::MEs_, lumiPlot::rawdata, sDigiOccupancy, sIntegrity, ecaldqm::DQWorkerClient::sources_, sPresample, sRawData, ntuplemaker::status, and sTiming.

  {
    MEs_[kQualitySummary]->reset(2.);
    MEs_[kReportSummaryMap]->reset(1.);

    float totalChannels(0.);
    float totalGood(0.);

    for(unsigned dccid(1); dccid <= 54; dccid++){
      MonitorElement const* me(sources_[sDigiOccupancy]->getME(dccid - 1));
      if(me && me->getTH1()->GetEntries() < 1.){
        MEs_[kReportSummaryContents]->fill(dccid, 1.);
        continue;
      }

      float dccChannels(0.);
      float dccGood(0.);

      for(unsigned tower(1); tower <= getNSuperCrystals(dccid); tower++){
        std::vector<DetId> ids(getElectronicsMap()->dccTowerConstituents(dccid, tower));

        if(ids.size() == 0) continue;

        float towerChannels(0.);
        float towerGood(0.);

        for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){

          float integrity(sources_[sIntegrity]->getBinContent(*idItr));

          if(integrity == 2.) continue;

          float presample(sources_[sPresample]->getBinContent(*idItr));
          float timing(sources_[sTiming]->getBinContent(*idItr));
          float rawdata(sources_[sRawData]->getBinContent(*idItr));

          if(integrity > 2.) integrity = 1.;
          if(presample > 2.) presample = 1.;
          if(timing > 2.) timing = 1.;
          if(rawdata > 2.) rawdata = 1.;

          float status(1.);
          if(integrity < 2.) status *= integrity;
          if(presample < 2.) status *= presample;
          if(timing < 2.) status *= timing;
          if(rawdata < 2.) status *= rawdata;

          MEs_[kQualitySummary]->setBinContent(*idItr, status);

          if(status == 1.){
            towerGood += 1.;
            dccGood += 1.;
            totalGood += 1.;
          }
          towerChannels += 1.;
          dccChannels += 1.;
          totalChannels += 1.;
        }

        if(towerChannels < 1.) continue;

        if(dccid <= 9 || dccid >= 46){
          std::vector<EcalScDetId> scs(getElectronicsMap()->getEcalScDetId(dccid, tower));
          for(std::vector<EcalScDetId>::iterator scItr(scs.begin()); scItr != scs.end(); ++scItr)
            MEs_[kReportSummaryMap]->setBinContent(*scItr, towerGood / towerChannels);
        }
        else
          MEs_[kReportSummaryMap]->setBinContent(ids[0], towerGood / towerChannels);
      }

      if(dccChannels < 1.) continue;

      MEs_[kReportSummaryContents]->fill(dccid, dccGood / dccChannels);
    }

    if(totalChannels > 0.) MEs_[kReportSummary]->fill(totalGood / totalChannels);

  }

void ecaldqm::SummaryClient::setMEData ( std::vector< MEData > &  _data) [static]