CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions

ecaldqm::TrigPrimClient Class Reference

#include <TrigPrimClient.h>

Inheritance diagram for ecaldqm::TrigPrimClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

List of all members.

Public Types

enum  MESets { kTimingSummary, kNonSingleSummary, kEmulQualitySummary, nMESets }
enum  Sources {
  sEtRealMap, sEtEmulError, sTimingError, sMatchedIndex,
  nSources
}

Public Member Functions

void bookMEs ()
void producePlots ()
 TrigPrimClient (const edm::ParameterSet &, const edm::ParameterSet &)
 ~TrigPrimClient ()

Static Public Member Functions

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

Detailed Description

Definition at line 8 of file TrigPrimClient.h.


Member Enumeration Documentation

Enumerator:
kTimingSummary 
kNonSingleSummary 
kEmulQualitySummary 
nMESets 

Reimplemented from ecaldqm::DQWorker.

Definition at line 17 of file TrigPrimClient.h.

Enumerator:
sEtRealMap 
sEtEmulError 
sTimingError 
sMatchedIndex 
nSources 

Reimplemented from ecaldqm::DQWorkerClient.

Definition at line 27 of file TrigPrimClient.h.


Constructor & Destructor Documentation

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

Definition at line 11 of file TrigPrimClient.h.

{}

Member Function Documentation

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 23 of file TrigPrimClient.cc.

References kEmulQualitySummary, and ecaldqm::DQWorker::MEs_.

  {
    DQWorker::bookMEs();

    MEs_[kEmulQualitySummary]->resetAll(-1.);
  }

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

Implements ecaldqm::DQWorkerClient.

Definition at line 31 of file TrigPrimClient.cc.

References EcalTrigTowerDetId::detIdFromDenseIndex(), python::tagInventory::entries, ecaldqm::DQWorkerClient::fillQuality_(), kEmulQualitySummary, kNonSingleSummary, EcalTrigTowerDetId::kSizeForDenseIndexing, kTimingSummary, ecaldqm::DQWorker::MEs_, EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING, sEtEmulError, sMatchedIndex, ecaldqm::DQWorkerClient::sources_, and sTimingError.

  {
    //    MEs_[kTiming]->reset();
    MEs_[kTimingSummary]->reset();
    MEs_[kNonSingleSummary]->reset();

    uint32_t mask(1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING);

    for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++){
      EcalTrigTowerDetId ttid(EcalTrigTowerDetId::detIdFromDenseIndex(iTT));

      float towerEntries(0.);
      float tMax(0.5);
      float nMax(0.);
      for(int iBin(0); iBin < 6; iBin++){
        float entries(sources_[sMatchedIndex]->getBinEntries(ttid, iBin + 1));
        towerEntries += entries;

        if(entries > nMax){
          nMax = entries;
          tMax = iBin == 0 ? -0.5 : iBin + 0.5; // historical reasons.. much clearer to say "no entry = -0.5"
        }
      }

      //      MEs_[kTiming]->setBinContent(ttid, tMax);
      MEs_[kTimingSummary]->setBinContent(ttid, tMax);

      if(towerEntries < 1.){
        fillQuality_(kEmulQualitySummary, ttid, mask, 2.);
        continue;
      }

      float nonsingleFraction(1. - nMax / towerEntries);

      if(nonsingleFraction > 0.)
        MEs_[kNonSingleSummary]->setBinContent(ttid, nonsingleFraction);

      float quality(sources_[sEtEmulError]->getBinContent(ttid) > 0. || sources_[sTimingError]->getBinContent(ttid) > 0. ? 0. : 1.);
      fillQuality_(kEmulQualitySummary, ttid, mask, quality);
    }
  }

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