CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ContainerProf2D.cc
Go to the documentation of this file.
1 
3 
4 namespace hcaldqm
5 {
6  using namespace mapper;
7  using namespace axis;
8  using namespace constants;
9 
11  {
12  _xaxis = NULL;
13  _yaxis = NULL;
14  _zaxis = NULL;
15  }
16 
18  std::string const& nametitle, MapperType mt, Axis *xaxis,
19  Axis *yaxis, Axis *zaxis):
20  Container2D(folder, nametitle, mt, xaxis, yaxis, zaxis)
21  {}
22 
23  /* virtual */ void ContainerProf2D::initialize(std::string const& folder,
24  std::string const& nametitle, MapperType mt, Axis *xaxis,
25  Axis *yaxis, Axis *zaxis, int debug/*=0*/)
26  {
27  Container2D::initialize(folder, nametitle, mt, xaxis, yaxis, zaxis,
28  debug);
29  }
30 
33  {
34  unsigned int size = _mapper.getSize();
35  ib.setCurrentFolder(subsystem+"/"+_folder+aux);
36  for (unsigned int i=0; i<size; i++)
37  {
38  std::string hname = _mapper.buildName(i);
39  MonitorElement *me = ib.bookProfile2D(_name+"_"+hname,
40  _name+" "+hname, _xaxis->_nbins, _xaxis->_min, _xaxis->_max,
42  _zaxis->_min, _zaxis->_max);
43  TObject *o = me->getRootObject();
44  _xaxis->setLog(o);
45  _yaxis->setLog(o);
46  _zaxis->setLog(o);
47  _xaxis->setBitAxisLS(o);
48  _yaxis->setBitAxisLS(o);
51  me->setAxisTitle(_xaxis->_title, 1);
52  me->setAxisTitle(_yaxis->_title, 2);
53  me->setAxisTitle(_zaxis->_title, 3);
54  for (unsigned int i=0; i<_xaxis->_labels.size(); i++)
55  me->setBinLabel(i+1, _xaxis->_labels[i], 1);
56  for (unsigned int i=0; i<_yaxis->_labels.size(); i++)
57  me->setBinLabel(i+1, _yaxis->_labels[i], 2);
58  _mes.push_back(me);
59  }
60  }
61 }
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
int i
Definition: DBlmapReader.cc:9
virtual void initialize(std::string const &folder, std::string nametitle, mapper::MapperType mt, axis::Axis *xaxis, axis::Axis *yaxis=new axis::CoordinateAxis(axis::fYaxis, axis::fiphi), axis::Axis *zaxis=new axis::ValueAxis(axis::fZaxis, axis::fEntries), int debug=0)
Definition: Container2D.cc:30
int ib
Definition: cuy.py:660
virtual void setBitAxisFlag(TObject *o)
Definition: Axis.h:98
virtual std::string buildName(unsigned id)
Definition: Mapper.h:226
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)
#define NULL
Definition: scimark2.h:8
virtual void initialize(std::string const &folder, std::string const &nametitle, MapperType mt, Axis *xaxis, Axis *yaxis=new CoordinateAxis(axis::fYaxis, axis::fiphi), Axis *zaxis=new ValueAxis(axis::fZaxis, axis::fEntries), int debug=0)
mapper::Mapper _mapper
Definition: Container1D.h:109
std::string _title
Definition: Axis.h:108
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:163
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
std::vector< std::string > _labels
Definition: Axis.h:109
std::string _folder
Definition: Container.h:42
virtual unsigned int size()
Definition: Container1D.h:96
TObject * getRootObject(void) const
#define debug
Definition: HDRShower.cc:19
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
axis::Axis * _xaxis
Definition: Container1D.h:110
axis::Axis * _yaxis
Definition: Container1D.h:111
void setLog(TObject *o)
Definition: Axis.h:89
virtual void setBitAxisLS(TObject *o)
Definition: Axis.h:94
unsigned int getSize()
Definition: Mapper.h:517
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string _name
Definition: Container.h:43