CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/OnlineDB/EcalCondDB/interface/ODScanCycle.h

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