00001 #ifndef CALICRYSTALINTERCALDAT_H 00002 #define CALICRYSTALINTERCALDAT_H 00003 00004 #include <map> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/CaliTag.h" 00009 #include "OnlineDB/EcalCondDB/interface/CaliIOV.h" 00010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00011 00012 class CaliCrystalIntercalDat : public IDataItem { 00013 public: 00014 friend class EcalCondDBInterface; 00015 CaliCrystalIntercalDat(); 00016 ~CaliCrystalIntercalDat(); 00017 00018 // User data methods 00019 inline std::string getTable() { return "CALI_CRYSTAL_INTERCAL_DAT"; } 00020 00021 inline void setCali(float c) { m_cali = c; } 00022 inline float getCali() const { return m_cali; } 00023 00024 inline void setCaliRMS(float c) { m_caliRMS = c; } 00025 inline float getCaliRMS() const { return m_caliRMS; } 00026 00027 inline void setNumEvents(int n) { m_numEvents = n; } 00028 inline int getNumEvents() const { return m_numEvents; } 00029 00030 inline void setTaskStatus(bool s) { m_taskStatus = s; } 00031 inline bool getTaskStatus() const { return m_taskStatus; } 00032 00033 private: 00034 void prepareWrite() 00035 throw(std::runtime_error); 00036 00037 void writeDB(const EcalLogicID* ecid, const CaliCrystalIntercalDat* item, CaliIOV* iov) 00038 throw(std::runtime_error); 00039 00040 void fetchData(std::map< EcalLogicID, CaliCrystalIntercalDat >* fillVec, CaliIOV* iov) 00041 throw(std::runtime_error); 00042 00043 void writeArrayDB(const std::map< EcalLogicID, CaliCrystalIntercalDat >* data, CaliIOV* iov) 00044 throw(std::runtime_error); 00045 00046 00047 00048 // User data 00049 float m_cali; 00050 float m_caliRMS; 00051 int m_numEvents; 00052 bool m_taskStatus; 00053 00054 00055 }; 00056 00057 #endif