CMS 3D CMS Logo

EcalMEFormatter.cc
Go to the documentation of this file.
2 
4 
8 
10 
11 #include <limits>
12 
14  initialize("EcalMEFormatter", _ps);
15  setME(_ps.getUntrackedParameterSet("MEs"));
16  verbosity_ = _ps.getUntrackedParameter<int>("verbosity", 0);
17 }
18 
19 /*static*/
23  desc.addUntracked<int>("verbosity", 0);
24 
25  _descs.addDefault(desc);
26 }
27 
29  DQMStore::IGetter &_igetter,
30  edm::LuminosityBlock const &,
31  edm::EventSetup const &) {
32  format_(_igetter, true);
33 }
34 
36 
37 void EcalMEFormatter::format_(DQMStore::IGetter &_igetter, bool _checkLumi) {
38  std::string failedPath;
39 
40  for (ecaldqm::MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr) {
41  if (_checkLumi && !mItr->second->getLumiFlag())
42  continue;
43  mItr->second->clear();
44  if (!mItr->second->retrieve(_igetter, &failedPath)) {
45  if (verbosity_ > 0)
46  edm::LogWarning("EcalDQM") << "Could not find ME " << mItr->first << "@" << failedPath;
47  continue;
48  }
49  if (verbosity_ > 1)
50  edm::LogInfo("EcalDQM") << "Retrieved " << mItr->first << " from DQMStore";
51 
52  if (dynamic_cast<ecaldqm::MESetDet2D *>(mItr->second))
53  formatDet2D_(*mItr->second);
54  }
55 }
56 
58 
T getUntrackedParameter(std::string const &, T const &) const
void formatDet2D_(ecaldqm::MESet &)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
EcalMEFormatter(edm::ParameterSet const &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void addDefault(ParameterSetDescription const &psetDescription)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
static void fillDescriptions(edm::ConfigurationDescriptions &)
virtual void setME(edm::ParameterSet const &)
Definition: DQWorker.cc:41
void initialize(std::string const &_name, edm::ParameterSet const &)
Definition: DQWorker.cc:35
static void fillDescriptions(edm::ParameterSetDescription &_desc)
Definition: DQWorker.cc:19
MESetCollection MEs_
Definition: DQWorker.h:75
void format_(DQMStore::IGetter &, bool)
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override