CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/OnlineDB/EcalCondDB/interface/FEConfigMainInfo.h

Go to the documentation of this file.
00001 #ifndef FECONFIGMAININFO_H
00002 #define FECONFIGMAININFO_H
00003 
00004 #include <stdexcept>
00005 #include <iostream>
00006 
00007 
00008 #include <map>
00009 #include <string>
00010 
00011 
00012 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00013 #include "OnlineDB/EcalCondDB/interface/Tm.h"
00014 #include "OnlineDB/EcalCondDB/interface/DateHandler.h"
00015 
00016 
00017 
00018 
00019 class FEConfigMainInfo : public IODConfig {
00020  public:
00021   friend class EcalCondDBInterface;
00022 
00023   FEConfigMainInfo();
00024   ~FEConfigMainInfo();
00025 
00026   inline std::string getTable() { return "FE_CONFIG_MAIN"; }
00027 
00028   // Methods for user data
00029   inline void setId(int id) { m_ID = id; }
00030   inline int getId() const { return m_ID; }
00031 
00032   Tm getDBTime() const{  return m_db_time;}
00033   void setDBTime(Tm x) { m_db_time=x; } 
00034 
00035 
00036 void setDescription(std::string x) { m_description = x;}
00037 std::string getDescription() const{  return m_description;}
00038 //
00039 void setPedId(int x) { m_ped_id = x;}
00040 int getPedId() const{  return m_ped_id;}
00041 //
00042 void setLinId(int x){ m_lin_id = x;  }
00043 int getLinId()const {return m_lin_id;  }
00044 //
00045 void setLUTId(int x){ m_lut_id = x;  }
00046 int getLUTId()const {return m_lut_id;  }
00047 //
00048 void setFgrId(int x) { m_fgr_id = x;}
00049 int getFgrId() const{  return m_fgr_id;}
00050 //
00051 void setSliId(int x){ m_sli_id = x;  }
00052 int getSliId()const {return m_sli_id;  }
00053 //
00054 void setWeiId(int x) { m_wei_id = x;}
00055 int getWeiId() const{  return m_wei_id;}
00056 //
00057 void setSpiId(int x) { m_spi_id = x;}
00058 int getSpiId() const{  return m_spi_id;}
00059 //
00060 void setTimId(int x) { m_tim_id = x;}
00061 int getTimId() const{  return m_tim_id;}
00062 //
00063 void setBxtId(int x){ m_bxt_id = x;  }
00064 int getBxtId()const {return m_bxt_id;  }
00065 //
00066 void setBttId(int x){ m_btt_id = x;  }
00067 int getBttId()const {return m_btt_id;  }
00068 //
00069 void setBstId(int x){ m_bst_id = x;  }
00070 int getBstId()const {return m_bst_id;  }
00071 //
00072  inline void setVersion(int id) { m_version = id; }
00073  inline int getVersion() const { return m_version; }
00074 
00075 
00076 
00077   // operators
00078   inline bool operator==(const FEConfigMainInfo &r) const {  return (m_ID   == r.m_ID ); }
00079   inline bool operator!=(const FEConfigMainInfo &r) const { return !(*this == r); }
00080 
00081  private:
00082   // User data for this IOV
00083   int m_ID;
00084   int m_ped_id;
00085   int m_lin_id;
00086   int m_lut_id;
00087   int m_sli_id;
00088   int m_fgr_id;
00089   int m_wei_id;
00090   int m_bxt_id;
00091   int m_btt_id;
00092   int m_bst_id;
00093   int m_tim_id;
00094   int m_spi_id;
00095   int m_version;
00096   Tm m_db_time;
00097   std::string m_description;
00098 
00099   void prepareWrite()  throw(std::runtime_error);
00100   void writeDB()       throw(std::runtime_error);
00101   void clear();
00102   void fetchData(FEConfigMainInfo * result)     throw(std::runtime_error);
00103   void insertConfig() throw(std::runtime_error);
00104 
00105 
00106   // Methods from IUniqueDBObject
00107   int fetchID() throw(std::runtime_error); // fetches 
00108   int fetchNextId() throw(std::runtime_error); // fetches 
00109   int fetchIDLast() throw(std::runtime_error); // fetches the last one
00110   void setByID(int id) throw(std::runtime_error);
00111 
00112 };
00113 
00114 
00115 
00116 #endif