CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/OnlineDB/EcalCondDB/interface/FEConfigTimingInfo.h

Go to the documentation of this file.
00001 #ifndef FECONFIGTIMING_H
00002 #define FECONFIGTIMING_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 FEConfigTimingInfo : public  IODConfig {
00012  public:
00013   friend class EcalCondDBInterface;
00014 
00015   FEConfigTimingInfo();
00016   ~FEConfigTimingInfo();
00017 
00018   // Methods for user data
00019   inline std::string getTable() { return "FE_CONFIG_TIME_INFO"; }
00020 
00021 
00022   inline void setId(int id) { m_ID = id; }
00023   inline int getId() const { return m_ID; }
00024   // for compatibility
00025   void setID(int id) {setId(id);} 
00026   int getID() { return getId() ;}
00027   // the tag is already in IODConfig 
00028   inline void setVersion(int id) { m_version = id; }
00029   inline int getVersion() const { return m_version; }
00030 
00031 
00032   Tm getDBTime() const{  return m_db_time;}
00033   void setDBTime(Tm x) { m_db_time=x; } 
00034 
00035 
00036   // Methods from IUniqueDBObject
00037   int fetchID() throw(std::runtime_error);
00038   int fetchNextId() throw(std::runtime_error);
00039   void setByID(int id) throw(std::runtime_error);
00040   void setParameters(std::map<std::string,std::string> my_keys_map);
00041 
00042   // operators
00043   inline bool operator==(const FEConfigTimingInfo &r) const {  return (m_ID   == r.m_ID ); }
00044   inline bool operator!=(const FEConfigTimingInfo &r) const { return !(*this == r); }
00045 
00046  private:
00047   // User data for this IOV
00048   int m_ID;
00049   Tm m_db_time;
00050   int m_version;
00051 
00052   void prepareWrite()  throw(std::runtime_error);
00053   void writeDB() throw(std::runtime_error);
00054   void clear();
00055   void fetchData(FEConfigTimingInfo * result)     throw(std::runtime_error);
00056   void fetchLastData(FEConfigTimingInfo * result)     throw(std::runtime_error);
00057 
00058 
00059 };
00060 
00061 
00062 #endif