CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/OnlineDB/EcalCondDB/interface/ODScanConfig.h

Go to the documentation of this file.
00001 #ifndef ODSCANCONFIG_H
00002 #define ODSCANCONFIG_H
00003 
00004 #include <map>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 
00009 class ODScanConfig : public IODConfig {
00010  public:
00011   friend class EcalCondDBInterface;
00012   ODScanConfig();
00013   ~ODScanConfig();
00014 
00015   // User data methods
00016   inline std::string getTable() { return "ECAL_Scan_DAT"; }
00017 
00018   inline void setId(int id) { m_ID = id; }
00019   inline int getId() const { return m_ID; }
00020 
00021   inline void setTypeId(int x) { m_type_id = x; }
00022   inline int getTypeId() const { return m_type_id; }
00023 
00024   inline void setScanType(std::string x) { m_type = x; }
00025   inline std::string getScanType() const { return m_type; }
00026 
00027   inline void setFromVal(int x) { m_from_val = x; }
00028   inline int getFromVal() const { return m_from_val; }
00029 
00030   inline void setToVal(int x) { m_to_val = x; }
00031   inline int getToVal() const { return m_to_val; }
00032 
00033   inline void setStep(int x) { m_step = x; }
00034   inline int getStep() const { return m_step ; }
00035   void setParameters(std::map<std::string,std::string> my_keys_map);
00036 
00037  private:
00038   void prepareWrite()  throw(std::runtime_error);
00039   void writeDB()       throw(std::runtime_error);
00040   void clear();
00041   void fetchData(ODScanConfig * result)     throw(std::runtime_error);
00042   int fetchID()  throw(std::runtime_error);
00043   int fetchNextId() throw(std::runtime_error);
00044 
00045 
00046   // User data
00047   int m_ID;
00048 
00049   int  m_type_id;
00050   std::string m_type;
00051   int m_from_val;
00052   int m_to_val;
00053   int m_step;
00054 
00055 };
00056 
00057 #endif