CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FlagAxis.h
Go to the documentation of this file.
1 #ifndef FlagAxis_h
2 #define FlagAxis_h
3 
4 /*
5  * file: FlagAxis.h
6  * Author: Viktor Khristenko
7  *
8  * Description:
9  * Flag Axis plots only flag variables on the axis.
10  * Have to provide the number of flags only (int)
11  *
12  * The mapping between the actual flags and bins is straghtforward:
13  * flags(0 -> n-1) - axis range
14  * bins (1 -> n)
15  * bin = value+1
16  *
17  * Important to note that there are no predefine flags. All the flags
18  * are defined in specific tasks and all the labels are loaded at the
19  * construction of the Task
20  */
21 
23 
24 namespace hcaldqm
25 {
26  namespace axis
27  {
28  using namespace hcaldqm::constants;
29  class FlagAxis : public Axis
30  {
31  public:
32  friend class hcaldqm::Container;
33  friend class hcaldqm::Container1D;
34  friend class hcaldqm::Container2D;
40 
41  public:
42  FlagAxis();
44  virtual ~FlagAxis() {}
45 
46  virtual inline int getBin(int v) {return v+1;}
47 
48  virtual void loadLabels(std::vector<std::string> const&);
49  virtual void setBinAxisFlag(TObject *o)
50  {
51  o->SetBit(BIT(BIT_OFFSET+BIT_AXIS_FLAG));
52  }
53 
54  protected:
55  virtual void _setup();
56  };
57  }
58 }
59 
60 #endif
virtual void setBinAxisFlag(TObject *o)
Definition: FlagAxis.h:49
virtual int getBin(int v)
Definition: FlagAxis.h:46
int const BIT_AXIS_FLAG
Definition: Constants.h:185
int const BIT_OFFSET
Definition: Constants.h:180