CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ValueAxis.cc
Go to the documentation of this file.
1 
3 
4 namespace hcaldqm
5 {
6  using namespace constants;
7  namespace axis
8  {
10  Axis(), _vtype(fEnergy)
11  {}
12 
14  Axis(vtitle[vtype], type, fValue, vnbins[vtype],
15  vmin[vtype], vmax[vtype], log), _vtype(vtype)
16  {
17  this->_setup();
18  }
19 
21  double min, double max, std::string title, bool log):
22  Axis(title, type, fValue, n, min, max, log), _vtype(vtype)
23  {
24  this->_setup();
25  }
26 
27  /* virtual */ int ValueAxis::getBin(int value)
28  {
29  // only LS type right now
30  int r=1;
31  switch(_vtype)
32  {
33  case fLS:
34  r = value;
35  break;
36  default:
37  r = 1;
38  break;
39  }
40 
41  return r;
42  }
43 
44  /* virtual */ int ValueAxis::getBin(double v)
45  {
46  return 1;
47  }
48 
49  /* virtual */ void ValueAxis::_setup()
50  {
51  }
52  }
53 }
54 
55 
56 
57 
type
Definition: HCALResponse.h:21
virtual void _setup()
Definition: ValueAxis.cc:49
virtual int getBin(int)
Definition: ValueAxis.cc:27
double const vmax[nValueType]
Definition: ValueAxis.h:69
T min(T a, T b)
Definition: MathUtil.h:58
double const vmin[nValueType]
Definition: ValueAxis.h:65
std::string const vtitle[nValueType]
Definition: ValueAxis.h:57
int const vnbins[nValueType]
Definition: ValueAxis.h:74