CMS 3D CMS Logo

CSCMonitorObject.h
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: MonitorObject.h
5  *
6  * Description: Monitor Object envelope
7  *
8  * Version: 1.0
9  * Created: 10/06/2008 01:49:51 PM
10  * Revision: none
11  * Compiler: gcc
12  *
13  * Author: Valdas Rapsevicius, valdas.rapsevicius@cern.ch
14  * Company: CERN, CH
15  *
16  * =====================================================================================
17  */
18 
19 #ifndef CSCMonitorObject_H
20 #define CSCMonitorObject_H
21 
23 #include "CSCDQM_MonitorObject.h"
24 
30 protected:
33 
34 private:
36 
37 public:
38  CSCMonitorObject(MonitorElement *p_me) { me = p_me; }
39  ~CSCMonitorObject() override {}
40 
41  void Fill(float x) override {
43  me->Fill(x);
44  }
45 
46  void Fill(float x, float yw) override {
48  me->Fill(x, yw);
49  }
50 
51  void Fill(float x, float y, float zw) override {
53  me->Fill(x, y, zw);
54  }
55 
56  void Fill(float x, float y, float z, float w) override {
58  me->Fill(x, y, z, w);
59  }
60 
61  void SetEntries(const double value) override {
64  }
65 
66  void SetBinContent(const int binX, const double value) override {
68  me->setBinContent(binX, value);
69  }
70 
71  void SetBinContent(const int binX, const int binY, const double value) override {
73  me->setBinContent(binX, binY, value);
74  }
75 
76  double GetBinContent(const int binX) override {
78  double d = me->getBinContent(binX);
79  return d;
80  }
81 
82  double GetBinContent(const int binX, int binY) override {
84  double d = me->getBinContent(binX, binY);
85  return d;
86  }
87 
88  void SetAxisRange(const double from, const double to, const std::string &axis) override {
90  me->getTH1()->SetAxisRange(from, to, axis.c_str());
91  }
92 
93  void setAxisTitle(const std::string title, const int axisN) override {
95  me->setAxisTitle(title, axisN);
96  }
97 
98  const int GetMaximumBin() override {
100  int i = me->getTH1()->GetMaximumBin();
101  return i;
102  }
103 
104  void SetNormFactor(const double factor) override {
106  me->getTH1()->SetNormFactor(factor);
107  }
108 
109  const double GetEntries() override {
111  double d = me->getTH1()->GetEntries();
112  return d;
113  }
114 
115  void SetMaximum(const double d) override {
117  me->getTH1()->SetMaximum(d);
118  }
119 
120  const TObject *getRefRootObject(void) const override { return nullptr; }
121 
122  const double GetBinError(const int bin) override {
124  double d = me->getTH1()->GetBinError(bin);
125  return d;
126  }
127 
128  void SetBinError(const int bin, const double error) override {
130  me->getTH1()->SetBinError(bin, error);
131  }
132 
133  const TH1 *getTH1(void) const override { return me->getTH1(); }
134 
135  TH1 *getTH1Lock(void) override { return me->getTH1(); }
136 };
137 
138 #endif
void SetNormFactor(const double factor) override
void SetAxisRange(const double from, const double to, const std::string &axis) override
virtual void setEntries(double nentries)
set # of entries
cscdqm::MonitorObject implementation used in CSCMonitorModuleCmn
T w() const
void SetBinError(const int bin, const double error) override
void SetBinContent(const int binX, const double value) override
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
void Fill(float x, float y, float zw) override
double GetBinContent(const int binX, int binY) override
void Fill(float x, float y, float z, float w) override
void setAxisTitle(const std::string title, const int axisN) override
TH1 * getTH1Lock(void) override
void Fill(long long x)
const TObject * getRefRootObject(void) const override
void Fill(float x) override
Definition: value.py:1
~CSCMonitorObject() override
d
Definition: ztail.py:151
const double GetEntries() override
MonitorElement * me
dqm::legacy::DQMStore DQMStore
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
double GetBinContent(const int binX) override
const double GetBinError(const int bin) override
void SetEntries(const double value) override
virtual TH1 * getTH1() const
dqm::legacy::MonitorElement MonitorElement
void Fill(float x, float yw) override
const TH1 * getTH1(void) const override
CSCMonitorObject(MonitorElement *p_me)
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:84
const int GetMaximumBin() override
void SetBinContent(const int binX, const int binY, const double value) override
void SetMaximum(const double d) override
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)