Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:05

0001 #include "OnlineDB/EcalCondDB/interface/LMFPrimDat.h"
0002 
0003 LMFPrimDat::LMFPrimDat() : LMFColoredTable() { init(); }
0004 
0005 LMFPrimDat::LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn) : LMFColoredTable(env, conn) {
0006   init();
0007 }
0008 
0009 LMFPrimDat::LMFPrimDat(EcalDBConnection *c) : LMFColoredTable(c) { init(); }
0010 
0011 LMFPrimDat::LMFPrimDat(std::string color, std::string system) : LMFColoredTable() {
0012   init();
0013   setColor(color);
0014   setSystem(system);
0015 }
0016 
0017 LMFPrimDat::LMFPrimDat(int color, std::string system) : LMFColoredTable() {
0018   init();
0019   setColor(color);
0020   setSystem(system);
0021 }
0022 
0023 LMFPrimDat::LMFPrimDat(oracle::occi::Environment *env,
0024                        oracle::occi::Connection *conn,
0025                        std::string color,
0026                        std::string system)
0027     : LMFColoredTable(env, conn) {
0028   init();
0029   setColor(color);
0030   setSystem(system);
0031 }
0032 
0033 LMFPrimDat::LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, int color, std::string system)
0034     : LMFColoredTable(env, conn) {
0035   init();
0036   setColor(color);
0037   setSystem(system);
0038 }
0039 
0040 LMFPrimDat::LMFPrimDat(EcalDBConnection *c, std::string color, std::string system) : LMFColoredTable(c) {
0041   init();
0042   setColor(color);
0043   setSystem(system);
0044 }
0045 
0046 LMFPrimDat::LMFPrimDat(EcalDBConnection *c, int color, std::string system) : LMFColoredTable(c) {
0047   init();
0048   setColor(color);
0049   setSystem(system);
0050 }
0051 
0052 void LMFPrimDat::init() {
0053   m_className = "LMFPrimDat";
0054   m_keys["FLAG"] = 0;
0055   m_keys["MEAN"] = 1;
0056   m_keys["RMS"] = 2;
0057   m_keys["M3"] = 3;
0058   m_keys["APDAMEAN"] = 4;
0059   m_keys["APDARMS"] = 5;
0060   m_keys["APDAM3"] = 6;
0061   m_keys["APDBMEAN"] = 7;
0062   m_keys["APDBRMS"] = 8;
0063   m_keys["APDBM3"] = 9;
0064   m_keys["APDPNMEAN"] = 10;
0065   m_keys["APDPNRMS"] = 11;
0066   m_keys["APDPNM3"] = 12;
0067   m_keys["ALPHA"] = 13;
0068   m_keys["BETA"] = 14;
0069   m_keys["SHAPECORR"] = 15;
0070   m_keys["VMIN"] = 16;
0071   m_keys["VMAX"] = 17;
0072   for (unsigned int i = 0; i < m_keys.size(); i++) {
0073     m_type.push_back("NUMBER");
0074   }
0075   m_system = 0;
0076   m_color = 0;
0077 }
0078 
0079 bool LMFPrimDat::isValid() {
0080   bool ret = true;
0081   if ((getSystem() != "LASER") && (getSystem() != "LED")) {
0082     m_Error += " System name not properly set [" + getSystem() + "]";
0083     ret = false;
0084   }
0085   if ((getSystem() == "LASER") && (getColor() != "BLUE") && (getColor() != "IR")) {
0086     m_Error += " Color not properly set [" + getColor() + "]";
0087     ret = false;
0088   }
0089   if ((getSystem() == "LED") && (getColor() != "BLUE") && (getColor() != "ORANGE")) {
0090     m_Error += " Color not properly set [" + getColor() + "]";
0091     ret = false;
0092   }
0093   return ret;
0094 }
0095 
0096 LMFPrimDat &LMFPrimDat::setMean(EcalLogicID &id, float v) {
0097   LMFDat::setData(id, "MEAN", v);
0098   return *this;
0099 }
0100 
0101 LMFPrimDat &LMFPrimDat::setRMS(EcalLogicID &id, float v) {
0102   LMFDat::setData(id, "RMS", v);
0103   return *this;
0104 }
0105 
0106 LMFPrimDat &LMFPrimDat::setM3(EcalLogicID &id, float v) {
0107   LMFDat::setData(id, "M3", v);
0108   return *this;
0109 }
0110 
0111 LMFPrimDat &LMFPrimDat::setPN(EcalLogicID &id, float mean, float rms, float m3) {
0112   setMean(id, mean);
0113   setRMS(id, rms);
0114   setM3(id, m3);
0115   return *this;
0116 }
0117 
0118 LMFPrimDat &LMFPrimDat::setAPDoverAM3(EcalLogicID &id, float v) {
0119   LMFDat::setData(id, "APDAM3", v);
0120   return *this;
0121 }
0122 
0123 LMFPrimDat &LMFPrimDat::setAPDoverAMean(EcalLogicID &id, float v) {
0124   LMFDat::setData(id, "APDAMEAN", v);
0125   return *this;
0126 }
0127 
0128 LMFPrimDat &LMFPrimDat::setAPDoverARMS(EcalLogicID &id, float v) {
0129   LMFDat::setData(id, "APDARMS", v);
0130   return *this;
0131 }
0132 
0133 LMFPrimDat &LMFPrimDat::setAPDoverA(EcalLogicID &id, float mean, float rms, float m3) {
0134   setAPDoverAMean(id, mean);
0135   setAPDoverARMS(id, rms);
0136   setAPDoverAM3(id, m3);
0137   return *this;
0138 }
0139 
0140 LMFPrimDat &LMFPrimDat::setAPDoverBM3(EcalLogicID &id, float v) {
0141   LMFDat::setData(id, "APDBM3", v);
0142   return *this;
0143 }
0144 
0145 LMFPrimDat &LMFPrimDat::setAPDoverBMean(EcalLogicID &id, float v) {
0146   LMFDat::setData(id, "APDBMEAN", v);
0147   return *this;
0148 }
0149 
0150 LMFPrimDat &LMFPrimDat::setAPDoverBRMS(EcalLogicID &id, float v) {
0151   LMFDat::setData(id, "APDBRMS", v);
0152   return *this;
0153 }
0154 
0155 LMFPrimDat &LMFPrimDat::setAPDoverB(EcalLogicID &id, float mean, float rms, float m3) {
0156   setAPDoverBMean(id, mean);
0157   setAPDoverBRMS(id, rms);
0158   setAPDoverBM3(id, m3);
0159   return *this;
0160 }
0161 
0162 LMFPrimDat &LMFPrimDat::setAPDoverPnM3(EcalLogicID &id, float v) {
0163   LMFDat::setData(id, "APDPNM3", v);
0164   return *this;
0165 }
0166 
0167 LMFPrimDat &LMFPrimDat::setAPDoverPnMean(EcalLogicID &id, float v) {
0168   LMFDat::setData(id, "APDPNMEAN", v);
0169   return *this;
0170 }
0171 
0172 LMFPrimDat &LMFPrimDat::setAPDoverPnRMS(EcalLogicID &id, float v) {
0173   LMFDat::setData(id, "APDPNRMS", v);
0174   return *this;
0175 }
0176 
0177 LMFPrimDat &LMFPrimDat::setAPDoverPn(EcalLogicID &id, float mean, float rms, float m3) {
0178   setAPDoverPnMean(id, mean);
0179   setAPDoverPnRMS(id, rms);
0180   setAPDoverPnM3(id, m3);
0181   return *this;
0182 }
0183 
0184 LMFPrimDat &LMFPrimDat::setFlag(EcalLogicID &id, int v) {
0185   LMFDat::setData(id, "FLAG", v);
0186   return *this;
0187 }
0188 
0189 LMFPrimDat &LMFPrimDat::setAlpha(EcalLogicID &id, float v) {
0190   LMFDat::setData(id, "ALPHA", v);
0191   return *this;
0192 }
0193 
0194 LMFPrimDat &LMFPrimDat::setBeta(EcalLogicID &id, float v) {
0195   LMFDat::setData(id, "BETA", v);
0196   return *this;
0197 }
0198 
0199 LMFPrimDat &LMFPrimDat::setShapeCorr(EcalLogicID &id, float v) {
0200   LMFDat::setData(id, "SHAPECORR", v);
0201   return *this;
0202 }
0203 
0204 float LMFPrimDat::getMean(EcalLogicID &id) { return getData(id, "MEAN"); }
0205 
0206 float LMFPrimDat::getRMS(EcalLogicID &id) { return getData(id, "RMS"); }
0207 
0208 float LMFPrimDat::getM3(EcalLogicID &id) { return getData(id, "M3"); }
0209 
0210 float LMFPrimDat::getAPDoverAM3(EcalLogicID &id) { return getData(id, "APDAM3"); }
0211 
0212 float LMFPrimDat::getAPDoverAMean(EcalLogicID &id) { return getData(id, "APDAMEAN"); }
0213 
0214 float LMFPrimDat::getAPDoverARMS(EcalLogicID &id) { return getData(id, "APDARMS"); }
0215 
0216 float LMFPrimDat::getAPDoverBM3(EcalLogicID &id) { return getData(id, "APDBM3"); }
0217 
0218 float LMFPrimDat::getAPDoverPnMean(EcalLogicID &id) { return getData(id, "APDPNMEAN"); }
0219 
0220 float LMFPrimDat::getAPDoverPnRMS(EcalLogicID &id) { return getData(id, "APDPNRMS"); }
0221 
0222 float LMFPrimDat::getAPDoverPnM3(EcalLogicID &id) { return getData(id, "APDPNM3"); }
0223 
0224 float LMFPrimDat::getAPDoverBMean(EcalLogicID &id) { return getData(id, "APDBMEAN"); }
0225 
0226 float LMFPrimDat::getAPDoverBRMS(EcalLogicID &id) { return getData(id, "APDBRMS"); }
0227 
0228 float LMFPrimDat::getAlpha(EcalLogicID &id) { return getData(id, "ALPHA"); }
0229 
0230 float LMFPrimDat::getBeta(EcalLogicID &id) { return getData(id, "BETA"); }
0231 
0232 float LMFPrimDat::getShapeCorr(EcalLogicID &id) { return getData(id, "SHAPECORR"); }
0233 
0234 int LMFPrimDat::getFlag(EcalLogicID &id) { return getData(id, "FLAG"); }
0235 
0236 float LMFPrimDat::getMean(int id) { return getData(id, "MEAN"); }
0237 
0238 float LMFPrimDat::getRMS(int id) { return getData(id, "RMS"); }
0239 
0240 float LMFPrimDat::getM3(int id) { return getData(id, "M3"); }
0241 
0242 float LMFPrimDat::getAPDoverAM3(int id) { return getData(id, "APDAM3"); }
0243 
0244 float LMFPrimDat::getAPDoverAMean(int id) { return getData(id, "APDAMEAN"); }
0245 
0246 float LMFPrimDat::getAPDoverARMS(int id) { return getData(id, "APDARMS"); }
0247 
0248 float LMFPrimDat::getAPDoverBM3(int id) { return getData(id, "APDBM3"); }
0249 
0250 float LMFPrimDat::getAPDoverPnMean(int id) { return getData(id, "APDPNMEAN"); }
0251 
0252 float LMFPrimDat::getAPDoverPnRMS(int id) { return getData(id, "APDPNRMS"); }
0253 
0254 float LMFPrimDat::getAPDoverPnM3(int id) { return getData(id, "APDPNM3"); }
0255 
0256 float LMFPrimDat::getAPDoverBMean(int id) { return getData(id, "APDBMEAN"); }
0257 
0258 float LMFPrimDat::getAPDoverBRMS(int id) { return getData(id, "APDBRMS"); }
0259 
0260 float LMFPrimDat::getAlpha(int id) { return getData(id, "ALPHA"); }
0261 
0262 float LMFPrimDat::getBeta(int id) { return getData(id, "BETA"); }
0263 
0264 float LMFPrimDat::getShapeCorr(int id) { return getData(id, "SHAPECORR"); }
0265 
0266 int LMFPrimDat::getFlag(int id) { return getData(id, "FLAG"); }