Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef LMFCLSDAT_H
0002 #define LMFCLSDAT_H
0003 
0004 /*
0005  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0006  */
0007 
0008 #include "OnlineDB/EcalCondDB/interface/LMFColoredTable.h"
0009 
0010 #include <cmath>
0011 
0012 /**
0013  *   LMF_CLS_XXXX_DAT interface
0014  *            ^
0015  *            |
0016  *            \_____ color
0017  */
0018 class LMFClsDat : public LMFColoredTable {
0019 public:
0020   typedef oracle::occi::ResultSet ResultSet;
0021   typedef oracle::occi::Statement Statement;
0022 
0023   LMFClsDat();
0024   LMFClsDat(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0025   LMFClsDat(EcalDBConnection *c);
0026   LMFClsDat(std::string color);
0027   LMFClsDat(int color);
0028   LMFClsDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, std::string color);
0029   LMFClsDat(EcalDBConnection *c, std::string color);
0030   LMFClsDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, int color);
0031   LMFClsDat(EcalDBConnection *c, int color);
0032   ~LMFClsDat() override {}
0033 
0034   std::string getTableName() const override { return "LMF_CLS_" + getColor() + "_DAT"; }
0035 
0036   LMFClsDat &setSystem(int system) override { return *this; }
0037   LMFClsDat &setSystem(std::string system) override { return *this; }
0038 
0039   LMFClsDat &setLMFRefRunIOVID(EcalLogicID &id, int v);
0040   LMFClsDat &setMean(EcalLogicID &id, float v);
0041   LMFClsDat &setNorm(EcalLogicID &id, float v);
0042   LMFClsDat &setENorm(EcalLogicID &id, float v);
0043   LMFClsDat &setRMS(EcalLogicID &id, float v);
0044   LMFClsDat &setNevt(EcalLogicID &id, int v);
0045   LMFClsDat &setFlag(EcalLogicID &id, int v);
0046   LMFClsDat &setFlagNorm(EcalLogicID &id, float v);
0047 
0048   int getLMFRefRunIOVID(EcalLogicID &id);
0049   float getMean(EcalLogicID &id);
0050   float getNorm(EcalLogicID &id);
0051   float getENorm(EcalLogicID &id);
0052   float getRMS(EcalLogicID &id);
0053   int getNevt(EcalLogicID &id);
0054   int getFlag(EcalLogicID &id);
0055   float getFlagNorm(EcalLogicID &id);
0056 
0057   std::string getSystem() const override { return ""; }
0058 
0059   bool isValid() override;
0060   // to do: complete list of set/get methods
0061 
0062 private:
0063   void init();
0064 };
0065 
0066 #endif