CMS 3D CMS Logo

HcalDigisClient.h
Go to the documentation of this file.
1 /*
2  * File: HcalDigisClient.h
3  * Author: fahim
4  *
5  * Created on June 11, 2011, 6:38 PM
6  */
7 
8 #ifndef HCALDIGISCLIENT_H
9 #define HCALDIGISCLIENT_H
10 
11 #include <memory>
12 
13 // user include files
18 
21 
23 
25 
27 public:
28  explicit HcalDigisClient(const edm::ParameterSet &);
29 
30  ~HcalDigisClient() override;
31 
32 private:
33  void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override {
34  igetter.setCurrentFolder(dirName_); // This sets the DQMStore (should apply to ibooker as well
35  runClient(ibooker, igetter);
36  }
37 
38  struct HistLim {
39  HistLim(int nbin, double mini, double maxi) : n(nbin), min(mini), max(maxi) {}
40  int n;
41  double min;
42  double max;
43  };
44 
45  virtual void runClient(DQMStore::IBooker &ib, DQMStore::IGetter &ig);
46  int HcalDigisEndjob(const std::vector<MonitorElement *> &hcalMEs, std::string subdet_, DQMStore::IBooker &ib);
47 
49 
50  void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max) {
51  if (!msm_->count(name))
52  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), n, min, max);
53  }
54 
56  if (!msm_->count(name))
57  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max);
58  }
59 
60  void fill1D(std::string name, double X, double weight = 1) { msm_->find(name)->second->Fill(X, weight); }
61 
62  void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY) {
63  if (!msm_->count(name))
64  (*msm_)[name] = ib.book2D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
65  }
66 
67  void fill2D(std::string name, double X, double Y, double weight = 1) { msm_->find(name)->second->Fill(X, Y, weight); }
68 
69  void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY) {
70  if (!msm_->count(name))
71  (*msm_)[name] =
72  ib.bookProfile(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
73  }
74 
75  void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY, const char *option) {
76  if (!msm_->count(name))
77  (*msm_)[name] =
78  ib.bookProfile(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max, option);
79  }
80 
81  void fillPf(std::string name, double X, double Y) { msm_->find(name)->second->Fill(X, Y); }
82 
83  std::string str(int x);
84 
85  double integralMETH2D(MonitorElement *ME, int i0, int i1, int j0, int j1);
86  void scaleMETH2D(MonitorElement *ME, double s);
87  std::map<std::string, MonitorElement *> *msm_;
90 };
91 
92 #endif /* HCALDIGISCLIENT_H */
DQMEDHarvester.h
HcalDigisClient::book1D
void book1D(DQMStore::IBooker &ib, std::string name, const HistLim &limX)
Definition: HcalDigisClient.h:55
HcalDigisClient::HistLim::max
double max
Definition: HcalDigisClient.h:42
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalDigisClient::book2D
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
Definition: HcalDigisClient.h:62
HcalDigisClient::bookPf
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
Definition: HcalDigisClient.h:69
X
#define X(str)
Definition: MuonsGrabber.cc:38
min
T min(T a, T b)
Definition: MathUtil.h:58
HcalDigisClient::~HcalDigisClient
~HcalDigisClient() override
Definition: HcalDigisClient.cc:28
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HcalDigisClient::msm_
std::map< std::string, MonitorElement * > * msm_
Definition: HcalDigisClient.h:87
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
DDAxes::x
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:94
HcalDigisClient::dirName_
std::string dirName_
Definition: HcalDigisClient.h:89
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
Service.h
HcalDigisClient::fill2D
void fill2D(std::string name, double X, double Y, double weight=1)
Definition: HcalDigisClient.h:67
HcalDigisClient::HcalDigisEndjob
int HcalDigisEndjob(const std::vector< MonitorElement * > &hcalMEs, std::string subdet_, DQMStore::IBooker &ib)
Definition: HcalDigisClient.cc:56
HcalDigisClient::HistLim::n
int n
Definition: HcalDigisClient.h:40
HcalDigisClient::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
Definition: HcalDigisClient.h:33
edm::ParameterSet
Definition: ParameterSet.h:47
HcalDigisClient::fillPf
void fillPf(std::string name, double X, double Y)
Definition: HcalDigisClient.h:81
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalDigisClient::integralMETH2D
double integralMETH2D(MonitorElement *ME, int i0, int i1, int j0, int j1)
Definition: HcalDigisClient.cc:211
cuy.ib
ib
Definition: cuy.py:661
HcalDigisClient::fill1D
void fill1D(std::string name, double X, double weight=1)
Definition: HcalDigisClient.h:60
HcalDigisClient::HistLim
Definition: HcalDigisClient.h:38
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMEDHarvester
Definition: DQMEDHarvester.py:1
HcalDigisClient::scaleMETH2D
void scaleMETH2D(MonitorElement *ME, double s)
Definition: HcalDigisClient.cc:222
HcalDigisClient::runClient
virtual void runClient(DQMStore::IBooker &ib, DQMStore::IGetter &ig)
Definition: HcalDigisClient.cc:30
HcalDigisClient::book1D
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
Definition: HcalDigisClient.h:50
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
HcalDigisClient::HistLim::HistLim
HistLim(int nbin, double mini, double maxi)
Definition: HcalDigisClient.h:39
ME
Definition: ME.h:11
HcalDigisClient::outputFile_
std::string outputFile_
Definition: HcalDigisClient.h:88
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HcalDigisClient
Definition: HcalDigisClient.h:26
BeamSpotPI::Y
Definition: BeamSpotPayloadInspectorHelper.h:32
dqm::implementation::IBooker
Definition: DQMStore.h:43
HcalDigisClient::str
std::string str(int x)
Definition: HcalDigisClient.cc:205
ParameterSet.h
HcalDigisClient::HistLim::min
double min
Definition: HcalDigisClient.h:41
HcalDigisClient::monitor
MonitorElement * monitor(std::string name)
Definition: HcalDigisClient.cc:198
HcalDigisClient::bookPf
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY, const char *option)
Definition: HcalDigisClient.h:75
weight
Definition: weight.py:1
HcalDigisClient::HcalDigisClient
HcalDigisClient(const edm::ParameterSet &)
Definition: HcalDigisClient.cc:22