CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDQMChannelQuality.h
Go to the documentation of this file.
1 #ifndef HcalDQMChannelQuality_h
2 #define HcalDQMChannelQuality_h
3 
4 #include <string>
5 #include <vector>
6 #include <algorithm>
7 #include <boost/cstdint.hpp>
8 
9 //
11  public:
12  enum Quality {
13  UNKNOWN = 0,
14  BAD = 1,
15  GOOD = 2,
16  COOL = 3,
17  HOT = 4,
18  DEAD = 5,
19  END = 6
20  };
21 
24 
25  Quality quality (unsigned long fId, bool fWarning = true) const;
26  bool isMasked (unsigned long fId, bool fWarning = true) const;
27  unsigned short flagAlgo (unsigned long fId, bool fWarning = true) const;
28  std::string comment (unsigned long fId, bool fWarning = true) const;
29  bool maskCell (Quality fQual) const;
30 
31  bool sorted () const {return mSorted;}
32  // get list of all available channels
33  std::vector<unsigned long> getAllChannels () const;
34  bool setChannel (unsigned long fId, unsigned short algo, Quality fQuality = UNKNOWN);
35 
36  void sort ();
37  static const char* str (Quality fQuality);
38  class Item {
39  public:
40  bool operator< (const Item& other) const {return mId < other.mId;}
41  bool operator== (const Item& other) const {return mId == other.mId;}
42  uint32_t mId;
43  short mAlgo;
44  bool mMasked;
45  std::string mComment;
46  unsigned mQuality;
47  };
48  protected:
49  std::vector<Item> mItems;
50  bool mSorted;
51 };
52 
53 #endif
54 
bool operator==(const Item &other) const
unsigned short flagAlgo(unsigned long fId, bool fWarning=true) const
std::vector< Item > mItems
std::string comment(unsigned long fId, bool fWarning=true) const
Quality quality(unsigned long fId, bool fWarning=true) const
static const char * str(Quality fQuality)
bool maskCell(Quality fQual) const
bool setChannel(unsigned long fId, unsigned short algo, Quality fQuality=UNKNOWN)
std::vector< unsigned long > getAllChannels() const
bool isMasked(unsigned long fId, bool fWarning=true) const
LimitAlgo * algo
Definition: Combine.cc:60
bool operator<(const Item &other) const