00001 #ifndef MODDCCDETAILSDAT_H 00002 #define MODDCCDETAILSDAT_H 00003 00004 #include <map> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/MODRunIOV.h" 00009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00010 00011 class MODDCCDetailsDat : public IDataItem { 00012 public: 00013 friend class EcalCondDBInterface; 00014 MODDCCDetailsDat(); 00015 ~MODDCCDetailsDat(); 00016 00017 // User data methods 00018 inline std::string getTable() { return "OD_DCC_DETAILS_DAT"; } 00019 00020 inline void setQPLL(int x) { m_qpll = x; } 00021 inline int getQPLL() const { return m_qpll; } 00022 00023 inline void setOpticalLink(int x) { m_opto = x; } 00024 inline int getOpticalLink() const { return m_opto; } 00025 00026 inline void setDataTimeout(int x) { m_tout = x; } 00027 inline int getDataTimeout() const { return m_tout; } 00028 00029 inline void setHeader(int x) { m_head = x; } 00030 inline int getHeader() const { return m_head; } 00031 00032 inline void setEventNumber(int x) { m_evnu = x; } 00033 inline int getEventNumber() const { return m_evnu; } 00034 00035 inline void setBXNumber(int x) { m_bxnu = x; } 00036 inline int getBXNumber() const { return m_bxnu; } 00037 00038 inline void setEvenParity(int x) { m_evpa = x; } 00039 inline int getEvenParity() const { return m_evpa; } 00040 00041 inline void setOddParity(int x) { m_odpa = x; } 00042 inline int getOddParity() const { return m_odpa; } 00043 00044 inline void setBlockSize(int x) { m_blsi = x; } 00045 inline int getBlockSize() const { return m_blsi; } 00046 00047 inline void setAlmostFullFIFO(int x) { m_alff = x; } 00048 inline int getAlmostFullFIFO() const { return m_alff; } 00049 00050 inline void setFullFIFO(int x) { m_fuff = x; } 00051 inline int getFullFIFO() const { return m_fuff; } 00052 00053 inline void setForcedFullSupp(int x) { m_fusu = x; } 00054 inline int getForcedFullSupp() const { return m_fusu; } 00055 00056 private: 00057 void prepareWrite() 00058 throw(std::runtime_error); 00059 00060 void writeDB(const EcalLogicID* ecid, const MODDCCDetailsDat* item, MODRunIOV* iov ) 00061 throw(std::runtime_error); 00062 00063 void writeArrayDB(const std::map< EcalLogicID, MODDCCDetailsDat >* data, MODRunIOV* iov) 00064 throw(std::runtime_error); 00065 00066 00067 00068 void fetchData(std::map< EcalLogicID, MODDCCDetailsDat >* fillMap, MODRunIOV* iov) 00069 throw(std::runtime_error); 00070 00071 // User data 00072 int m_qpll; 00073 int m_opto; 00074 int m_tout; 00075 int m_head; 00076 int m_evnu; 00077 int m_bxnu; 00078 int m_evpa; 00079 int m_odpa; 00080 int m_blsi; 00081 int m_alff; 00082 int m_fuff; 00083 int m_fusu; 00084 00085 }; 00086 00087 #endif