CMS 3D CMS Logo

EcalMEFormatter.cc
Go to the documentation of this file.
2 
4 
7 
9 
10 #include <limits>
11 
13  initialize("EcalMEFormatter", _ps);
15  setTokens(collector);
16  setME(_ps.getUntrackedParameterSet("MEs"));
17  verbosity_ = _ps.getUntrackedParameter<int>("verbosity", 0);
18 }
19 
20 /*static*/
24  desc.addUntracked<int>("verbosity", 0);
25 
26  _descs.addDefault(desc);
27 }
28 
30  DQMStore::IGetter &_igetter,
31  edm::LuminosityBlock const &,
32  edm::EventSetup const &_es) {
34  format_(_igetter, true);
35 }
36 
38 
39 void EcalMEFormatter::format_(DQMStore::IGetter &_igetter, bool _checkLumi) {
40  std::string failedPath;
41 
42  for (auto &mItr : MEs_) {
43  if (_checkLumi && !mItr.second->getLumiFlag())
44  continue;
45  mItr.second->clear();
46  if (!mItr.second->retrieve(GetElectronicsMap(), _igetter, &failedPath)) {
47  if (verbosity_ > 0)
48  edm::LogWarning("EcalDQM") << "Could not find ME " << mItr.first << "@" << failedPath;
49  continue;
50  }
51  if (verbosity_ > 1)
52  edm::LogInfo("EcalDQM") << "Retrieved " << mItr.first << " from DQMStore";
53 
54  if (dynamic_cast<ecaldqm::MESetDet2D *>(mItr.second.get()))
55  formatDet2D_(*mItr.second);
56  }
57 }
58 
60 
void setSetupObjectsEndLumi(edm::EventSetup const &)
Definition: DQWorker.cc:111
void formatDet2D_(ecaldqm::MESet &)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
EcalMEFormatter(edm::ParameterSet const &)
T getUntrackedParameter(std::string const &, T const &) const
void addDefault(ParameterSetDescription const &psetDescription)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static void fillDescriptions(edm::ConfigurationDescriptions &)
Log< level::Info, false > LogInfo
EcalElectronicsMapping const * GetElectronicsMap()
Definition: DQWorker.cc:150
virtual void setME(edm::ParameterSet const &)
Definition: DQWorker.cc:71
void initialize(std::string const &_name, edm::ParameterSet const &)
Definition: DQWorker.cc:65
static void fillDescriptions(edm::ParameterSetDescription &_desc)
Definition: DQWorker.cc:37
MESetCollection MEs_
Definition: DQWorker.h:131
void format_(DQMStore::IGetter &, bool)
void setTokens(edm::ConsumesCollector &)
Definition: DQWorker.cc:53
Log< level::Warning, false > LogWarning
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override