Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ODSRPCYCLE_H
0002 #define ODSRPCYCLE_H
0003 
0004 #include <stdexcept>
0005 #include <iostream>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
0008 
0009 class ODSRPCycle : public IODConfig {
0010 public:
0011   friend class EcalCondDBInterface;
0012   friend class ODEcalCycle;
0013 
0014   ODSRPCycle();
0015   ~ODSRPCycle() override;
0016 
0017   inline std::string getTable() override { return "ECAL_SRP_CYCLE"; }
0018 
0019   inline void setId(int id) { m_ID = id; }
0020   inline int getId() const { return m_ID; };
0021 
0022   // Methods for user data
0023   inline void setSRPConfigurationID(int x) { m_srp_config_id = x; }
0024   inline int getSRPConfigurationID() const { return m_srp_config_id; }
0025 
0026   // Operators
0027   inline bool operator==(const ODSRPCycle &m) const { return (m_ID == m.m_ID); }
0028   inline bool operator!=(const ODSRPCycle &m) const { return !(*this == m); }
0029 
0030 private:
0031   // User data
0032   int m_ID;
0033   int m_srp_config_id;
0034   void writeDB() noexcept(false);
0035   void prepareWrite() noexcept(false) override;
0036   void clear();
0037   void fetchData(ODSRPCycle *result) noexcept(false);
0038   void insertConfig() noexcept(false);
0039 
0040   // Methods from IUniqueDBObject
0041   int fetchID() noexcept(false);
0042   void setByID(int id) noexcept(false);
0043 };
0044 
0045 #endif