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
CSCMonitorObject::~CSCMonitorObject
~CSCMonitorObject() override
Definition: CSCMonitorObject.h:39
CSCMonitorObject::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: CSCMonitorObject.h:31
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
CSCMonitorObject::GetBinError
const double GetBinError(const int bin) override
Definition: CSCMonitorObject.h:122
dqm::impl::MonitorElement::setEntries
virtual void setEntries(double nentries)
set # of entries
Definition: MonitorElement.cc:738
CSCMonitorObject::GetBinContent
double GetBinContent(const int binX) override
Definition: CSCMonitorObject.h:76
CSCMonitorObject::GetEntries
const double GetEntries() override
Definition: CSCMonitorObject.h:109
CSCMonitorObject::getTH1
const TH1 * getTH1(void) const override
Definition: CSCMonitorObject.h:133
to
CSCMonitorObject::me
MonitorElement * me
Definition: CSCMonitorObject.h:35
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
CSCMonitorObject::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: CSCMonitorObject.h:32
DDAxes::x
CSCMonitorObject::Fill
void Fill(float x, float yw) override
Definition: CSCMonitorObject.h:46
relativeConstraints.error
error
Definition: relativeConstraints.py:53
CSCMonitorObject::CSCMonitorObject
CSCMonitorObject(MonitorElement *p_me)
Definition: CSCMonitorObject.h:38
CSCMonitorObject
cscdqm::MonitorObject implementation used in CSCMonitorModuleCmn
Definition: CSCMonitorObject.h:29
dqm::legacy::DQMStore
Definition: DQMStore.h:727
CSCMonitorObject::SetMaximum
void SetMaximum(const double d) override
Definition: CSCMonitorObject.h:115
CSCMonitorObject::SetEntries
void SetEntries(const double value) override
Definition: CSCMonitorObject.h:61
CSCMonitorObject::SetAxisRange
void SetAxisRange(const double from, const double to, const std::string &axis) override
Definition: CSCMonitorObject.h:88
w
const double w
Definition: UKUtility.cc:23
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DDAxes::z
CSCMonitorObject::GetMaximumBin
const int GetMaximumBin() override
Definition: CSCMonitorObject.h:98
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
CSCMonitorObject::SetBinContent
void SetBinContent(const int binX, const int binY, const double value) override
Definition: CSCMonitorObject.h:71
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:474
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCMonitorObject::Fill
void Fill(float x, float y, float zw) override
Definition: CSCMonitorObject.h:51
CommonMethods.lock
def lock()
Definition: CommonMethods.py:82
CSCMonitorObject::GetBinContent
double GetBinContent(const int binX, int binY) override
Definition: CSCMonitorObject.h:82
CSCMonitorObject::SetNormFactor
void SetNormFactor(const double factor) override
Definition: CSCMonitorObject.h:104
value
Definition: value.py:1
CSCMonitorObject::setAxisTitle
void setAxisTitle(const std::string title, const int axisN) override
Definition: CSCMonitorObject.h:93
CSCMonitorObject::SetBinContent
void SetBinContent(const int binX, const double value) override
Definition: CSCMonitorObject.h:66
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
cscdqm::LockType
Definition: CSCDQM_Lock.h:31
CSCMonitorObject::getTH1Lock
TH1 * getTH1Lock(void) override
Definition: CSCMonitorObject.h:135
CSCMonitorObject::SetBinError
void SetBinError(const int bin, const double error) override
Definition: CSCMonitorObject.h:128
CSCDQM_MonitorObject.h
CSCMonitorObject::Fill
void Fill(float x, float y, float z, float w) override
Definition: CSCMonitorObject.h:56
CSCMonitorObject::Fill
void Fill(float x) override
Definition: CSCMonitorObject.h:41
cscdqm::MonitorObject
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
Definition: CSCDQM_MonitorObject.h:35
cscdqm::Lock::mutex
bool mutex
Definition: CSCDQM_Lock.h:48
ztail.d
d
Definition: ztail.py:151
CSCMonitorObject::getRefRootObject
const TObject * getRefRootObject(void) const override
Definition: CSCMonitorObject.h:120
zw
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:75
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592