CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
hcaldqm::ContainerSingle1D Class Reference

#include <ContainerSingle1D.h>

Inheritance diagram for hcaldqm::ContainerSingle1D:
hcaldqm::Container hcaldqm::ContainerSingleProf1D

Public Member Functions

virtual void book (DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
 
 ContainerSingle1D ()
 
 ContainerSingle1D (ContainerSingle1D const &)
 
 ContainerSingle1D (std::string const &folder, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN))
 
 ContainerSingle1D (std::string const &folder, std::string const &, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN))
 
virtual void extendAxisRange (int)
 
virtual void fill (double)
 
virtual void fill (double, double)
 
virtual void fill (double, int)
 
virtual void fill (HcalDetId const &)
 
virtual void fill (HcalDetId const &, double)
 
virtual void fill (HcalDetId const &, double, double)
 
virtual void fill (HcalElectronicsId const &)
 
virtual void fill (HcalElectronicsId const &, double)
 
virtual void fill (HcalElectronicsId const &, double, double)
 
virtual void fill (HcalTrigTowerDetId const &)
 
virtual void fill (HcalTrigTowerDetId const &, double)
 
virtual void fill (HcalTrigTowerDetId const &, double, double)
 
virtual void fill (int)
 
virtual void fill (int, double)
 
virtual void fill (int, int)
 
virtual double getBinContent (double)
 
virtual double getBinContent (HcalDetId const &)
 
virtual double getBinContent (HcalElectronicsId const &)
 
virtual double getBinContent (HcalTrigTowerDetId const &)
 
virtual double getBinContent (int)
 
virtual double getBinEntries (double)
 
virtual double getBinEntries (HcalDetId const &)
 
virtual double getBinEntries (HcalElectronicsId const &)
 
virtual double getBinEntries (HcalTrigTowerDetId const &)
 
virtual double getBinEntries (int)
 
