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 
31  private:
32 
34 
35  public:
36 
37  CSCMonitorObject(MonitorElement* p_me){ me = p_me; }
38  ~CSCMonitorObject() override { }
39 
40  void Fill(float x) override {
42  me->Fill(x);
43  }
44 
45  void Fill(float x, float yw) override {
47  me->Fill(x, yw);
48  }
49 
50  void Fill(float x, float y, float zw) override {
52  me->Fill(x, y, zw);
53  }
54 
55  void Fill(float x, float y, float z, float w) override {
57  me->Fill(x, y, z, w);
58  }
59 
60  void SetEntries(const double value) override {
62  me->setEntries(value);
63  }
64 
65  void SetBinContent(const int binX, const double value) override {
67  me->setBinContent(binX, value);
68  }
69 
70  void SetBinContent(const int binX, const int binY, const double value) override {
72  me->setBinContent(binX, binY, value);
73  }
74 
75  double GetBinContent(const int binX) override {
77  double d = me->getBinContent(binX);
78  return d;
79  }
80 
81  double GetBinContent(const int binX, int binY) override {
83  double d = me->getBinContent(binX, binY);
84  return d;
85  }
86 
87  void SetAxisRange(const double from, const double to, const std::string& axis) override {
89  me->getTH1()->SetAxisRange(from, to, axis.c_str());
90  }
91 
92  void setAxisTitle(const std::string title, const int axisN) override {
94  me->setAxisTitle(title, axisN);
95  }
96 
97  const int GetMaximumBin() override {
99  int i = me->getTH1()->GetMaximumBin();
100  return i;
101  }
102 
103  void SetNormFactor(const double factor) override {
105  me->getTH1()->SetNormFactor(factor);
106  }
107 
108  const double GetEntries() override {
110  double d = me->getTH1()->GetEntries();
111  return d;
112  }
113 
114  void SetMaximum(const double d) override {
116  me->getTH1()->SetMaximum(d);
117  }
118 
119  const TObject *getRefRootObject(void) const override {
120  return me->getRefRootObject();
121  }
122 
123  const double GetBinError(const int bin) override {
125  double d = me->getTH1()->GetBinError(bin);
126  return d;
127  }
128 
129  void SetBinError(const int bin, const double error) override {
131  me->getTH1()->SetBinError(bin, error);
132  }
133 
134  const TH1 *getTH1(void) const override {
135  return me->getTH1();
136  }
137 
138  TH1 *getTH1Lock(void) override {
139  return me->getTH1();
140  }
141 
142 
143 };
144 
145 #endif
void SetNormFactor(const double factor) override
void SetAxisRange(const double from, const double to, const std::string &axis) override
void setBinContent(int binx, double content)
set content of bin (1-D)
const double w
Definition: UKUtility.cc:23
const TObject * getRefRootObject(void) const override
cscdqm::MonitorObject implementation used in CSCMonitorModuleCmn
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
const TH1 * getTH1(void) const 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)
void Fill(float x) override
TH1 * getTH1(void) const
Definition: value.py:1
~CSCMonitorObject() override
void setEntries(double nentries)
set # of entries
const double GetEntries() override
bin
set the eta bin as selection string.
MonitorElement * me
double GetBinContent(const int binX) override
const double GetBinError(const int bin) override
void SetEntries(const double value) override
double getBinContent(int binx) const
get content of bin (1-D)
void Fill(float x, float yw) override
CSCMonitorObject(MonitorElement *p_me)
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:75
const int GetMaximumBin() override
void SetBinContent(const int binX, const int binY, const double value) override
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
TObject * getRefRootObject(void) const
void SetMaximum(const double d) override