00001 #ifndef MONMEMCHCONSISTENCYDAT_H 00002 #define MONMEMCHCONSISTENCYDAT_H 00003 00004 #include <map> 00005 #include <stdexcept> 00006 00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h" 00008 #include "OnlineDB/EcalCondDB/interface/MonRunTag.h" 00009 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h" 00010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" 00011 00012 class MonMemChConsistencyDat : public IDataItem { 00013 public: 00014 friend class EcalCondDBInterface; 00015 MonMemChConsistencyDat(); 00016 ~MonMemChConsistencyDat(); 00017 00018 // User data methods 00019 inline std::string getTable() { return "MON_MEM_CH_CONSISTENCY_DAT"; } 00020 00021 inline void setProcessedEvents(int proc) { m_processedEvents = proc; } 00022 inline int getProcessedEvents() const { return m_processedEvents; } 00023 00024 inline void setProblematicEvents(int prob) { m_problematicEvents = prob; } 00025 inline int getProblematicEvents() const { return m_problematicEvents; } 00026 00027 inline void setProblemsID(int id) { m_problemsID = id; } 00028 inline int getProblemsID() const { return m_problemsID; } 00029 00030 inline void setProblemsGainZero(int prob) { m_problemsGainZero = prob; } 00031 inline int getProblemsGainZero() const { return m_problemsGainZero; } 00032 00033 inline void setProblemsGainSwitch(int prob) { m_problemsGainSwitch = prob; } 00034 inline int getProblemsGainSwitch() const { return m_problemsGainSwitch; } 00035 00036 inline void setTaskStatus(bool status) { m_taskStatus = status; } 00037 inline bool getTaskStatus() const { return m_taskStatus; } 00038 00039 private: 00040 void prepareWrite() 00041 throw(std::runtime_error); 00042 00043 void writeDB(const EcalLogicID* ecid, const MonMemChConsistencyDat* item, MonRunIOV* iov) 00044 throw(std::runtime_error); 00045 00046 void writeArrayDB(const std::map< EcalLogicID, MonMemChConsistencyDat >* data, MonRunIOV* iov) 00047 throw(std::runtime_error); 00048 00049 00050 void fetchData(std::map< EcalLogicID, MonMemChConsistencyDat >* fillVec, MonRunIOV* iov) 00051 throw(std::runtime_error); 00052 00053 // User data 00054 int m_processedEvents; 00055 int m_problematicEvents; 00056 int m_problemsID; 00057 int m_problemsGainZero; 00058 int m_problemsGainSwitch; 00059 bool m_taskStatus; 00060 00061 }; 00062 00063 #endif