Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:52

0001 #ifndef ODGOLBIASCURRENTDAT_H
0002 #define ODGOLBIASCURRENTDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0009 #include "OnlineDB/EcalCondDB/interface/ODGolBiasCurrentInfo.h"
0010 
0011 class ODGolBiasCurrentDat : public IODConfig {
0012 public:
0013   friend class EcalCondDBInterface;
0014   ODGolBiasCurrentDat();
0015   ~ODGolBiasCurrentDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "GOL_BIAS_CURRENT_DAT"; }
0019 
0020   inline void setId(int dac) { m_ID = dac; }
0021   inline int getId() const { return m_ID; }
0022 
0023   inline void setGolId(int dac) { m_gol = dac; }
0024   inline int getGolId() const { return m_gol; }
0025 
0026   inline void setFedId(int dac) { m_fed = dac; }
0027   inline int getFedId() const { return m_fed; }
0028 
0029   inline void setTTId(int dac) { m_tt = dac; }
0030   inline int getTTId() const { return m_tt; }
0031 
0032   inline void setCurrent(int dac) { m_cur = dac; }
0033   inline int getCurrent() const { return m_cur; }
0034 
0035   inline void setPLLCurrent(int x) { m_pll_cur = x; }
0036   inline int getPLLCurrent() const { return m_pll_cur; }
0037 
0038   inline void setStatus(int dac) { m_sta = dac; }
0039   inline int getStatus() const { return m_sta; }
0040 
0041 private:
0042   void prepareWrite() noexcept(false) override;
0043 
0044   void writeDB(const ODGolBiasCurrentDat* item, ODGolBiasCurrentInfo* iov) noexcept(false);
0045 
0046   void writeArrayDB(const std::vector<ODGolBiasCurrentDat>& data, ODGolBiasCurrentInfo* iov) noexcept(false);
0047 
0048   void fetchData(std::vector<ODGolBiasCurrentDat>* fillMap, ODGolBiasCurrentInfo* iov) noexcept(false);
0049 
0050   // User data
0051   int m_gol;
0052   int m_fed;
0053   int m_tt;
0054   int m_cur;
0055   int m_pll_cur;
0056   int m_sta;
0057   int m_ID;
0058 };
0059 
0060 #endif