Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MODDCCDETAILSDAT_H
0002 #define MODDCCDETAILSDAT_H
0003 
0004 #include <map>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/MODRunIOV.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class MODDCCDetailsDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;
0014   MODDCCDetailsDat();
0015   ~MODDCCDetailsDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "OD_DCC_DETAILS_DAT"; }
0019 
0020   inline void setQPLL(int x) { m_qpll = x; }
0021   inline int getQPLL() const { return m_qpll; }
0022 
0023   inline void setOpticalLink(int x) { m_opto = x; }
0024   inline int getOpticalLink() const { return m_opto; }
0025 
0026   inline void setDataTimeout(int x) { m_tout = x; }
0027   inline int getDataTimeout() const { return m_tout; }
0028 
0029   inline void setHeader(int x) { m_head = x; }
0030   inline int getHeader() const { return m_head; }
0031 
0032   inline void setEventNumber(int x) { m_evnu = x; }
0033   inline int getEventNumber() const { return m_evnu; }
0034 
0035   inline void setBXNumber(int x) { m_bxnu = x; }
0036   inline int getBXNumber() const { return m_bxnu; }
0037 
0038   inline void setEvenParity(int x) { m_evpa = x; }
0039   inline int getEvenParity() const { return m_evpa; }
0040 
0041   inline void setOddParity(int x) { m_odpa = x; }
0042   inline int getOddParity() const { return m_odpa; }
0043 
0044   inline void setBlockSize(int x) { m_blsi = x; }
0045   inline int getBlockSize() const { return m_blsi; }
0046 
0047   inline void setAlmostFullFIFO(int x) { m_alff = x; }
0048   inline int getAlmostFullFIFO() const { return m_alff; }
0049 
0050   inline void setFullFIFO(int x) { m_fuff = x; }
0051   inline int getFullFIFO() const { return m_fuff; }
0052 
0053   inline void setForcedFullSupp(int x) { m_fusu = x; }
0054   inline int getForcedFullSupp() const { return m_fusu; }
0055 
0056 private:
0057   void prepareWrite() noexcept(false) override;
0058 
0059   void writeDB(const EcalLogicID* ecid, const MODDCCDetailsDat* item, MODRunIOV* iov) noexcept(false);
0060 
0061   void writeArrayDB(const std::map<EcalLogicID, MODDCCDetailsDat>* data, MODRunIOV* iov) noexcept(false);
0062 
0063   void fetchData(std::map<EcalLogicID, MODDCCDetailsDat>* fillMap, MODRunIOV* iov) noexcept(false);
0064 
0065   // User data
0066   int m_qpll;
0067   int m_opto;
0068   int m_tout;
0069   int m_head;
0070   int m_evnu;
0071   int m_bxnu;
0072   int m_evpa;
0073   int m_odpa;
0074   int m_blsi;
0075   int m_alff;
0076   int m_fuff;
0077   int m_fusu;
0078 };
0079 
0080 #endif