Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:53

0001 #ifndef FECONFIGSLIDING_H
0002 #define FECONFIGSLIDING_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 FEConfigSlidingInfo : public IODConfig {
0012 public:
0013   friend class EcalCondDBInterface;
0014 
0015   FEConfigSlidingInfo();
0016   ~FEConfigSlidingInfo() override;
0017 
0018   // Methods for user data

0019   inline std::string getTable() override { return "FE_CONFIG_SLIDING_INFO"; }
0020 
0021   inline void setIOVId(int iov_id) { m_iov_id = iov_id; }
0022   int getIOVId() const { return m_iov_id; }
0023 
0024   inline void setId(int id) { m_ID = id; }
0025   inline int getId() const { return m_ID; }
0026   // for compatibility

0027   void setID(int id) { setId(id); }
0028   int getID() { return getId(); }
0029   // the tag is already in IODConfig

0030   inline void setVersion(int id) { m_version = id; }
0031   inline int getVersion() const { return m_version; }
0032 
0033   Tm getDBTime() const { return m_db_time; }
0034   void setDBTime(const Tm& x) { m_db_time = x; }
0035 
0036   // Methods from IUniqueDBObject

0037   int fetchID() noexcept(false);
0038   int fetchNextId() noexcept(false);
0039   void setByID(int id) noexcept(false);
0040   void setParameters(const std::map<std::string, std::string>& my_keys_map);
0041 
0042   // operators

0043   inline bool operator==(const FEConfigSlidingInfo& r) const { return (m_ID == r.m_ID); }
0044   inline bool operator!=(const FEConfigSlidingInfo& r) const { return !(*this == r); }
0045 
0046 private:
0047   // User data for this IOV

0048   int m_iov_id;
0049   int m_ID;
0050   Tm m_db_time;
0051   int m_version;
0052 
0053   void prepareWrite() noexcept(false) override;
0054   void writeDB() noexcept(false);
0055   void clear();
0056   void fetchData(FEConfigSlidingInfo* result) noexcept(false);
0057   void fetchLastData(FEConfigSlidingInfo* result) noexcept(false);
0058 };
0059 
0060 #endif