CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/OnlineDB/EcalCondDB/interface/ODJBH4Config.h

Go to the documentation of this file.
00001 #ifndef ODJBH4CONFIG_H
00002 #define ODJBH4CONFIG_H
00003 
00004 #include <map>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 
00009 class ODJBH4Config : public IODConfig {
00010  public:
00011   friend class EcalCondDBInterface;
00012   ODJBH4Config();
00013   ~ODJBH4Config();
00014 
00015   // User data methods
00016   inline std::string getTable() { return "ECAL_JBH4_CONFIGURATION"; }
00017 
00018   inline void setId(int id) { m_ID = id; }
00019   inline int getId() const { return m_ID; }
00020 
00021 
00022   inline void setUseBuffer(int x) { m_use_buffer = x; }
00023   inline int getUseBuffer() const { return m_use_buffer; }
00024 
00025   inline void setHalModuleFile(std::string x) { m_hal_mod_file = x; }
00026   inline std::string getHalModuleFile() const { return m_hal_mod_file; }
00027 
00028   inline void setHalAddressTableFile(std::string x) { m_hal_add_file = x; }
00029   inline std::string getHalAddressTableFile() const { return m_hal_add_file; }
00030 
00031   inline void setHalStaticTableFile(std::string x) { m_hal_tab_file = x; }
00032   inline std::string getHalStaticTableFile() const { return m_hal_tab_file; }
00033 
00034 
00035   inline void setCbd8210SerialNumber(std::string x) { m_serial = x; }
00036   inline std::string getCbd8210SerialNumber() const { return m_serial; }
00037 
00038   inline void setCaenBridgeType(std::string x) { m_caen1 = x; }
00039   inline std::string getCaenBridgeType() const { return m_caen1; }
00040 
00041   inline void setCaenLinkNumber(int x) { m_caen2 = x; }
00042   inline int getCaenLinkNumber() const { return m_caen2; }
00043 
00044   inline void setCaenBoardNumber(int x) { m_caen3 = x ; }
00045   inline int getCaenBoardNumber() const { return m_caen3 ; }
00046 
00047 
00048  private:
00049   void prepareWrite()  throw(std::runtime_error);
00050   void writeDB()       throw(std::runtime_error);
00051   void clear();
00052   void fetchData(ODJBH4Config * result)     throw(std::runtime_error);
00053   int fetchID()  throw(std::runtime_error);
00054   int fetchNextId() throw(std::runtime_error);
00055 
00056 
00057   // User data
00058   int m_ID;
00059 
00060   int  m_use_buffer;
00061   std::string m_hal_mod_file;
00062   std::string m_hal_add_file;
00063   std::string m_hal_tab_file;
00064   std::string m_serial;
00065   std::string m_caen1;
00066   int m_caen2;
00067   int m_caen3;
00068 
00069 };
00070 
00071 #endif