CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/OnlineDB/EcalCondDB/interface/ODCCSConfig.h

Go to the documentation of this file.
00001 #ifndef ODCCSCONFIG_H
00002 #define ODCCSCONFIG_H
00003 
00004 #include <map>
00005 #include <string>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 
00009 class ODCCSConfig : public IODConfig {
00010  public:
00011   friend class EcalCondDBInterface;
00012   ODCCSConfig();
00013   ~ODCCSConfig();
00014 
00015   // User data methods
00016   inline std::string getTable() { return "ECAL_CCS_CONFIGURATION"; }
00017 
00018   inline void setId(int id) { m_ID = id; }
00019   inline int getId() const { return m_ID; }
00020 
00021   inline void setDaccal(int x) { m_daccal = x; }
00022   inline int getDaccal() const { return m_daccal; }
00023 
00024   inline void setDelay(int x) { m_delay = x; }
00025   inline int getDelay() const { return m_delay; }
00026 
00027   inline void setGain(std::string x) { m_gain = x; }
00028   inline std::string getGain() const { return m_gain; }
00029 
00030   inline void setMemGain(std::string x) { m_memgain = x; }
00031   inline std::string getMemGain() const { return m_memgain; }
00032 
00033   inline void setOffsetHigh(int x) { m_offset_high = x; }
00034   inline int getOffsetHigh() const { return m_offset_high; }
00035 
00036   inline void setOffsetLow(int x) { m_offset_low = x; }
00037   inline int getOffsetLow() const { return m_offset_low; }
00038 
00039   inline void setOffsetMid(int x) { m_offset_mid = x; }
00040   inline int getOffsetMid() const { return m_offset_mid; }
00041 
00042   inline void setTrgMode(std::string x) { m_trg_mode = x; }
00043   inline std::string getTrgMode() const { return m_trg_mode; }
00044 
00045   inline void setTrgFilter(std::string x) { m_trg_filter = x; }
00046   inline std::string getTrgFilter() const { return m_trg_filter; }
00047 
00048   inline void setClock(int x) { m_clock = x; }
00049   inline int getClock() const { return m_clock; }
00050   inline void setBGOSource(std::string x) { m_bgo = x; }
00051   inline std::string getBGOSource() const { return m_bgo; }
00052   inline void setTTSMask(int x) { m_tts_mask = x; }
00053   inline int getTTSMask() const { return m_tts_mask; }
00054   inline void setDAQBCIDPreset(int x) { m_daq = x; }
00055   inline int getDAQBCIDPreset() const { return m_daq; }
00056   inline void setTrgBCIDPreset(int x) { m_trg = x; }
00057   inline int getTrgBCIDPreset() const { return m_trg; }
00058   inline void setBC0Counter(int x) { m_bc0 = x; }
00059   inline int getBC0Counter() const { return m_bc0; }
00060   inline int getBC0Delay() const { return m_bc0_delay; }
00061   inline void setBC0Delay(int x) { m_bc0_delay = x; }
00062   inline int getTEDelay() const { return m_te_delay; }
00063   inline void setTEDelay(int x) { m_te_delay = x; }
00064 
00065 
00066   int fetchNextId() throw(std::runtime_error);
00067   void setParameters(std::map<std::string,std::string> my_keys_map);
00068   
00069  private:
00070   void prepareWrite()  throw(std::runtime_error);
00071 
00072   void writeDB()       throw(std::runtime_error);
00073 
00074   void clear();
00075 
00076   void fetchData(ODCCSConfig * result)     throw(std::runtime_error);
00077 
00078   int fetchID()  throw(std::runtime_error);
00079 
00080 
00081   // User data
00082   int m_ID;
00083   int m_daccal;
00084   int m_delay;
00085   std::string m_gain;
00086   std::string m_memgain;
00087   int m_offset_high;
00088   int m_offset_low;
00089   int m_offset_mid;
00090   std::string m_pedestal_offset_release;
00091   std::string m_system;
00092   std::string m_trg_mode;
00093   std::string m_trg_filter;
00094   int m_clock;
00095   std::string m_bgo;
00096   int m_tts_mask;
00097   int m_daq;
00098   int m_trg;
00099   int m_bc0;
00100   int m_bc0_delay;
00101   int m_te_delay;
00102   
00103 };
00104 
00105 #endif