00001 #ifndef FECONFLUTGROUPDAT_H 00002 #define FECONFLUTGROUPDAT_H 00003 00004 #include <vector> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h" 00009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00010 00011 class FEConfigLUTGroupDat : public IDataItem { 00012 public: 00013 friend class EcalCondDBInterface; // XXX temp should not need 00014 FEConfigLUTGroupDat(); 00015 ~FEConfigLUTGroupDat(); 00016 00017 // User data methods 00018 inline std::string getTable() { return "FE_CONFIG_LUT_PER_GROUP_DAT"; } 00019 00020 inline void setLUTGroupId(int x) { m_group_id = x; } 00021 inline int getLUTGroupId() const { return m_group_id; } 00022 00023 inline void setLUTValue(int i, int x) { m_lut[i] = x; } 00024 inline int getLUTValue(int i) const { return m_lut[i]; } 00025 00026 00027 00028 private: 00029 void prepareWrite() 00030 throw(std::runtime_error); 00031 00032 void writeDB(const EcalLogicID* ecid, const FEConfigLUTGroupDat* item, FEConfigLUTInfo* iconf) 00033 throw(std::runtime_error); 00034 00035 00036 void writeArrayDB(const std::map< EcalLogicID, FEConfigLUTGroupDat>* data, FEConfigLUTInfo* iconf) 00037 throw(std::runtime_error); 00038 00039 00040 void fetchData(std::map< EcalLogicID, FEConfigLUTGroupDat >* fillMap, FEConfigLUTInfo* iconf) 00041 throw(std::runtime_error); 00042 00043 // User data 00044 int m_group_id; 00045 int m_lut[1024]; 00046 00047 }; 00048 00049 #endif