CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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

Public Types

enum  MESets {
  kQualitySummary, kReportSummaryMap, kReportSummaryContents, kReportSummary,
  nMESets
}
 
enum  Sources {
  sIntegrity, sPresample, sTiming, sRawData,
  sDigiOccupancy, nSources
}
 
- Public Types inherited from ecaldqm::DQWorkerClient
enum  Sources { nSources }
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &)
 
void bookMEs ()
 
void producePlots ()
 
 SummaryClient (const edm::ParameterSet &, const edm::ParameterSet &)
 
 ~SummaryClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerClient
 DQWorkerClient (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void initialize ()
 
void reset ()
 
virtual ~DQWorkerClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Member Functions

static void setMEData (std::vector< MEData > &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Additional Inherited Members

- Static Public Attributes inherited from ecaldqm::DQWorkerClient
static EcalDQMChannelStatus const * channelStatus
 
static EcalDQMTowerStatus const * towerStatus
 
- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 
- Protected Member Functions inherited from ecaldqm::DQWorkerClient
void fillQuality_ (unsigned, DetId const &, uint32_t, float)
 
void source_ (unsigned, std::string const &, unsigned, edm::ParameterSet const &)
 
- Protected Member Functions inherited from ecaldqm::DQWorker
MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 
- Protected Attributes inherited from ecaldqm::DQWorkerClient
std::vector< MESet const * > sources_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 8 of file SummaryClient.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

ecaldqm::SummaryClient::SummaryClient ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 14 of file SummaryClient.cc.

References edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::OccupancyTask::kDigi, ecaldqm::IntegrityClient::kQuality, ecaldqm::TimingClient::kQuality, ecaldqm::PresampleClient::kQuality, ecaldqm::RawDataClient::kQualitySummary, sDigiOccupancy, sIntegrity, ecaldqm::DQWorkerClient::source_(), sPresample, sRawData, and sTiming.

14  :
15  DQWorkerClient(_params, _paths, "SummaryClient")
16  {
17  edm::ParameterSet const& sources(_params.getUntrackedParameterSet("sources"));
18  source_(sIntegrity, "IntegrityClient", IntegrityClient::kQuality, sources);
19  source_(sPresample, "PresampleClient", PresampleClient::kQuality, sources);
20  source_(sTiming, "TimingClient", TimingClient::kQuality, sources);
21  source_(sRawData, "RawDataClient", RawDataClient::kQualitySummary, sources);
22  source_(sDigiOccupancy, "OccupancyTask", OccupancyTask::kDigi, sources);
23  }
void source_(unsigned, std::string const &, unsigned, edm::ParameterSet const &)
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
DQWorkerClient(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
ecaldqm::SummaryClient::~SummaryClient ( )
inline

Definition at line 11 of file SummaryClient.h.

11 {}

Member Function Documentation

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

Reimplemented from ecaldqm::DQWorker.

Definition at line 31 of file SummaryClient.cc.

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

32  {
33  for(unsigned iME(0); iME < MEs_.size(); ++iME)
34  MEs_[iME]->book();
35 
36  MEs_[kQualitySummary]->resetAll(-1.);
37  MEs_[kQualitySummary]->reset(1.);
38  MEs_[kReportSummaryMap]->resetAll(-1.);
39  MEs_[kReportSummaryMap]->reset(1.);
40  MEs_[kReportSummaryContents]->reset(1.);
41  MEs_[kReportSummary]->reset(1.);
42  }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
void ecaldqm::SummaryClient::bookMEs ( )
virtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 26 of file SummaryClient.cc.

27  {
28  }
void ecaldqm::SummaryClient::producePlots ( )
virtual

Implements ecaldqm::DQWorkerClient.

Definition at line 45 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.

46  {
47  MEs_[kQualitySummary]->reset(2.);
48  MEs_[kReportSummaryMap]->reset(1.);
49 
50  float totalChannels(0.);
51  float totalGood(0.);
52 
53  for(unsigned dccid(1); dccid <= 54; dccid++){
54  MonitorElement const* me(sources_[sDigiOccupancy]->getME(dccid - 1));
55  if(me && me->getTH1()->GetEntries() < 1.){
56  MEs_[kReportSummaryContents]->fill(dccid, 1.);
57  continue;
58  }
59 
60  float dccChannels(0.);
61  float dccGood(0.);
62 
63  for(unsigned tower(1); tower <= getNSuperCrystals(dccid); tower++){
64  std::vector<DetId> ids(getElectronicsMap()->dccTowerConstituents(dccid, tower));
65 
66  if(ids.size() == 0) continue;
67 
68  float towerChannels(0.);
69  float towerGood(0.);
70 
71  for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr){
72 
73  float integrity(sources_[sIntegrity]->getBinContent(*idItr));
74 
75  if(integrity == 2.) continue;
76 
77  float presample(sources_[sPresample]->getBinContent(*idItr));
78  float timing(sources_[sTiming]->getBinContent(*idItr));
79  float rawdata(sources_[sRawData]->getBinContent(*idItr));
80 
81  if(integrity > 2.) integrity = 1.;
82  if(presample > 2.) presample = 1.;
83  if(timing > 2.) timing = 1.;
84  if(rawdata > 2.) rawdata = 1.;
85 
86  float status(1.);
87  if(integrity < 2.) status *= integrity;
88  if(presample < 2.) status *= presample;
89  if(timing < 2.) status *= timing;
90  if(rawdata < 2.) status *= rawdata;
91 
92  MEs_[kQualitySummary]->setBinContent(*idItr, status);
93 
94  if(status == 1.){
95  towerGood += 1.;
96  dccGood += 1.;
97  totalGood += 1.;
98  }
99  towerChannels += 1.;
100  dccChannels += 1.;
101  totalChannels += 1.;
102  }
103 
104  if(towerChannels < 1.) continue;
105 
106  if(dccid <= 9 || dccid >= 46){
107  std::vector<EcalScDetId> scs(getElectronicsMap()->getEcalScDetId(dccid, tower));
108  for(std::vector<EcalScDetId>::iterator scItr(scs.begin()); scItr != scs.end(); ++scItr)
109  MEs_[kReportSummaryMap]->setBinContent(*scItr, towerGood / towerChannels);
110  }
111  else
112  MEs_[kReportSummaryMap]->setBinContent(ids[0], towerGood / towerChannels);
113  }
114 
115  if(dccChannels < 1.) continue;
116 
117  MEs_[kReportSummaryContents]->fill(dccid, dccGood / dccChannels);
118  }
119 
120  if(totalChannels > 0.) MEs_[kReportSummary]->fill(totalGood / totalChannels);
121 
122  }
const EcalElectronicsMapping * getElectronicsMap()
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
unsigned getNSuperCrystals(unsigned)
std::vector< MESet const * > sources_
dictionary rawdata
Definition: lumiPlot.py:393
tuple status
Definition: ntuplemaker.py:245
void ecaldqm::SummaryClient::setMEData ( std::vector< MEData > &  _data)
static

Definition at line 126 of file SummaryClient.cc.

References MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH2F, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kEcal, EcalDQMBinningService::kEcal2P, kQualitySummary, EcalDQMBinningService::kReport, kReportSummary, kReportSummaryContents, kReportSummaryMap, EcalDQMBinningService::kSM, and EcalDQMBinningService::kSuperCrystal.