Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:00

0001 #include "OnlineDB/EcalCondDB/interface/LMFClsDat.h"
0002 
0003 LMFClsDat::LMFClsDat() : LMFColoredTable() { init(); }
0004 
0005 LMFClsDat::LMFClsDat(oracle::occi::Environment *env, oracle::occi::Connection *conn) : LMFColoredTable(env, conn) {
0006   init();
0007 }
0008 
0009 LMFClsDat::LMFClsDat(EcalDBConnection *c) : LMFColoredTable(c) { init(); }
0010 
0011 LMFClsDat::LMFClsDat(std::string color) : LMFColoredTable() {
0012   init();
0013   setColor(color);
0014 }
0015 
0016 LMFClsDat::LMFClsDat(int color) : LMFColoredTable() {
0017   init();
0018   setColor(color);
0019 }
0020 
0021 LMFClsDat::LMFClsDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, std::string color)
0022     : LMFColoredTable(env, conn) {
0023   init();
0024   setColor(color);
0025 }
0026 
0027 LMFClsDat::LMFClsDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, int color)
0028     : LMFColoredTable(env, conn) {
0029   init();
0030   setColor(color);
0031 }
0032 
0033 LMFClsDat::LMFClsDat(EcalDBConnection *c, std::string color) : LMFColoredTable(c) {
0034   init();
0035   setColor(color);
0036 }
0037 
0038 LMFClsDat::LMFClsDat(EcalDBConnection *c, int color) : LMFColoredTable(c) {
0039   init();
0040   setColor(color);
0041 }
0042 
0043 void LMFClsDat::init() {
0044   m_className = "LMFClsDat";
0045   m_keys["LMF_IOV_ID_REF"] = 0;
0046   m_keys["MEAN"] = 1;
0047   m_keys["NORM"] = 2;
0048   m_keys["RMS"] = 3;
0049   m_keys["NEVT"] = 4;
0050   m_keys["ENORM"] = 5;
0051   m_keys["FLAG"] = 6;
0052   m_keys["FLAGNORM"] = 7;
0053   m_keys["VMIN"] = 8;
0054   m_keys["VMAX"] = 9;
0055   for (unsigned int i = 0; i < m_keys.size(); i++) {
0056     m_type.push_back("NUMBER");
0057   }
0058   m_system = 0;
0059   m_color = 0;
0060 }
0061 
0062 bool LMFClsDat::isValid() {
0063   bool ret = true;
0064   if ((getColor() != "BLUE") && (getColor() != "IR")) {
0065     m_Error += " Color not properly set [" + getColor() + "]";
0066     ret = false;
0067   }
0068   return ret;
0069 }
0070 
0071 LMFClsDat &LMFClsDat::setLMFRefRunIOVID(EcalLogicID &id, int v) {
0072   LMFDat::setData(id, "LMF_IOV_ID_REF", v);
0073   return *this;
0074 }
0075 
0076 LMFClsDat &LMFClsDat::setMean(EcalLogicID &id, float v) {
0077   LMFDat::setData(id, "MEAN", v);
0078   return *this;
0079 }
0080 
0081 LMFClsDat &LMFClsDat::setNorm(EcalLogicID &id, float v) {
0082   LMFDat::setData(id, "NORM", v);
0083   return *this;
0084 }
0085 
0086 LMFClsDat &LMFClsDat::setENorm(EcalLogicID &id, float v) {
0087   LMFDat::setData(id, "ENORM", v);
0088   return *this;
0089 }
0090 
0091 LMFClsDat &LMFClsDat::setRMS(EcalLogicID &id, float v) {
0092   LMFDat::setData(id, "RMS", v);
0093   return *this;
0094 }
0095 
0096 LMFClsDat &LMFClsDat::setNevt(EcalLogicID &id, int v) {
0097   LMFDat::setData(id, "NEVT", v);
0098   return *this;
0099 }
0100 
0101 LMFClsDat &LMFClsDat::setFlag(EcalLogicID &id, int v) {
0102   LMFDat::setData(id, "FLAG", v);
0103   return *this;
0104 }
0105 
0106 LMFClsDat &LMFClsDat::setFlagNorm(EcalLogicID &id, float v) {
0107   LMFDat::setData(id, "FLAGNORM", v);
0108   return *this;
0109 }
0110 
0111 int LMFClsDat::getLMFRefRunIOVID(EcalLogicID &id) { return getData(id, "LMF_IOV_ID_REF"); }
0112 
0113 float LMFClsDat::getMean(EcalLogicID &id) { return getData(id, "MEAN"); }
0114 
0115 float LMFClsDat::getNorm(EcalLogicID &id) { return getData(id, "NORM"); }
0116 
0117 float LMFClsDat::getENorm(EcalLogicID &id) { return getData(id, "ENORM"); }
0118 
0119 float LMFClsDat::getRMS(EcalLogicID &id) { return getData(id, "RMS"); }
0120 
0121 int LMFClsDat::getNevt(EcalLogicID &id) { return getData(id, "NEVT"); }
0122 
0123 int LMFClsDat::getFlag(EcalLogicID &id) { return getData(id, "FLAG"); }
0124 
0125 float LMFClsDat::getFlagNorm(EcalLogicID &id) { return getData(id, "FLAGNORM"); }