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