00001 #ifndef HcalQIEData_h 00002 #define HcalQIEData_h 00003 00014 #include <vector> 00015 #include <algorithm> 00016 00017 #include "CondFormats/HcalObjects/interface/HcalCondObjectContainer.h" 00018 #include "CondFormats/HcalObjects/interface/HcalQIEShape.h" 00019 #include "CondFormats/HcalObjects/interface/HcalQIECoder.h" 00020 #include "DataFormats/DetId/interface/DetId.h" 00021 00022 00023 class HcalQIEData: public HcalCondObjectContainer<HcalQIECoder> 00024 { 00025 public: 00026 #ifndef HCAL_COND_SUPPRESS_DEFAULT 00027 HcalQIEData():HcalCondObjectContainer<HcalQIECoder>(0) {setupShape();} 00028 #endif 00029 // constructor, destructor, and all methods stay the same 00030 HcalQIEData(const HcalTopology* topo):HcalCondObjectContainer<HcalQIECoder>(topo) {setupShape();} 00031 00032 void setupShape(); 00034 // const HcalQIEShape& getShape () const {return mShape;} 00035 const HcalQIEShape& getShape (DetId fId) const { return mShape[getCoder(fId)->qieIndex()];} 00036 const HcalQIEShape& getShape (const HcalQIECoder* coder) const { return mShape[coder->qieIndex()];} 00038 const HcalQIECoder* getCoder (DetId fId) const { return getValues(fId); } 00039 // check if data are sorted - remove in the next version 00040 bool sorted () const { return true; } 00041 // fill values [capid][range] 00042 bool addCoder (const HcalQIECoder& fCoder) { return addValues(fCoder); } 00043 // sort values by channelId - remove in the next version 00044 void sort () {} 00045 00046 std::string myname() const {return (std::string)"HcalQIEData";} 00047 00048 //not needed/not used HcalQIEData(const HcalQIEData&); 00049 00050 private: 00051 HcalQIEShape mShape[2]; 00052 00053 }; 00054 00055 #endif