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  virtual FlagAxis* makeCopy()
46  {return new FlagAxis(_type, _title, _nbins);}
47 
48  virtual inline int getBin(int v) {return v+1;}
49 
50  virtual void loadLabels(std::vector<std::string> const&);
51  virtual void setBinAxisFlag(TObject *o)
52  {
53  o->SetBit(BIT(BIT_OFFSET+BIT_AXIS_FLAG));
54  }
55 
56  protected:
57  virtual void _setup();
58  };
59  }
60 }
61 
62 #endif
virtual void setBinAxisFlag(TObject *o)
Definition: FlagAxis.h:51
virtual int getBin(int v)
Definition: FlagAxis.h:48
virtual FlagAxis * makeCopy()
Definition: FlagAxis.h:45
int const BIT_AXIS_FLAG
Definition: Constants.h:185
int const BIT_OFFSET
Definition: Constants.h:180