CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ContainerProf1D.cc
Go to the documentation of this file.
1 
3 
4 
5 namespace hcaldqm
6 {
7  using namespace mapper;
8  using namespace axis;
9  using namespace constants;
10 
12  {
13  _xaxis = NULL;
14  _yaxis = NULL;
15  }
16 
18  std::string const& nametitle, mapper::MapperType mt,
19  axis::Axis *xaxis, axis::Axis *yaxis):
20  Container1D(folder, nametitle, mt, xaxis, yaxis)
21  {}
22 
23  /* virtual */ void ContainerProf1D::initialize(std::string const& folder,
24  std::string const& nametitle, mapper::MapperType mt,
25  axis::Axis *xaxis, axis::Axis *yaxis, int debug/*=0*/)
26  {
27  Container1D::initialize(folder, nametitle, mt, xaxis, yaxis, debug);
28  }
29 
32  {
33  unsigned int size = _mapper.getSize();
34  ib.setCurrentFolder(subsystem+"/"+_folder+aux);
35  _logger.debug(_folder+aux);
36  _logger.debug("Size:");
37  _logger.debug(size);
38  for (unsigned int i=0; i<size; i++)
39  {
40  _logger.debug(i);
42  std::string hname = _mapper.buildName(i);
43  MonitorElement *me = ib.bookProfile(_name+"_"+hname,
44  _name+" "+hname, _xaxis->_nbins, _xaxis->_min, _xaxis->_max,
45  _yaxis->_min, _yaxis->_max);
46  TObject *o = me->getRootObject();
47  _xaxis->setLog(o);
48  _yaxis->setLog(o);
49  _xaxis->setBitAxisLS(o);
50  _yaxis->setBitAxisLS(o);
53  me->setAxisTitle(_xaxis->_title, 1);
54  me->setAxisTitle(_yaxis->_title, 2);
55  for (unsigned int i=0; i<_xaxis->_labels.size(); i++)
56  me->setBinLabel(i+1, _xaxis->_labels[i]);
57  _mes.push_back(me);
58  }
59  }
60 }
61 
62 
63 
64 
65 
66 
67 
68 
virtual void initialize(std::string const &folder, std::string const &nametitle, mapper::MapperType mt, axis::Axis *xaxis, axis::Axis *yaxis=new axis::ValueAxis(axis::fYaxis, axis::fEntries), int debug=0)
int i
Definition: DBlmapReader.cc:9
int ib
Definition: cuy.py:660
virtual void setBitAxisFlag(TObject *o)
Definition: Axis.h:98
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void debug(STDTYPE const &msg) const
Definition: Logger.h:31
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
mapper::Mapper _mapper
Definition: Container1D.h:109
std::string _title
Definition: Axis.h:108
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
virtual void initialize(std::string const &folder, std::string const &nametitle, mapper::MapperType mt, axis::Axis *xaxis, axis::Axis *yaxis=new ValueAxis(fYaxis, fEntries), int debug=0)
Definition: Container1D.cc:28
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