CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ecaldqm::RawDataClient Class Reference

#include <RawDataClient.h>

Inheritance diagram for ecaldqm::RawDataClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

void producePlots (ProcessType) override
 
 RawDataClient ()
 
 ~RawDataClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerClient
void bookMEs (DQMStore::IBooker &) override
 
 DQWorkerClient ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void releaseMEs () override
 
void releaseSource ()
 
virtual void resetMEs ()
 
bool retrieveSource (DQMStore::IGetter &, ProcessType)
 
bool runsOn (ProcessType _type) const
 
void setStatusManager (StatusManager const &_manager)
 
virtual ~DQWorkerClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQWorker ()
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
bool onlineMode () const
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setTime (time_t _t)
 
virtual ~DQWorker ()
 

Private Member Functions

void setParams (edm::ParameterSet const &) override
 

Private Attributes

float synchErrThresholdFactor_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerClient
enum  ProcessType { kLumi, kJob, nProcessType }
 
enum  Quality {
  kBad = 0, kGood = 1, kUnknown = 2, kMBad = 3,
  kMGood = 4, kMUnknown = 5
}
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerClient
static void fillDescriptions (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Protected Member Functions inherited from ecaldqm::DQWorkerClient
void setME (edm::ParameterSet const &_ps) final
 
void setSource (edm::ParameterSet const &) override
 
void towerAverage_ (MESet &, MESet const &, float)
 
bool using_ (std::string const &_name, ProcessType _type=kJob) const
 
- Protected Member Functions inherited from ecaldqm::DQWorker
void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorkerClient
bool hasLumiPlots_
 
std::set< std::string > qualitySummaries_
 
MESetCollection sources_
 
StatusManager const * statusManager_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 8 of file RawDataClient.h.

Constructor & Destructor Documentation

ecaldqm::RawDataClient::RawDataClient ( )

Definition at line 14 of file RawDataClient.cc.

References ecaldqm::DQWorkerClient::qualitySummaries_.

14  :
17  {
18  qualitySummaries_.insert("QualitySummary");
19  }
std::set< std::string > qualitySummaries_
ecaldqm::RawDataClient::~RawDataClient ( )
inline

Definition at line 11 of file RawDataClient.h.

11 {}

Member Function Documentation

void ecaldqm::RawDataClient::producePlots ( ProcessType  )
overridevirtual

Implements ecaldqm::DQWorkerClient.

Definition at line 28 of file RawDataClient.cc.

References ecaldqm::dccId(), ecaldqm::Disabled, ecaldqm::Enabled, python.tagInventory::entries, ecaldqm::FIFOFull, ecaldqm::FIFOFullL1ADesync, ecaldqm::ForcedZS, ecaldqm::DQWorkerClient::kBad, ecaldqm::DQWorkerClient::kGood, ecaldqm::DQWorkerClient::kMBad, ecaldqm::DQWorkerClient::kMGood, ecaldqm::DQWorkerClient::kMUnknown, ecaldqm::DQWorkerClient::kUnknown, cmsBatch::log, ecaldqm::DQWorker::MEs_, ecaldqm::nDCC, ecaldqm::nFEFlags, ecaldqm::DQWorkerClient::sources_, EcalDQMStatusHelper::STATUS_FLAG_ERROR, ecaldqm::DQWorkerClient::statusManager_, ecaldqm::Suppressed, synchErrThresholdFactor_, and ecaldqm::MESet::iterator::toNextChannel().

29  {
30  MESet& meQualitySummary(MEs_.at("QualitySummary"));
31  MESet& meErrorsSummary(MEs_.at("ErrorsSummary"));
32 
33  MESet const& sEntries(sources_.at("Entries"));
34  MESet const& sL1ADCC(sources_.at("L1ADCC"));
35  MESet const& sFEStatus(sources_.at("FEStatus"));
36 
37  uint32_t mask(1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR);
38 
39  std::vector<int> dccStatus(nDCC, 1);
40 
41  for(unsigned iDCC(0); iDCC < nDCC; ++iDCC){
42  double entries(sEntries.getBinContent(iDCC + 1));
43  if(entries > 1. && sL1ADCC.getBinContent(iDCC + 1) > synchErrThresholdFactor_ * std::log(entries) / std::log(10.))
44  dccStatus[iDCC] = 0;
45  }
46 
47  MESet::iterator meEnd(meQualitySummary.end());
48  for(MESet::iterator meItr(meQualitySummary.beginChannel()); meItr != meEnd; meItr.toNextChannel()){
49 
50  DetId id(meItr->getId());
51 
52  bool doMask(meQualitySummary.maskMatches(id, mask, statusManager_));
53 
54  int dccid(dccId(id));
55 
56  if(dccStatus[dccid - 1] == 0){
57  meItr->setBinContent(doMask ? kMUnknown : kUnknown);
58  continue;
59  }
60 
61  int towerStatus(doMask ? kMGood : kGood);
62  float towerEntries(0.);
63  for(unsigned iS(0); iS < nFEFlags; iS++){
64  float entries(sFEStatus.getBinContent(id, iS + 1));
65  towerEntries += entries;
66  if(entries > 0. &&
67  iS != Enabled && iS != Disabled && iS != Suppressed &&
68  iS != FIFOFull && iS != FIFOFullL1ADesync && iS != ForcedZS)
69  towerStatus = doMask ? kMBad : kBad;
70  }
71 
72  if(towerEntries < 1.) towerStatus = doMask ? kMUnknown : kUnknown;
73 
74  meItr->setBinContent(towerStatus);
75  if(towerStatus == kBad) meErrorsSummary.fill(dccid);
76  }
77  }
static const int STATUS_FLAG_ERROR
StatusManager const * statusManager_
MESetCollection sources_
Definition: DetId.h:18
MESetCollection MEs_
Definition: DQWorker.h:75
unsigned dccId(DetId const &)
tuple log
Definition: cmsBatch.py:347
void ecaldqm::RawDataClient::setParams ( edm::ParameterSet const &  _params)
overrideprivatevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 22 of file RawDataClient.cc.

References edm::ParameterSet::getUntrackedParameter(), and synchErrThresholdFactor_.

23  {
24  synchErrThresholdFactor_ = _params.getUntrackedParameter<double>("synchErrThresholdFactor");
25  }

Member Data Documentation

float ecaldqm::RawDataClient::synchErrThresholdFactor_
private

Definition at line 18 of file RawDataClient.h.

Referenced by producePlots(), and setParams().