00001 #ifndef LMFLASERCONFIGDAT_H
00002 #define LMFLASERCONFIGDAT_H
00003
00004
00005
00006
00007
00008 #include "OnlineDB/EcalCondDB/interface/LMFDat.h"
00009
00013 class LMFLaserConfigDat : public LMFDat {
00014 public:
00015 LMFLaserConfigDat() : LMFDat() {
00016 m_tableName = "LMF_LASER_CONFIG_DAT";
00017 m_className = "LMFLaserConfigDat";
00018 m_keys["WAVELENGTH"] = 0;
00019 m_keys["VFE_GAIN"] = 1;
00020 m_keys["PN_GAIN"] = 2;
00021 m_keys["LSR_POWER"] = 3;
00022 m_keys["LSR_ATTENUATOR"] = 4;
00023 m_keys["LSR_CURRENT"] = 5;
00024 m_keys["LSR_DELAY_1"] = 6;
00025 m_keys["LSR_DELAY_2"] = 7;
00026 }
00027 LMFLaserConfigDat(EcalDBConnection *c) : LMFDat(c) {
00028 m_tableName = "LMF_LASER_CONFIG_DAT";
00029 m_className = "LMFLaserConfigDat";
00030 m_keys["WAVELENGTH"] = 0;
00031 m_keys["VFE_GAIN"] = 1;
00032 m_keys["PN_GAIN"] = 2;
00033 m_keys["LSR_POWER"] = 3;
00034 m_keys["LSR_ATTENUATOR"] = 4;
00035 m_keys["LSR_CURRENT"] = 5;
00036 m_keys["LSR_DELAY_1"] = 6;
00037 m_keys["LSR_DELAY_2"] = 7;
00038 }
00039 ~LMFLaserConfigDat() {}
00040
00041 LMFLaserConfigDat& setWavelength(EcalLogicID &id, int w) {
00042 LMFDat::setData(id, "WAVELENGTH", w);
00043 return *this;
00044 }
00045 LMFLaserConfigDat& setVFEGain(EcalLogicID &id, float g) {
00046 LMFDat::setData(id, "VFE_GAIN", g);
00047 return *this;
00048 }
00049 LMFLaserConfigDat& setPNGain(EcalLogicID &id, float g) {
00050 LMFDat::setData(id, "PN_GAIN", g);
00051 return *this;
00052 }
00053 LMFLaserConfigDat& setLSRPower(EcalLogicID &id, float g) {
00054 LMFDat::setData(id, "LSR_POWER", g);
00055 return *this;
00056 }
00057 LMFLaserConfigDat& setLSRAttenuator(EcalLogicID &id, float g) {
00058 LMFDat::setData(id, "LSR_ATTENUATOR", g);
00059 return *this;
00060 }
00061 LMFLaserConfigDat& setLSRCurrent(EcalLogicID &id, float g) {
00062 LMFDat::setData(id, "LSR_CURRENT", g);
00063 return *this;
00064 }
00065 LMFLaserConfigDat& setLSRDelay1(EcalLogicID &id, float g) {
00066 LMFDat::setData(id, "LSR_DELAY_1", g);
00067 return *this;
00068 }
00069 LMFLaserConfigDat& setLSRDelay2(EcalLogicID &id, float g) {
00070 LMFDat::setData(id, "LSR_DELAY_2", g);
00071 return *this;
00072 }
00073 LMFLaserConfigDat& setData(EcalLogicID &id, float w, float g, float pnga,
00074 float p, float a, float c, float d1, float d2) {
00075 LMFDat::setData(id, "WAVELENGTH", w);
00076 LMFDat::setData(id, "VFE_GAIN", g);
00077 LMFDat::setData(id, "PN_GAIN", pnga);
00078 LMFDat::setData(id, "LSR_POWER", p);
00079 LMFDat::setData(id, "LSR_ATTENUATOR", a);
00080 LMFDat::setData(id, "LSR_CURRENT", c);
00081 LMFDat::setData(id, "LSR_DELAY_1", d1);
00082 LMFDat::setData(id, "LSR_DELAY_2", d2);
00083 return *this;
00084 }
00085 LMFLaserConfigDat& setData(EcalLogicID &id, std::vector<float> v) {
00086 LMFDat::setData(id, v);
00087 return *this;
00088 }
00089
00090 float getWavelength(EcalLogicID &id) {
00091 return getData(id, "WAVELENGTH");
00092 }
00093 float getVFEGain(EcalLogicID &id) {
00094 return getData(id, "VFE_GAIN");
00095 }
00096 float getPNGain(EcalLogicID &id) {
00097 return getData(id, "PN_GAIN");
00098 }
00099 float getLSRPower(EcalLogicID &id) {
00100 return getData(id, "LSR_POWER");
00101 }
00102 float getLSRAttenuator(EcalLogicID &id) {
00103 return getData(id, "LSR_ATTENUATOR");
00104 }
00105 float getLSRCURRENT(EcalLogicID &id) {
00106 return getData(id, "LSR_CURRENT");
00107 }
00108 float getLSRDelay1(EcalLogicID &id) {
00109 return getData(id, "LSR_DELAY_1");
00110 }
00111 float getLSRDelay2(EcalLogicID &id) {
00112 return getData(id, "LSR_DELAY_2");
00113 }
00114
00115
00116 private:
00117
00118 };
00119
00120 #endif