Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ONLINEDB_ECALCONDDB_FECONFIGCOKEINFO_H
0002 #define ONLINEDB_ECALCONDDB_FECONFIGCOKEINFO_H
0003 
0004 #include <map>
0005 #include <string>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008 #include "OnlineDB/EcalCondDB/interface/Tm.h"
0009 #include "OnlineDB/EcalCondDB/interface/DateHandler.h"
0010 
0011 class FEConfigCokeInfo : public IODConfig {
0012 public:
0013   friend class EcalCondDBInterface;
0014 
0015   FEConfigCokeInfo();
0016   ~FEConfigCokeInfo() override;
0017 
0018   // Methods for user data
0019   inline std::string getTable() override { return "FE_CONFIG_COKE_INFO"; }
0020 
0021   inline void setId(int id) { m_ID = id; }
0022   inline int getId() const { return m_ID; }
0023   // for compatibility
0024   void setID(int id) { setId(id); }
0025   int getID() { return getId(); }
0026   // the tag is already in IODConfig
0027   inline void setVersion(int id) { m_version = id; }
0028   inline int getVersion() const { return m_version; }
0029 
0030   Tm getDBTime() const { return m_db_time; }
0031   void setDBTime(const Tm& x) { m_db_time = x; }
0032 
0033   // Methods from IUniqueDBObject
0034   int fetchID() noexcept(false);
0035   int fetchNextId() noexcept(false);
0036   void setByID(int id) noexcept(false);
0037   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0038 
0039   // operators
0040   inline bool operator==(const FEConfigCokeInfo& r) const { return (m_ID == r.m_ID); }
0041   inline bool operator!=(const FEConfigCokeInfo& r) const { return !(*this == r); }
0042 
0043 private:
0044   // User data for this IOV
0045   int m_ID;
0046   Tm m_db_time;
0047   int m_version;
0048 
0049   void prepareWrite() noexcept(false) override;
0050   void writeDB() noexcept(false);
0051   void clear();
0052   void fetchData(FEConfigCokeInfo* result) noexcept(false);
0053   void fetchLastData(FEConfigCokeInfo* result) noexcept(false);
0054 };
0055 
0056 #endif