CMS 3D CMS Logo

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