File indexing completed on 2023-03-17 11:15:17
0001 #include "OnlineDB/EcalCondDB/interface/LMFLaserPulseDat.h"
0002
0003 LMFLaserPulseDat::LMFLaserPulseDat() : LMFColoredTable() { init(); }
0004
0005 LMFLaserPulseDat::LMFLaserPulseDat(oracle::occi::Environment* env, oracle::occi::Connection* conn)
0006 : LMFColoredTable(env, conn) {
0007 init();
0008 }
0009
0010 LMFLaserPulseDat::LMFLaserPulseDat(EcalDBConnection* c) : LMFColoredTable(c) { init(); }
0011
0012 LMFLaserPulseDat::LMFLaserPulseDat(std::string color) : LMFColoredTable() {
0013 init();
0014 setColor(color);
0015 }
0016
0017 LMFLaserPulseDat::LMFLaserPulseDat(oracle::occi::Environment* env, oracle::occi::Connection* conn, std::string color)
0018 : LMFColoredTable(env, conn) {
0019 init();
0020 setColor(color);
0021 }
0022
0023 LMFLaserPulseDat::LMFLaserPulseDat(EcalDBConnection* c, std::string color) : LMFColoredTable(c) {
0024 init();
0025 setColor(color);
0026 }
0027
0028 void LMFLaserPulseDat::init() {
0029 m_className = "LMFLaserPulseDat";
0030 m_keys["FIT_METHOD"] = 0;
0031 m_keys["MTQ_AMPL"] = 1;
0032 m_keys["MTQ_TIME"] = 2;
0033 m_keys["MTQ_RISE"] = 3;
0034 m_keys["MTQ_FWHM"] = 4;
0035 m_keys["MTQ_FW20"] = 5;
0036 m_keys["MTQ_FW80"] = 6;
0037 m_keys["MTQ_SLIDING"] = 7;
0038 m_keys["VMIN"] = 8;
0039 m_keys["VMAX"] = 9;
0040 for (int i = 0; i < 10; i++) {
0041 m_type.push_back("NUMBER");
0042 }
0043 setSystem("LASER");
0044 m_color = 0;
0045 }
0046
0047 bool LMFLaserPulseDat::isValid() {
0048 bool ret = true;
0049 ret = LMFDat::isValid();
0050 if ((getColor() != "BLUE") && (getColor() != "IR")) {
0051 m_Error += " Color not properly set [" + getColor() + "]";
0052 ret = false;
0053 }
0054 return ret;
0055 }
0056
0057 LMFLaserPulseDat& LMFLaserPulseDat::setFitMethod(EcalLogicID& id, int v) {
0058 LMFDat::setData(id, "FIT_METHOD", v);
0059 return *this;
0060 }
0061
0062 LMFLaserPulseDat& LMFLaserPulseDat::setMTQAmplification(EcalLogicID& id, float v) {
0063 LMFDat::setData(id, "MTQ_AMPL", v);
0064 return *this;
0065 }
0066
0067 LMFLaserPulseDat& LMFLaserPulseDat::setMTQTime(EcalLogicID& id, float v) {
0068 LMFDat::setData(id, "MTQ_TIME", v);
0069 return *this;
0070 }
0071
0072 LMFLaserPulseDat& LMFLaserPulseDat::setMTQRise(EcalLogicID& id, float v) {
0073 LMFDat::setData(id, "MTQ_RISE", v);
0074 return *this;
0075 }
0076
0077 LMFLaserPulseDat& LMFLaserPulseDat::setMTQFWHM(EcalLogicID& id, float v) {
0078 LMFDat::setData(id, "MTQ_FWHM", v);
0079 return *this;
0080 }
0081
0082 LMFLaserPulseDat& LMFLaserPulseDat::setMTQFW20(EcalLogicID& id, float v) {
0083 LMFDat::setData(id, "MTQ_FW20", v);
0084 return *this;
0085 }
0086
0087 LMFLaserPulseDat& LMFLaserPulseDat::setMTQFW80(EcalLogicID& id, float v) {
0088 LMFDat::setData(id, "MTQ_FW80", v);
0089 return *this;
0090 }
0091
0092 LMFLaserPulseDat& LMFLaserPulseDat::setMTQSliding(EcalLogicID& id, float v) {
0093 LMFDat::setData(id, "MTQ_SLIDING", v);
0094 return *this;
0095 }
0096
0097 int LMFLaserPulseDat::getFitMethod(int id) { return getData(id, "FIT_METHOD"); }
0098
0099 float LMFLaserPulseDat::getMTQAmplification(int id) { return getData(id, "MTQ_AMPL"); }
0100
0101 float LMFLaserPulseDat::getMTQTime(int id) { return getData(id, "MTQ_TIME"); }
0102
0103 float LMFLaserPulseDat::getMTQRise(int id) { return getData(id, "MTQ_RISE"); }
0104
0105 float LMFLaserPulseDat::getMTQFWHM(int id) { return getData(id, "MTQ_FWHM"); }
0106
0107 float LMFLaserPulseDat::getMTQFW20(int id) { return getData(id, "MTQ_FW20"); }
0108
0109 float LMFLaserPulseDat::getMTQFW80(int id) { return getData(id, "MTQ_FW80"); }
0110
0111 float LMFLaserPulseDat::getMTQSliding(int id) { return getData(id, "MTQ_SLIDING"); }