CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/OnlineDB/EcalCondDB/interface/ODTCCEECycle.h

Go to the documentation of this file.
00001 #ifndef ODTCCEECYCLE_H
00002 #define ODTCCEECYCLE_H
00003 
00004 #include <stdexcept>
00005 #include <iostream>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 
00009 
00010 
00011 class ODTCCEECycle :  public IODConfig  {
00012  public:
00013   friend class EcalCondDBInterface;
00014   friend class ODEcalCycle;
00015 
00016   ODTCCEECycle();
00017   ~ODTCCEECycle();
00018 
00019   inline std::string getTable() { return "ECAL_TCC_EE_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 setTCCConfigurationID(int x){m_tcc_ee_config_id=x;}
00026   inline int getTCCConfigurationID() const{return m_tcc_ee_config_id;}
00027 
00028   // Operators
00029   inline bool operator==(const ODTCCEECycle &m) const { return ( m_ID   == m.m_ID); }
00030   inline bool operator!=(const ODTCCEECycle &m) const { return !(*this == m); }
00031 
00032  private:
00033   // User data 
00034   int m_ID;
00035   int  m_tcc_ee_config_id;
00036   void writeDB() throw(std::runtime_error);
00037   void prepareWrite()  throw(std::runtime_error);
00038   void clear();
00039   void fetchData(ODTCCEECycle * result)     throw(std::runtime_error);
00040    void insertConfig() throw(std::runtime_error);
00041 
00042 
00043   // Methods from IUniqueDBObject
00044   int fetchID() throw(std::runtime_error);
00045   void setByID(int id) throw(std::runtime_error);
00046 
00047 
00048 };
00049 
00050 #endif