File indexing completed on 2024-04-06 12:22:55
0001 #ifndef MONCRYSTALCONSISTENCYDAT_H
0002 #define MONCRYSTALCONSISTENCYDAT_H
0003
0004 #include <map>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/MonRunTag.h"
0009 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
0010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0011
0012 class MonCrystalConsistencyDat : public IDataItem {
0013 public:
0014 friend class EcalCondDBInterface;
0015 MonCrystalConsistencyDat();
0016 ~MonCrystalConsistencyDat() override;
0017
0018
0019 inline std::string getTable() override { return "MON_CRYSTAL_CONSISTENCY_DAT"; }
0020
0021 inline void setProcessedEvents(int proc) { m_processedEvents = proc; }
0022 inline int getProcessedEvents() const { return m_processedEvents; }
0023
0024 inline void setProblematicEvents(int prob) { m_problematicEvents = prob; }
0025 inline int getProblematicEvents() const { return m_problematicEvents; }
0026
0027 inline void setProblemsID(int id) { m_problemsID = id; }
0028 inline int getProblemsID() const { return m_problemsID; }
0029
0030 inline void setProblemsGainZero(int prob) { m_problemsGainZero = prob; }
0031 inline int getProblemsGainZero() const { return m_problemsGainZero; }
0032
0033 inline void setProblemsGainSwitch(int prob) { m_problemsGainSwitch = prob; }
0034 inline int getProblemsGainSwitch() const { return m_problemsGainSwitch; }
0035
0036 inline void setTaskStatus(bool status) { m_taskStatus = status; }
0037 inline bool getTaskStatus() const { return m_taskStatus; }
0038
0039 private:
0040 void prepareWrite() noexcept(false) override;
0041
0042 void writeDB(const EcalLogicID* ecid, const MonCrystalConsistencyDat* item, MonRunIOV* iov) noexcept(false);
0043
0044 void fetchData(std::map<EcalLogicID, MonCrystalConsistencyDat>* fillVec, MonRunIOV* iov) noexcept(false);
0045
0046 void writeArrayDB(const std::map<EcalLogicID, MonCrystalConsistencyDat>* data, MonRunIOV* iov) noexcept(false);
0047
0048
0049 int m_processedEvents;
0050 int m_problematicEvents;
0051 int m_problemsID;
0052 int m_problemsGainZero;
0053 int m_problemsGainSwitch;
0054 bool m_taskStatus;
0055 };
0056
0057 #endif