CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h

Go to the documentation of this file.
00001 #ifndef FECONFIGLUT_H
00002 #define FECONFIGLUT_H
00003 
00004 #include <map>
00005 #include <string>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 #include "OnlineDB/EcalCondDB/interface/Tm.h"
00009 #include "OnlineDB/EcalCondDB/interface/DateHandler.h"
00010 
00011 class FEConfigLUTInfo : public  IODConfig {
00012  public:
00013   friend class EcalCondDBInterface;
00014 
00015   FEConfigLUTInfo();
00016   ~FEConfigLUTInfo();
00017 
00018   // Methods for user data
00019   inline std::string getTable() { return "FE_CONFIG_LUT_INFO"; }
00020 
00021 
00022   inline void setNumberOfGroups(int iov_id){ m_iov_id = iov_id;  }
00023   int getNumberOfGroups() const{return m_iov_id;  }
00024 
00025   inline void setId(int id) { m_ID = id; }
00026   inline int getId() const { return m_ID; }
00027   // for compatibility
00028   void setID(int id) {setId(id);} 
00029   int getID() { return getId() ;}
00030   // the tag is already in IODConfig 
00031   inline void setVersion(int id) { m_version = id; }
00032   inline int getVersion() const { return m_version; }
00033 
00034 
00035   Tm getDBTime() const{  return m_db_time;}
00036   void setDBTime(Tm x) { m_db_time=x; } 
00037 
00038 
00039   // Methods from IUniqueDBObject
00040   int fetchID() throw(std::runtime_error);
00041   int fetchNextId() throw(std::runtime_error);
00042   void setByID(int id) throw(std::runtime_error);
00043   void setParameters(std::map<std::string,std::string> my_keys_map);
00044 
00045   // operators
00046   inline bool operator==(const FEConfigLUTInfo &r) const {  return (m_ID   == r.m_ID ); }
00047   inline bool operator!=(const FEConfigLUTInfo &r) const { return !(*this == r); }
00048 
00049  private:
00050   // User data for this IOV
00051   int m_iov_id ;
00052   int m_ID;
00053   Tm m_db_time;
00054   int m_version;
00055 
00056   void prepareWrite()  throw(std::runtime_error);
00057   void writeDB() throw(std::runtime_error);
00058   void clear();
00059   void fetchData(FEConfigLUTInfo * result)     throw(std::runtime_error);
00060   void fetchLastData(FEConfigLUTInfo * result)     throw(std::runtime_error);
00061 
00062 
00063 };
00064 
00065 
00066 #endif