CMS 3D CMS Logo

CastorChannelQuality.h

Go to the documentation of this file.
00001 #ifndef CastorChannelQuality_h
00002 #define CastorChannelQuality_h
00003 
00010 #include <vector>
00011 #include <algorithm>
00012 #include <boost/cstdint.hpp>
00013 
00014 // 
00015 class CastorChannelQuality {
00016  public:
00017   enum Quality {
00018     UNKNOWN = 0,
00019     BAD = 1,
00020     GOOD = 2,
00021     HOT = 3,
00022     DEAD = 4,
00023     END = 5
00024   };
00025   CastorChannelQuality();
00026   ~CastorChannelQuality();
00027   Quality quality (unsigned long fId, bool fWarning = true) const;
00028   bool sorted () const {return mSorted;}
00029   // get list of all available channels
00030   std::vector<unsigned long> getAllChannels () const;
00031   bool setChannel (unsigned long fId, Quality fQuality = UNKNOWN);
00032   void sort ();
00033   static const char* str (Quality fQuality);
00034   class Item {
00035   public:
00036     bool operator< (const Item& other) const {return mId < other.mId;}
00037     bool operator== (const Item& other) const {return mId == other.mId;}
00038     uint32_t mId;
00039     unsigned mQuality;
00040   };
00041  protected:
00042   std::vector<Item> mItems;
00043   bool mSorted;
00044 };
00045 
00046 #endif
00047 

Generated on Tue Jun 9 17:26:18 2009 for CMSSW by  doxygen 1.5.4