CMS 3D CMS Logo

RawDataClient.cc
Go to the documentation of this file.
2 
5 
7 
9 
10 #include <cmath>
11 
12 namespace ecaldqm {
13 
14  RawDataClient::RawDataClient() : DQWorkerClient(), synchErrThresholdFactor_(0.) {
15  qualitySummaries_.insert("QualitySummary");
16  }
17 
19  synchErrThresholdFactor_ = _params.getUntrackedParameter<double>("synchErrThresholdFactor");
20  }
21 
23  MESet& meQualitySummary(MEs_.at("QualitySummary"));
24  MESet& meErrorsSummary(MEs_.at("ErrorsSummary"));
25 
26  MESet const& sEntries(sources_.at("Entries"));
27  MESet const& sL1ADCC(sources_.at("L1ADCC"));
28  MESet const& sFEStatus(sources_.at("FEStatus"));
29 
30  uint32_t mask(1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR);
31 
32  std::vector<int> dccStatus(nDCC, 1);
33 
34  for (unsigned iDCC(0); iDCC < nDCC; ++iDCC) {
35  double entries(sEntries.getBinContent(iDCC + 1));
36  if (entries > 1. &&
37  sL1ADCC.getBinContent(iDCC + 1) > synchErrThresholdFactor_ * std::log(entries) / std::log(10.))
38  dccStatus[iDCC] = 0;
39  }
40 
41  MESet::iterator meEnd(meQualitySummary.end());
42  for (MESet::iterator meItr(meQualitySummary.beginChannel()); meItr != meEnd; meItr.toNextChannel()) {
43  DetId id(meItr->getId());
44 
45  bool doMask(meQualitySummary.maskMatches(id, mask, statusManager_));
46 
47  int dccid(dccId(id));
48 
49  if (dccStatus[dccid - 1] == 0) {
50  meItr->setBinContent(doMask ? kMUnknown : kUnknown);
51  continue;
52  }
53 
54  int towerStatus(doMask ? kMGood : kGood);
55  float towerEntries(0.);
56  for (unsigned iS(0); iS < nFEFlags; iS++) {
57  float entries(sFEStatus.getBinContent(id, iS + 1));
58  towerEntries += entries;
59  if (entries > 0. && iS != Enabled && iS != Suppressed && iS != FIFOFull && iS != FIFOFullL1ADesync &&
60  iS != ForcedZS)
61  towerStatus = doMask ? kMBad : kBad;
62  }
63 
64  if (towerEntries < 1.)
65  towerStatus = doMask ? kMUnknown : kUnknown;
66 
67  meItr->setBinContent(towerStatus);
68  if (towerStatus == kBad)
69  meErrorsSummary.fill(dccid);
70  }
71  }
72 
74 } // namespace ecaldqm
ecaldqm
Definition: DQWorker.h:24
ecaldqm::RawDataClient
Definition: RawDataClient.h:8
ecaldqm::Enabled
Definition: FEFlags.h:9
l1extraParticles_cfi._params
_params
Definition: l1extraParticles_cfi.py:29
ecaldqm::DQWorkerClient::statusManager_
StatusManager const * statusManager_
Definition: DQWorkerClient.h:60
EcalDQMStatusHelper::STATUS_FLAG_ERROR
static const int STATUS_FLAG_ERROR
Definition: EcalDQMStatusHelper.h:44
ecaldqm::Suppressed
Definition: FEFlags.h:16
ecaldqm::RawDataClient::RawDataClient
RawDataClient()
Definition: RawDataClient.cc:14
ecaldqm::FIFOFullL1ADesync
Definition: FEFlags.h:21
FEFlags.h
EcalDQMStatusHelper.h
DetId
Definition: DetId.h:17
ecaldqm::DQWorkerClient::qualitySummaries_
std::set< std::string > qualitySummaries_
Definition: DQWorkerClient.h:56
ecaldqm::RawDataClient::synchErrThresholdFactor_
float synchErrThresholdFactor_
Definition: RawDataClient.h:18
RawDataClient.h
ecaldqm::DQWorkerClient::ProcessType
ProcessType
Definition: DQWorkerClient.h:15
ecaldqm::MESet::iterator::toNextChannel
const_iterator & toNextChannel()
Definition: MESet.h:289
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:78
ecaldqm::DQWorkerClient::kMBad
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::kUnknown
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::kBad
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition: DQWorkerClient.h:55
ecaldqm::DQWorkerClient::kMGood
Definition: DQWorkerClient.h:37
edm::ParameterSet
Definition: ParameterSet.h:36
ecaldqm::RawDataClient::setParams
void setParams(edm::ParameterSet const &) override
Definition: RawDataClient.cc:18
ecaldqm::MESet::iterator
Definition: MESet.h:268
ecaldqm::RawDataClient::producePlots
void producePlots(ProcessType) override
Definition: RawDataClient.cc:22
ecaldqm::DQWorkerClient::kMUnknown
Definition: DQWorkerClient.h:37
ecaldqm::DQWorkerClient
Definition: DQWorkerClient.h:13
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ecaldqm::DQWorkerClient::kGood
Definition: DQWorkerClient.h:37
ecaldqm::nFEFlags
Definition: FEFlags.h:25
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
ecaldqm::nDCC
Definition: EcalDQMCommonUtils.h:92
ecaldqm::ForcedZS
Definition: FEFlags.h:24
DEFINE_ECALDQM_WORKER
#define DEFINE_ECALDQM_WORKER(TYPE)
Definition: DQWorker.h:112
ParameterSet.h
ecaldqm::FIFOFull
Definition: FEFlags.h:17
EcalDQMCommonUtils.h
ecaldqm::MESet
Definition: MESet.h:27
ecaldqm::dccId
unsigned dccId(DetId const &)
Definition: EcalDQMCommonUtils.cc:16