CMS 3D CMS Logo

EcalPreshowerMonitorClient.cc
Go to the documentation of this file.
2 
7 
11 
13 
14 #include <memory>
15 #include <iostream>
16 #include <string>
17 #include <vector>
18 
20  debug_(ps.getUntrackedParameter<bool>("debug")),
21  verbose_(ps.getUntrackedParameter<bool>("verbose")),
22  clients_()
23 {
24  std::vector<std::string> enabledClients(ps.getUntrackedParameter<std::vector<std::string> >("enabledClients"));
25 
26  if ( verbose_ ) {
27  std::cout << " Enabled Clients:";
28  for ( unsigned int i = 0; i < enabledClients.size(); i++ ) {
29  std::cout << " " << enabledClients[i];
30  }
31  std::cout << std::endl;
32  }
33 
34  //Setup Clients
35  if ( find(enabledClients.begin(), enabledClients.end(), "Integrity" ) != enabledClients.end() ){
36  clients_.push_back( new ESIntegrityClient(ps) );
37  }
38 
39  if ( find(enabledClients.begin(), enabledClients.end(), "Pedestal" ) != enabledClients.end() ){
40  clients_.push_back( new ESPedestalClient(ps) );
41  }
42 
43  if ( find(enabledClients.begin(), enabledClients.end(), "Summary" ) != enabledClients.end() ){
44  clients_.push_back( new ESSummaryClient(ps) );
45  }
46 
47 }
48 
50 
51  if ( verbose_ ) std::cout << "Finish EcalPreshowerMonitorClient" << std::endl;
52 
53  for ( unsigned int i=0; i<clients_.size(); i++ ) {
54  delete clients_[i];
55  }
56 
57 }
58 
59 /*static*/
60 void
62 {
64 
65  std::vector<std::string> clientsDefault;
66  clientsDefault.push_back("Integrity");
67  clientsDefault.push_back("Pedestal");
68  clientsDefault.push_back("Summary");
69  desc.addUntracked<std::vector<std::string> >("enabledClients", clientsDefault);
70  desc.addUntracked<edm::FileInPath>("LookupTable");
71  desc.addUntracked<std::string>("prefixME", "EcalPreshower");
72  desc.addUntracked<bool>("fitPedestal", true);
73  desc.addUntracked<bool>("cloneME", true);
74  desc.addUntracked<bool>("verbose", false);
75  desc.addUntracked<bool>("debug", false);
76 
77  _descs.addDefault(desc);
78 }
79 
81 
82  if (debug_) {
83  std::cout << "EcalPreshowerMonitorClient: endJob" << std::endl;
84  }
85 
86  for ( unsigned int i=0; i<clients_.size(); i++ ) {
87  clients_[i]->setup(_ibooker);
88  clients_[i]->endJobAnalyze(_igetter);
89  }
90 
91 }
92 
94 
95  for ( unsigned int i=0; i<clients_.size(); i++ ) {
96  clients_[i]->setup(_ibooker);
97  clients_[i]->endLumiAnalyze(_igetter);
98  }
99 
100 }
101 
102 //define this as a plug-in
std::vector< ESClient * > clients_
T getUntrackedParameter(std::string const &, T const &) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
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:20
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