Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ODDELAYSDAT_H
0002 #define ODDELAYSDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008 #include "OnlineDB/EcalCondDB/interface/ODFEDelaysInfo.h"
0009 
0010 class ODDelaysDat : public IODConfig {
0011 public:
0012   friend class EcalCondDBInterface;
0013   ODDelaysDat();
0014   ~ODDelaysDat() override;
0015 
0016   // User data methods
0017   inline std::string getTable() override { return "DELAYS_DAT"; }
0018 
0019   inline void setId(int dac) { m_ID = dac; }
0020   inline int getId() const { return m_ID; }
0021 
0022   inline void setSMId(int dac) { m_sm = dac; }
0023   inline int getSMId() const { return m_sm; }
0024 
0025   inline void setFedId(int dac) { m_fed = dac; }
0026   inline int getFedId() const { return m_fed; }
0027 
0028   inline void setTTId(int dac) { m_tt = dac; }
0029   inline int getTTId() const { return m_tt; }
0030 
0031   inline void setTimeOffset(int dac) { m_t1 = dac; }
0032   inline int getTimeOffset() const { return m_t1; }
0033 
0034 private:
0035   void prepareWrite() noexcept(false) override;
0036 
0037   void writeDB(const ODDelaysDat* item, ODFEDelaysInfo* iov) noexcept(false);
0038 
0039   void writeArrayDB(const std::vector<ODDelaysDat>& data, ODFEDelaysInfo* iov) noexcept(false);
0040 
0041   void fetchData(std::vector<ODDelaysDat>* fillMap, int id) noexcept(false);
0042   void fetchData(std::vector<ODDelaysDat>* fillMap, ODFEDelaysInfo* iov) noexcept(false);
0043 
0044   // User data
0045   int m_sm;
0046   int m_fed;
0047   int m_tt;
0048   int m_t1;
0049   int m_ID;
0050 };
0051 
0052 #endif