File indexing completed on 2024-04-06 12:22:52
0001 #ifndef CALITEMPDAT_H
0002 #define CALITEMPDAT_H
0003
0004 #include <map>
0005 #include <stdexcept>
0006
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/CaliTag.h"
0009 #include "OnlineDB/EcalCondDB/interface/CaliIOV.h"
0010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0011
0012 class CaliTempDat : public IDataItem {
0013 public:
0014 friend class EcalCondDBInterface;
0015 CaliTempDat();
0016 ~CaliTempDat() override;
0017
0018
0019 inline std::string getTable() override { return "CALI_TEMP_DAT"; }
0020
0021 inline void setBeta(float c) { m_beta = c; }
0022 inline float getBeta() const { return m_beta; }
0023
0024 inline void setR25(float c) { m_r25 = c; }
0025 inline float getR25() const { return m_r25; }
0026
0027 inline void setOffset(float c) { m_offset = c; }
0028 inline float getOffset() const { return m_offset; }
0029
0030 inline void setTaskStatus(bool s) { m_taskStatus = s; }
0031 inline bool getTaskStatus() const { return m_taskStatus; }
0032
0033 private:
0034 void prepareWrite() noexcept(false) override;
0035
0036 void writeDB(const EcalLogicID* ecid, const CaliTempDat* item, CaliIOV* iov) noexcept(false);
0037
0038 void fetchData(std::map<EcalLogicID, CaliTempDat>* fillVec, CaliIOV* iov) noexcept(false);
0039
0040 void writeArrayDB(const std::map<EcalLogicID, CaliTempDat>* data, CaliIOV* iov) noexcept(false);
0041
0042
0043 float m_beta;
0044 float m_r25;
0045 float m_offset;
0046 bool m_taskStatus;
0047 };
0048
0049 #endif