Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-14 02:22:48

0001 #ifndef FECONFIGMAININFO_H
0002 #define FECONFIGMAININFO_H
0003 
0004 #include <stdexcept>
0005 #include <iostream>
0006 
0007 #include <map>
0008 #include <string>
0009 
0010 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0011 #include "OnlineDB/EcalCondDB/interface/Tm.h"
0012 #include "OnlineDB/EcalCondDB/interface/DateHandler.h"
0013 
0014 class FEConfigMainInfo : public IODConfig {
0015 public:
0016   friend class EcalCondDBInterface;
0017 
0018   FEConfigMainInfo();
0019   ~FEConfigMainInfo() override;
0020 
0021   inline std::string getTable() override { return "FE_CONFIG_MAIN"; }
0022 
0023   // Methods for user data

0024   inline void setId(int id) { m_ID = id; }
0025   inline int getId() const { return m_ID; }
0026 
0027   Tm getDBTime() const { return m_db_time; }
0028   void setDBTime(const Tm &x) { m_db_time = x; }
0029 
0030   void setDescription(std::string x) { m_description = x; }
0031   std::string getDescription() const { return m_description; }
0032   //

0033   void setPedId(int x) { m_ped_id = x; }
0034   int getPedId() const { return m_ped_id; }
0035   //

0036   void setLinId(int x) { m_lin_id = x; }
0037   int getLinId() const { return m_lin_id; }
0038   //

0039   void setLUTId(int x) { m_lut_id = x; }
0040   int getLUTId() const { return m_lut_id; }
0041   //

0042   void setFgrId(int x) { m_fgr_id = x; }
0043   int getFgrId() const { return m_fgr_id; }
0044   //

0045   void setSliId(int x) { m_sli_id = x; }
0046   int getSliId() const { return m_sli_id; }
0047   //

0048   void setWeiId(int x) { m_wei_id = x; }
0049   int getWeiId() const { return m_wei_id; }
0050   //

0051   void setSpiId(int x) { m_spi_id = x; }
0052   int getSpiId() const { return m_spi_id; }
0053   //

0054   void setTimId(int x) { m_tim_id = x; }
0055   int getTimId() const { return m_tim_id; }
0056   //

0057   void setBxtId(int x) { m_bxt_id = x; }
0058   int getBxtId() const { return m_bxt_id; }
0059   //

0060   void setBttId(int x) { m_btt_id = x; }
0061   int getBttId() const { return m_btt_id; }
0062   //

0063   void setBstId(int x) { m_bst_id = x; }
0064   int getBstId() const { return m_bst_id; }
0065   //

0066   void setCokeId(int x) { m_coke_id = x; }
0067   int getCokeId() const { return m_coke_id; }
0068   //

0069   void setWeight2Id(int x) { m_wei2_id = x; }
0070   int getWeight2Id() const { return m_wei2_id; }
0071   //

0072   void setWei2Id(int x) { m_wei2_id = x; }
0073   int getWei2Id() const { return m_wei2_id; }
0074   //

0075   void setOddWeiId(int x) { m_wei2_id = x; }
0076   int getOddWeiId() const { return m_wei2_id; }
0077   //

0078   inline void setVersion(int id) { m_version = id; }
0079   inline int getVersion() const { return m_version; }
0080 
0081   // operators

0082   inline bool operator==(const FEConfigMainInfo &r) const { return (m_ID == r.m_ID); }
0083   inline bool operator!=(const FEConfigMainInfo &r) const { return !(*this == r); }
0084 
0085 private:
0086   // User data for this IOV

0087   int m_ID;
0088   int m_ped_id;
0089   int m_lin_id;
0090   int m_lut_id;
0091   int m_sli_id;
0092   int m_fgr_id;
0093   int m_wei_id;
0094   int m_bxt_id;
0095   int m_btt_id;
0096   int m_bst_id;
0097   int m_tim_id;
0098   int m_spi_id;
0099   int m_coke_id;
0100   int m_wei2_id;
0101   int m_version;
0102   Tm m_db_time;
0103   std::string m_description;
0104 
0105   void prepareWrite() noexcept(false) override;
0106   void writeDB() noexcept(false);
0107   void clear();
0108   void fetchData(FEConfigMainInfo *result) noexcept(false);
0109   void insertConfig() noexcept(false);
0110 
0111   // Methods from IUniqueDBObject

0112   int fetchID() noexcept(false);      // fetches

0113   int fetchNextId() noexcept(false);  // fetches

0114   int fetchIDLast() noexcept(false);  // fetches the last one

0115   void setByID(int id) noexcept(false);
0116 };
0117 
0118 #endif