Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:50

0001 #ifndef LMFTESTPULSECONFIGDAT_H
0002 #define LMFTESTPULSECONFIGDAT_H
0003 
0004 /*
0005  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0006  */
0007 
0008 #include "OnlineDB/EcalCondDB/interface/LMFDat.h"
0009 
0010 /**
0011  *   LMF_TEST_PULSE_CONFIG_DAT interface
0012  */
0013 class LMFTestPulseConfigDat : public LMFDat {
0014 public:
0015   LMFTestPulseConfigDat() : LMFDat() {
0016     m_tableName = "LMF_TEST_PULSE_CONFIG_DAT";
0017     m_className = "LMFTestPulseConfigDat";
0018     m_keys["VFE_GAIN"] = 0;
0019     m_keys["DAC_MGPA"] = 1;
0020     m_keys["PN_GAIN"] = 2;
0021     m_keys["PN_VINJ"] = 3;
0022   }
0023   LMFTestPulseConfigDat(EcalDBConnection *c) : LMFDat(c) {
0024     m_tableName = "LMF_TEST_PULSE_CONFIG_DAT";
0025     m_className = "LMFTestPulseConfigDat";
0026     m_keys["VFE_GAIN"] = 0;
0027     m_keys["DAC_MGPA"] = 1;
0028     m_keys["PN_GAIN"] = 2;
0029     m_keys["PN_VINJ"] = 3;
0030   }
0031   ~LMFTestPulseConfigDat() override {}
0032 
0033   LMFTestPulseConfigDat &setVFEGain(EcalLogicID &id, float g) {
0034     LMFDat::setData(id, "VFE_GAIN", g);
0035     return *this;
0036   }
0037   LMFTestPulseConfigDat &setPNGain(EcalLogicID &id, float g) {
0038     LMFDat::setData(id, "PN_GAIN", g);
0039     return *this;
0040   }
0041   LMFTestPulseConfigDat &setDACMGPA(EcalLogicID &id, float g) {
0042     LMFDat::setData(id, "DAC_MGPA", g);
0043     return *this;
0044   }
0045   LMFTestPulseConfigDat &setPNVinj(EcalLogicID &id, float g) {
0046     LMFDat::setData(id, "PN_VINJ", g);
0047     return *this;
0048   }
0049   LMFTestPulseConfigDat &setData(EcalLogicID &id, float g, float d, float pnga, float pnv) {
0050     LMFDat::setData(id, "VFE_GAIN", g);
0051     LMFDat::setData(id, "DAC_MGPA", d);
0052     LMFDat::setData(id, "PN_GAIN", pnga);
0053     LMFDat::setData(id, "PN_VINJ", pnv);
0054     return *this;
0055   }
0056   LMFTestPulseConfigDat &setData(EcalLogicID &id, const std::vector<float> &v) {
0057     LMFDat::setData(id, v);
0058     return *this;
0059   }
0060 
0061   float getVFEGain(EcalLogicID &id) { return getData(id, "VFE_GAIN"); }
0062   float getPNGain(EcalLogicID &id) { return getData(id, "PN_GAIN"); }
0063   float getDACMGPA(EcalLogicID &id) { return getData(id, "DAC_MGPA"); }
0064   float getPNVinj(EcalLogicID &id) { return getData(id, "PN_VINJ"); }
0065 
0066 private:
0067 };
0068 
0069 #endif