CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/OnlineDB/EcalCondDB/interface/ODCCSCycle.h

Go to the documentation of this file.
00001 #ifndef ODCCSCYCLE_H
00002 #define ODCCSCYCLE_H
00003 
00004 #include <stdexcept>
00005 #include <iostream>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 
00009 
00010 
00011 class ODCCSCycle :  public IODConfig  {
00012  public:
00013   friend class EcalCondDBInterface;
00014   friend class ODEcalCycle;
00015 
00016   ODCCSCycle();
00017   ~ODCCSCycle();
00018 
00019   inline std::string getTable() { return "ECAL_CCS_CYCLE"; }
00020 
00021   inline void setId(int id){m_ID=id;}
00022   inline int getId()const{ return m_ID;} ;
00023 
00024   // Methods for user data
00025   inline void setCCSConfigurationID(int x){m_ccs_config_id=x;}
00026   inline int getCCSConfigurationID() const{return m_ccs_config_id;}
00027 
00028   // Operators
00029   inline bool operator==(const ODCCSCycle &m) const { return ( m_ID   == m.m_ID); }
00030   inline bool operator!=(const ODCCSCycle &m) const { return !(*this == m); }
00031 
00032 
00033 
00034  private:
00035   // User data 
00036   int m_ID;
00037   int  m_ccs_config_id;
00038   void writeDB() throw(std::runtime_error);
00039   void prepareWrite()  throw(std::runtime_error);
00040   void clear();
00041   void fetchData(ODCCSCycle * result)     throw(std::runtime_error);
00042 
00043  void insertConfig() throw(std::runtime_error);
00044 
00045   // Methods from IUniqueDBObject
00046   int fetchID() throw(std::runtime_error);
00047   void setByID(int id) throw(std::runtime_error);
00048 
00049 
00050 };
00051 
00052 #endif