CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions

ecaldqm::SelectiveReadoutClient Class Reference

#include <SelectiveReadoutClient.h>

Inheritance diagram for ecaldqm::SelectiveReadoutClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

List of all members.

Public Types

enum  MESets {
  kFRDropped, kZSReadout, kFR, kRUForced,
  kZS1, nMESets
}
enum  Sources {
  sFlagCounterMap, sRUForcedMap, sFullReadoutMap, sZS1Map,
  sZSMap, sZSFullReadoutMap, sFRDroppedMap, nSources
}

Public Member Functions

void producePlots ()
 SelectiveReadoutClient (const edm::ParameterSet &, const edm::ParameterSet &)
 ~SelectiveReadoutClient ()

Static Public Member Functions

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

Detailed Description

Definition at line 8 of file SelectiveReadoutClient.h.


Member Enumeration Documentation

Enumerator:
kFRDropped 
kZSReadout 
kFR 
kRUForced 
kZS1 
nMESets 

Reimplemented from ecaldqm::DQWorker.

Definition at line 15 of file SelectiveReadoutClient.h.

Enumerator:
sFlagCounterMap 
sRUForcedMap 
sFullReadoutMap 
sZS1Map 
sZSMap 
sZSFullReadoutMap 
sFRDroppedMap 
nSources 

Reimplemented from ecaldqm::DQWorkerClient.

Definition at line 26 of file SelectiveReadoutClient.h.

                 {
      sFlagCounterMap, // h2f counter
      sRUForcedMap, // h2f counter
      sFullReadoutMap, // h2f counter
      sZS1Map, // h2f counter
      sZSMap, // h2f counter
      sZSFullReadoutMap, // h2f counter
      sFRDroppedMap, // h2f counter
      nSources
    };

Constructor & Destructor Documentation

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

Definition at line 11 of file SelectiveReadoutClient.h.

{}

Member Function Documentation

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

Implements ecaldqm::DQWorkerClient.

Definition at line 26 of file SelectiveReadoutClient.cc.

References ecaldqm::getElectronicsMap(), ecaldqm::getNSuperCrystals(), kFR, kFRDropped, kRUForced, kZS1, kZSReadout, ecaldqm::DQWorker::MEs_, sFlagCounterMap, sFRDroppedMap, sFullReadoutMap, ecaldqm::DQWorkerClient::sources_, sRUForcedMap, sZS1Map, sZSFullReadoutMap, and sZSMap.

  {
    using namespace std;

    MEs_[kFRDropped]->reset();
    MEs_[kZSReadout]->reset();
    MEs_[kFR]->reset();
    MEs_[kRUForced]->reset();
    MEs_[kZS1]->reset();

    for(unsigned dccid(1); dccid <= 54; dccid++){

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

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

        float nFlags(0.);
        float nRUForced(0.);
        float nFullReadoutFlags(0.);
        float nZS1Flags(0.);
        float nZS12Flags(0.);
        float nZSFullReadout(0.);
        float nFRDropped(0.);
        if(dccid <= 9 || dccid >= 46){
          vector<EcalScDetId> scids(getElectronicsMap()->getEcalScDetId(dccid, tower));
          for(vector<EcalScDetId>::iterator scItr(scids.begin()); scItr != scids.end(); ++scItr){
            nFlags += sources_[sFlagCounterMap]->getBinContent(*scItr);
            nRUForced += sources_[sRUForcedMap]->getBinContent(*scItr);
            nFullReadoutFlags += sources_[sFullReadoutMap]->getBinContent(*scItr);
            nZS1Flags += sources_[sZS1Map]->getBinContent(*scItr);
            nZS12Flags += sources_[sZSMap]->getBinContent(*scItr);
            nZSFullReadout += sources_[sZSFullReadoutMap]->getBinContent(*scItr);
            nFRDropped += sources_[sFRDroppedMap]->getBinContent(*scItr);
          }

          for(vector<EcalScDetId>::iterator scItr(scids.begin()); scItr != scids.end(); ++scItr){
            if(nFlags > 0.) MEs_[kFR]->setBinContent(*scItr, nFullReadoutFlags / nFlags);
            if(nFlags > 0.) MEs_[kZS1]->setBinContent(*scItr, nZS1Flags / nFlags);
            if(nFlags > 0.) MEs_[kRUForced]->setBinContent(*scItr, nRUForced / nFlags);
            if(nZS12Flags > 0.) MEs_[kZSReadout]->setBinContent(*scItr, nZSFullReadout / nZS12Flags);
            if(nFullReadoutFlags > 0.) MEs_[kFRDropped]->setBinContent(*scItr, nFRDropped / nFullReadoutFlags);
          }
        }
        else{
          nFlags = sources_[sFlagCounterMap]->getBinContent(ids[0]);
          nRUForced = sources_[sRUForcedMap]->getBinContent(ids[0]);
          nFullReadoutFlags = sources_[sFullReadoutMap]->getBinContent(ids[0]);
          nZS1Flags = sources_[sZS1Map]->getBinContent(ids[0]);
          nZS12Flags = sources_[sZSMap]->getBinContent(ids[0]);
          nZSFullReadout = sources_[sZSFullReadoutMap]->getBinContent(ids[0]);
          nFRDropped = sources_[sFRDroppedMap]->getBinContent(ids[0]);


          if(nFlags > 0.) MEs_[kFR]->setBinContent(ids[0], nFullReadoutFlags / nFlags);
          if(nFlags > 0.) MEs_[kZS1]->setBinContent(ids[0], nZS1Flags / nFlags);
          if(nFlags > 0.) MEs_[kRUForced]->setBinContent(ids[0], nRUForced / nFlags);
          if(nZS12Flags > 0.) MEs_[kZSReadout]->setBinContent(ids[0], nZSFullReadout / nZS12Flags);
          if(nFullReadoutFlags > 0.) MEs_[kFRDropped]->setBinContent(ids[0], nFRDropped / nFullReadoutFlags);
        }
      }
    }
  }

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