CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef LMFLASERCONFIGDAT_H
00002 #define LMFLASERCONFIGDAT_H
00003 
00004 /*
00005  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
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(int id) {
00091     return getData(id, "WAVELENGTH");
00092   }
00093   float getVFEGain(int id) {
00094     return getData(id, "VFE_GAIN");
00095   }
00096   float getPNGain(int id) {
00097     return getData(id, "PN_GAIN");
00098   }
00099   float getLSRPower(int id) {
00100     return getData(id, "LSR_POWER");
00101   }
00102   float getLSRAttenuator(int id) {
00103     return getData(id, "LSR_ATTENUATOR");
00104   }
00105   float getLSRCurrent(int id) {
00106     return getData(id, "LSR_CURRENT");
00107   }
00108   float getLSRDelay1(int id) {
00109     return getData(id, "LSR_DELAY_1");
00110   }
00111   float getLSRDelay2(int id) {
00112     return getData(id, "LSR_DELAY_2");
00113   }
00114 
00115   float getWavelength(EcalLogicID &id) {
00116     return getData(id, "WAVELENGTH");
00117   }
00118   float getVFEGain(EcalLogicID &id) {
00119     return getData(id, "VFE_GAIN");
00120   }
00121   float getPNGain(EcalLogicID &id) {
00122     return getData(id, "PN_GAIN");
00123   }
00124   float getLSRPower(EcalLogicID &id) {
00125     return getData(id, "LSR_POWER");
00126   }
00127   float getLSRAttenuator(EcalLogicID &id) {
00128     return getData(id, "LSR_ATTENUATOR");
00129   }
00130   float getLSRCurrent(EcalLogicID &id) {
00131     return getData(id, "LSR_CURRENT");
00132   }
00133   float getLSRDelay1(EcalLogicID &id) {
00134     return getData(id, "LSR_DELAY_1");
00135   }
00136   float getLSRDelay2(EcalLogicID &id) {
00137     return getData(id, "LSR_DELAY_2");
00138   }
00139 
00140   
00141  private:
00142 
00143 };
00144 
00145 #endif