virtual void initialize (std::string const &folder, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
 
virtual void initialize (std::string const &folder, std::string const &, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
 
virtual void initialize (std::string const &folder, std::string const &qname, int debug=0)
 
virtual void print ()
 
virtual void reset ()
 
virtual void setBinContent (double, double)
 
virtual void setBinContent (double, int)
 
virtual void setBinContent (HcalDetId const &, double)
 
virtual void setBinContent (HcalDetId const &, int)
 
virtual void setBinContent (HcalElectronicsId const &, double)
 
virtual void setBinContent (HcalElectronicsId const &, int)
 
virtual void setBinContent (HcalTrigTowerDetId const &, double)
 
virtual void setBinContent (HcalTrigTowerDetId const &, int)
 
virtual void setBinContent (int, double)
 
virtual void setBinContent (int, int)
 
virtual void showOverflowX (bool showOverflow)
 
virtual void showOverflowY (bool showOverflow)
 
 ~ContainerSingle1D () override
 
- Public Member Functions inherited from hcaldqm::Container
 Container ()
 
 Container (std::string const &folder, std::string const &qname)
 
virtual void initialize (std::string const &folder, std::string const &qname, int debug=0)
 
virtual ~Container ()
 

Protected Member Functions

virtual void customize ()
 

Protected Attributes

MonitorElement_me
 
quantity::Quantity_qx
 
quantity::Quantity_qy
 
- Protected Attributes inherited from hcaldqm::Container
std::string _folder
 
Logger _logger
 
std::string _qname
 

Additional Inherited Members

- Public Types inherited from hcaldqm::Container
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Detailed Description

Definition at line 19 of file ContainerSingle1D.h.

Constructor & Destructor Documentation

◆ ContainerSingle1D() [1/4]

hcaldqm::ContainerSingle1D::ContainerSingle1D ( )

Definition at line 6 of file ContainerSingle1D.cc.

6  {
7  _qx = nullptr;
8  _qy = nullptr;
9  }

◆ ContainerSingle1D() [2/4]

hcaldqm::ContainerSingle1D::ContainerSingle1D ( std::string const &  folder,
quantity::Quantity qx,
quantity::Quantity qy = new quantity::ValueQuantity(quantity::fN) 
)

Definition at line 16 of file ContainerSingle1D.cc.

17  : Container(folder, qy->name() + "vs" + qx->name()), _qx(qx), _qy(qy) {
20  }

References _qx, _qy, hcaldqm::quantity::fXAxis, hcaldqm::quantity::fYAxis, and hcaldqm::quantity::Quantity::setAxisType().

◆ ContainerSingle1D() [3/4]

hcaldqm::ContainerSingle1D::ContainerSingle1D ( std::string const &  folder,
std::string const &  qname,
quantity::Quantity qx,
quantity::Quantity qy = new quantity::ValueQuantity(quantity::fN) 
)

◆ ContainerSingle1D() [4/4]

hcaldqm::ContainerSingle1D::ContainerSingle1D ( ContainerSingle1D const &  c)

Definition at line 11 of file ContainerSingle1D.cc.

11  : Container(c._folder, c._qname) {
12  _qx = c._qx->makeCopy();
13  _qy = c._qy->makeCopy();
14  }

References _qx, _qy, and c.

◆ ~ContainerSingle1D()

hcaldqm::ContainerSingle1D::~ContainerSingle1D ( )
override

Definition at line 28 of file ContainerSingle1D.cc.

28  {
29  if (_qx != nullptr)
30  delete _qx;
31  if (_qy != nullptr)
32  delete _qy;
33  _qx = nullptr;
34  _qy = nullptr;
35  }

References _qx, and _qy.

Member Function Documentation

◆ book()

void hcaldqm::ContainerSingle1D::book ( DQMStore::IBooker ib,
std::string  subsystem = "Hcal",
std::string  aux = "" 
)
virtual

◆ customize()

void hcaldqm::ContainerSingle1D::customize ( )
protectedvirtual

Definition at line 67 of file ContainerSingle1D.cc.

67  {
68  _me->setAxisTitle(_qx->name(), 1);
69  _me->setAxisTitle(_qy->name(), 2);
70 
71  TH1 *h = _me->getTH1();
72  _qx->setBits(h);
73  _qy->setBits(h);
74 
75  std::vector<std::string> xlabels = _qx->getLabels();
76  for (unsigned int i = 0; i < xlabels.size(); i++)
77  _me->setBinLabel(i + 1, xlabels[i], 1);
78  }

References _me, _qx, _qy, hcaldqm::quantity::Quantity::getLabels(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, hcaldqm::quantity::Quantity::name(), dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), and hcaldqm::quantity::Quantity::setBits().

Referenced by hcaldqm::ContainerSingleProf1D::book(), and book().

◆ extendAxisRange()

void hcaldqm::ContainerSingle1D::extendAxisRange ( int  l)
virtual

Definition at line 191 of file ContainerSingle1D.cc.

191  {
192  if (l < _qx->nbins())
193  return;
194 
195  int x = _qx->nbins();
196  while (l >= x) {
197  _me->getTH1()->LabelsInflate();
198  x *= 2;
199  _qx->setMax(x);
200  }
201  }

References _me, _qx, dqm::legacy::MonitorElement::getTH1(), cmsLHEtoEOSManager::l, LaserClient_cfi::nbins, hcaldqm::quantity::Quantity::nbins(), and hcaldqm::quantity::Quantity::setMax().

◆ fill() [1/15]

void hcaldqm::ContainerSingle1D::fill ( double  x)
virtual

◆ fill() [2/15]

void hcaldqm::ContainerSingle1D::fill ( double  x,
double  y 
)
virtual

◆ fill() [3/15]

void hcaldqm::ContainerSingle1D::fill ( double  x,
int  y 
)
virtual

◆ fill() [4/15]

void hcaldqm::ContainerSingle1D::fill ( HcalDetId const &  id)
virtual

◆ fill() [5/15]

void hcaldqm::ContainerSingle1D::fill ( HcalDetId const &  id,
double  x 
)
virtual

Definition at line 103 of file ContainerSingle1D.cc.

103  {
104  if (_qx->isCoordinate())
105  _me->Fill(_qx->getValue(id), _qy->getValue(x));
106  else
107  _me->Fill(_qx->getValue(x));
108  }

References _me, _qx, _qy, dqm::impl::MonitorElement::Fill(), hcaldqm::quantity::Quantity::getValue(), and hcaldqm::quantity::Quantity::isCoordinate().

◆ fill() [6/15]

void hcaldqm::ContainerSingle1D::fill ( HcalDetId const &  id,
double  x,
double  y 
)
virtual

◆ fill() [7/15]

void hcaldqm::ContainerSingle1D::fill ( HcalElectronicsId const &  id)
virtual

◆ fill() [8/15]

void hcaldqm::ContainerSingle1D::fill ( HcalElectronicsId const &  id,
double  x 
)
virtual

Definition at line 133 of file ContainerSingle1D.cc.

133  {
134  if (_qx->isCoordinate())
135  _me->Fill(_qx->getValue(id), _qy->getValue(x));
136  else
137  _me->Fill(_qx->getValue(x));
138  }

References _me, _qx, _qy, dqm::impl::MonitorElement::Fill(), hcaldqm::quantity::Quantity::getValue(), and hcaldqm::quantity::Quantity::isCoordinate().

◆ fill() [9/15]

void hcaldqm::ContainerSingle1D::fill ( HcalElectronicsId const &  id,
double  x,
double  y 
)
virtual

◆ fill() [10/15]

void hcaldqm::ContainerSingle1D::fill ( HcalTrigTowerDetId const &  id)
virtual

◆ fill() [11/15]

void hcaldqm::ContainerSingle1D::fill ( HcalTrigTowerDetId const &  id,
double  x 
)
virtual

Definition at line 163 of file ContainerSingle1D.cc.

163  {
164  if (_qx->isCoordinate())
165  _me->Fill(_qx->getValue(id), _qy->getValue(x));
166  else
167  _me->Fill(_qx->getValue(x));
168  }

References _me, _qx, _qy, dqm::impl::MonitorElement::Fill(), hcaldqm::quantity::Quantity::getValue(), and hcaldqm::quantity::Quantity::isCoordinate().

◆ fill() [12/15]

void hcaldqm::ContainerSingle1D::fill ( HcalTrigTowerDetId const &  id,
double  x,
double  y 
)
virtual

◆ fill() [13/15]

void hcaldqm::ContainerSingle1D::fill ( int  x)
virtual

◆ fill() [14/15]

void hcaldqm::ContainerSingle1D::fill ( int  x,
double  y 
)
virtual

◆ fill() [15/15]

void hcaldqm::ContainerSingle1D::fill ( int  x,
int  y 
)
virtual

◆ getBinContent() [1/5]

double hcaldqm::ContainerSingle1D::getBinContent ( double  x)
virtual

◆ getBinContent() [2/5]

double hcaldqm::ContainerSingle1D::getBinContent ( HcalDetId const &  id)
virtual

Definition at line 117 of file ContainerSingle1D.cc.

117  {
118  return _me->getBinContent(_qx->getBin(id));
119  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::getBinContent().

◆ getBinContent() [3/5]

double hcaldqm::ContainerSingle1D::getBinContent ( HcalElectronicsId const &  id)
virtual

Definition at line 147 of file ContainerSingle1D.cc.

147  {
148  return _me->getBinContent(_qx->getBin(id));
149  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::getBinContent().

◆ getBinContent() [4/5]

double hcaldqm::ContainerSingle1D::getBinContent ( HcalTrigTowerDetId const &  id)
virtual

Definition at line 177 of file ContainerSingle1D.cc.

177  {
178  return _me->getBinContent(_qx->getBin(id));
179  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::getBinContent().

◆ getBinContent() [5/5]

double hcaldqm::ContainerSingle1D::getBinContent ( int  x)
virtual

◆ getBinEntries() [1/5]

double hcaldqm::ContainerSingle1D::getBinEntries ( double  x)
virtual

◆ getBinEntries() [2/5]

double hcaldqm::ContainerSingle1D::getBinEntries ( HcalDetId const &  id)
virtual

Definition at line 120 of file ContainerSingle1D.cc.

120  {
121  return _me->getBinEntries(_qx->getBin(id));
122  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::getBinEntries().

◆ getBinEntries() [3/5]

double hcaldqm::ContainerSingle1D::getBinEntries ( HcalElectronicsId const &  id)
virtual

Definition at line 150 of file ContainerSingle1D.cc.

150  {
151  return _me->getBinEntries(_qx->getBin(id));
152  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::getBinEntries().

◆ getBinEntries() [4/5]

double hcaldqm::ContainerSingle1D::getBinEntries ( HcalTrigTowerDetId const &  id)
virtual

Definition at line 180 of file ContainerSingle1D.cc.

180  {
181  return _me->getBinEntries(_qx->getBin(id));
182  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::getBinEntries().

◆ getBinEntries() [5/5]

double hcaldqm::ContainerSingle1D::getBinEntries ( int  x)
virtual

◆ initialize() [1/3]

void hcaldqm::ContainerSingle1D::initialize ( std::string const &  folder,
quantity::Quantity qx,
quantity::Quantity qy = new quantity::ValueQuantity(quantity::fN),
int  debug = 0 
)
virtual

◆ initialize() [2/3]

void hcaldqm::ContainerSingle1D::initialize ( std::string const &  folder,
std::string const &  qname,
quantity::Quantity qx,
quantity::Quantity qy = new quantity::ValueQuantity(quantity::fN),
int  debug = 0 
)
virtual

◆ initialize() [3/3]

virtual void hcaldqm::Container::initialize
inline

Definition at line 30 of file Container.h.

30  {
31  _folder = folder;
32  _qname = qname;
34  }

◆ print()

virtual void hcaldqm::ContainerSingle1D::print ( void  )
inlinevirtual

Definition at line 94 of file ContainerSingle1D.h.

94 { std::cout << _qname << std::endl; }

References hcaldqm::Container::_qname, and gather_cfg::cout.

◆ reset()

virtual void hcaldqm::ContainerSingle1D::reset ( void  )
inlinevirtual

Definition at line 93 of file ContainerSingle1D.h.

93 { _me->Reset(); }

References _me, and dqm::impl::MonitorElement::Reset().

◆ setBinContent() [1/10]

void hcaldqm::ContainerSingle1D::setBinContent ( double  x,
double  y 
)
virtual

◆ setBinContent() [2/10]

void hcaldqm::ContainerSingle1D::setBinContent ( double  x,
int  y 
)
virtual

◆ setBinContent() [3/10]

void hcaldqm::ContainerSingle1D::setBinContent ( HcalDetId const &  id,
double  x 
)
virtual

Definition at line 127 of file ContainerSingle1D.cc.

127  {
128  _me->setBinContent(_qx->getBin(id), x);
129  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::setBinContent().

◆ setBinContent() [4/10]

void hcaldqm::ContainerSingle1D::setBinContent ( HcalDetId const &  id,
int  x 
)
virtual

Definition at line 124 of file ContainerSingle1D.cc.

124  {
125  _me->setBinContent(_qx->getBin(id), x);
126  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::setBinContent().

◆ setBinContent() [5/10]

void hcaldqm::ContainerSingle1D::setBinContent ( HcalElectronicsId const &  id,
double  x 
)
virtual

Definition at line 157 of file ContainerSingle1D.cc.

157  {
158  _me->setBinContent(_qx->getBin(id), x);
159  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::setBinContent().

◆ setBinContent() [6/10]

void hcaldqm::ContainerSingle1D::setBinContent ( HcalElectronicsId const &  id,
int  x 
)
virtual

Definition at line 154 of file ContainerSingle1D.cc.

154  {
155  _me->setBinContent(_qx->getBin(id), x);
156  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::setBinContent().

◆ setBinContent() [7/10]

void hcaldqm::ContainerSingle1D::setBinContent ( HcalTrigTowerDetId const &  id,
double  x 
)
virtual

Definition at line 187 of file ContainerSingle1D.cc.

187  {
188  _me->setBinContent(_qx->getBin(id), x);
189  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::setBinContent().

◆ setBinContent() [8/10]

void hcaldqm::ContainerSingle1D::setBinContent ( HcalTrigTowerDetId const &  id,
int  x 
)
virtual

Definition at line 184 of file ContainerSingle1D.cc.

184  {
185  _me->setBinContent(_qx->getBin(id), x);
186  }

References _me, _qx, hcaldqm::quantity::Quantity::getBin(), and dqm::impl::MonitorElement::setBinContent().

◆ setBinContent() [9/10]

void hcaldqm::ContainerSingle1D::setBinContent ( int  x,
double  y 
)
virtual

◆ setBinContent() [10/10]

void hcaldqm::ContainerSingle1D::setBinContent ( int  x,
int  y 
)
virtual

◆ showOverflowX()

void hcaldqm::ContainerSingle1D::showOverflowX ( bool  showOverflow)
virtual

Definition at line 203 of file ContainerSingle1D.cc.

203 { _qx->showOverflow(showOverflow); }

References _qx, and hcaldqm::quantity::Quantity::showOverflow().

Referenced by LaserTask::bookHistograms().

◆ showOverflowY()

void hcaldqm::ContainerSingle1D::showOverflowY ( bool  showOverflow)
virtual

Definition at line 205 of file ContainerSingle1D.cc.

205 { _qy->showOverflow(showOverflow); }

References _qy, and hcaldqm::quantity::Quantity::showOverflow().

Member Data Documentation

◆ _me

MonitorElement* hcaldqm::ContainerSingle1D::_me
protected

◆ _qx

quantity::Quantity* hcaldqm::ContainerSingle1D::_qx
protected

◆ _qy

quantity::Quantity* hcaldqm::ContainerSingle1D::_qy
protected
hcal_dqm_sourceclient-live_cfg.subsystem
subsystem
Definition: hcal_dqm_sourceclient-live_cfg.py:16
DDAxes::y
dqm::impl::MonitorElement::getBinEntries
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
Definition: MonitorElement.cc:645
hcaldqm::quantity::Quantity::showOverflow
virtual void showOverflow(bool showOverflow)
Definition: Quantity.h:68
mps_fire.i
i
Definition: mps_fire.py:428
hcaldqm::quantity::Quantity::setAxisType
virtual void setAxisType(AxisType at)
Definition: Quantity.h:36
printsummarytable.folder
folder
Definition: printsummarytable.py:7
gather_cfg.cout
cout
Definition: gather_cfg.py:144
hcaldqm::quantity::Quantity::setBits
virtual void setBits(TH1 *o)
Definition: Quantity.h:51
hcaldqm::Container::initialize
virtual void initialize(std::string const &folder, std::string const &qname, int debug=0)
Definition: Container.h:30
DDAxes::x
hcaldqm::quantity::Quantity::min
virtual double min()
Definition: Quantity.h:59
hcaldqm::Container::_folder
std::string _folder
Definition: Container.h:37
hcaldqm::quantity::Quantity::getBin
virtual uint32_t getBin(HcalDetId const &)
Definition: Quantity.h:39
hcaldqm::quantity::Quantity::nbins
virtual int nbins()
Definition: Quantity.h:57
debug
#define debug
Definition: HDRShower.cc:19
hcaldqm::quantity::Quantity::getValue
virtual int getValue(HcalDetId const &)
Definition: Quantity.h:45
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
hcaldqm::quantity::Quantity::max
virtual double max()
Definition: Quantity.h:60
hcaldqm::ContainerSingle1D::_qx
quantity::Quantity * _qx
Definition: ContainerSingle1D.h:103
h
hcaldqm::quantity::fYAxis
Definition: Quantity.h:25
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:475
hcaldqm::ContainerSingle1D::customize
virtual void customize()
Definition: ContainerSingle1D.cc:67
hcaldqm::quantity::Quantity::getLabels
virtual std::vector< std::string > getLabels()
Definition: Quantity.h:62
hcaldqm::quantity::Quantity::name
virtual std::string name()
Definition: Quantity.h:34
hcaldqm::Container::_logger
Logger _logger
Definition: Container.h:39
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
cuy.ib
ib
Definition: cuy.py:662
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
hcaldqm::quantity::Quantity::setMax
virtual void setMax(double)
Definition: Quantity.h:64
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
hcaldqm::ContainerSingle1D::_qy
quantity::Quantity * _qy
Definition: ContainerSingle1D.h:104
hcaldqm::ContainerSingle1D::_me
MonitorElement * _me
Definition: ContainerSingle1D.h:102
Logger::set
void set(std::string const &name, int debug=0)
Definition: Logger.h:29
hcaldqm::quantity::Quantity::isCoordinate
virtual bool isCoordinate()
Definition: Quantity.h:61
hcaldqm::quantity::fXAxis
Definition: Quantity.h:25
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
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
hcaldqm::Container::_qname
std::string _qname
Definition: Container.h:38
hcaldqm::Container::Container
Container()
Definition: Container.h:26