CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalPreshowerMonitorClient.cc
Go to the documentation of this file.
2 
7 
11 
13 
14 #include <iostream>
15 #include <memory>
16 #include <string>
17 #include <vector>
18 
20  : debug_(ps.getUntrackedParameter<bool>("debug")), verbose_(ps.getUntrackedParameter<bool>("verbose")), clients_() {
21  std::vector<std::string> enabledClients(ps.getUntrackedParameter<std::vector<std::string>>("enabledClients"));
22 
23  if (verbose_) {
24  std::cout << " Enabled Clients:";
25  for (unsigned int i = 0; i < enabledClients.size(); i++) {
26  std::cout << " " << enabledClients[i];
27  }
28  std::cout << std::endl;
29  }
30 
31  // Setup Clients
32  if (find(enabledClients.begin(), enabledClients.end(), "Integrity") != enabledClients.end()) {
33  clients_.push_back(new ESIntegrityClient(ps));
34  }
35 
36  if (find(enabledClients.begin(), enabledClients.end(), "Pedestal") != enabledClients.end()) {
37  clients_.push_back(new ESPedestalClient(ps));
38  }
39 
40  if (find(enabledClients.begin(), enabledClients.end(), "Summary") != enabledClients.end()) {
41  clients_.push_back(new ESSummaryClient(ps));
42  }
43 }
44 
46  if (verbose_)
47  std::cout << "Finish EcalPreshowerMonitorClient" << std::endl;
48 
49  for (unsigned int i = 0; i < clients_.size(); i++) {
50  delete clients_[i];
51  }
52 }
53 
54 /*static*/
57 
58  std::vector<std::string> clientsDefault;
59  clientsDefault.push_back("Integrity");
60  clientsDefault.push_back("Pedestal");
61  clientsDefault.push_back("Summary");
62  desc.addUntracked<std::vector<std::string>>("enabledClients", clientsDefault);
63  desc.addUntracked<edm::FileInPath>("LookupTable");
64  desc.addUntracked<std::string>("prefixME", "EcalPreshower");
65  desc.addUntracked<bool>("fitPedestal", true);
66  desc.addUntracked<bool>("cloneME", true);
67  desc.addUntracked<bool>("verbose", false);
68  desc.addUntracked<bool>("debug", false);
69 
70  _descs.addDefault(desc);
71 }
72 
74  if (debug_) {
75  std::cout << "EcalPreshowerMonitorClient: endJob" << std::endl;
76  }
77 
78  for (unsigned int i = 0; i < clients_.size(); i++) {
79  clients_[i]->setup(_ibooker);
80  clients_[i]->endJobAnalyze(_igetter);
81  }
82 }
83 
85  DQMStore::IGetter &_igetter,
86  const edm::LuminosityBlock &,
87  const edm::EventSetup &) {
88  for (unsigned int i = 0; i < clients_.size(); i++) {
89  clients_[i]->setup(_ibooker);
90  clients_[i]->endLumiAnalyze(_igetter);
91  }
92 }
93 
94 // define this as a plug-in
T getUntrackedParameter(std::string const &, T const &) const
std::vector< ESClient * > clients_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
static void fillDescriptions(edm::ConfigurationDescriptions &)
void addDefault(ParameterSetDescription const &psetDescription)
EcalPreshowerMonitorClient(const edm::ParameterSet &)
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, const edm::LuminosityBlock &, const edm::EventSetup &) override
tuple cout
Definition: gather_cfg.py:144