00001 #ifndef CastorQIEData_h 00002 #define CastorQIEData_h 00003 00010 #include <vector> 00011 #include <algorithm> 00012 00013 #include "CondFormats/CastorObjects/interface/CastorQIEShape.h" 00014 #include "CondFormats/CastorObjects/interface/CastorQIECoder.h" 00015 #include "DataFormats/DetId/interface/DetId.h" 00016 00017 00018 // 00019 class CastorQIEData { 00020 public: 00021 00022 CastorQIEData(); 00023 CastorQIEData(const CastorQIEData&); 00024 ~CastorQIEData(); 00025 00027 // const HcalQIEShape& getShape () const {return mShape;} 00028 const CastorQIEShape& getShape () const; 00030 const CastorQIECoder* getCoder (DetId fId) const; 00031 // get list of all available channels 00032 std::vector<DetId> getAllChannels () const; 00033 // check if data are sorted 00034 bool sorted () const {return mSorted;} 00035 // fill values [capid][range] 00036 bool addCoder (DetId fId, const CastorQIECoder& fCoder); 00037 // sort values by channelId 00038 void sort (); 00039 typedef CastorQIECoder Item; 00040 typedef std::vector <Item> Container; 00041 private: 00042 Container mItems; 00043 bool mSorted; 00044 }; 00045 00046 #endif