Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef LMFPNPRIMDAT_H
0002 #define LMFPNPRIMDAT_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_YYYY_XXX_PN_PRIM_DAT interface
0014  *        ^    ^
0015  *        |    |
0016  *        |    \_____ color
0017  *        \---------- system
0018  */
0019 class LMFPnPrimDat : public LMFColoredTable {
0020 public:
0021   LMFPnPrimDat();
0022   LMFPnPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0023   LMFPnPrimDat(EcalDBConnection *c);
0024   LMFPnPrimDat(std::string color, std::string system);
0025   LMFPnPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, std::string color, std::string system);
0026   LMFPnPrimDat(EcalDBConnection *c, std::string color, std::string system);
0027   LMFPnPrimDat(EcalDBConnection *c, std::string color, std::string system, bool debug);
0028   LMFPnPrimDat(int color, std::string system);
0029   LMFPnPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, int color, std::string system);
0030   LMFPnPrimDat(EcalDBConnection *c, int color, std::string system);
0031   ~LMFPnPrimDat() override {}
0032 
0033   std::string getTableName() const override { return "LMF_" + getSystem() + "_" + getColor() + "_PN_PRIM_DAT"; }
0034 
0035   LMFPnPrimDat &setMean(EcalLogicID &id, float v);
0036   LMFPnPrimDat &setRMS(EcalLogicID &id, float v);
0037   LMFPnPrimDat &setM3(EcalLogicID &id, float v);
0038   LMFPnPrimDat &setPN(EcalLogicID &id, float mean, float rms, float m3);
0039   LMFPnPrimDat &setShapeCorr(EcalLogicID &id, float mean);
0040   LMFPnPrimDat &setPNAoverBMean(EcalLogicID &id, float v);
0041   LMFPnPrimDat &setPNAoverBRMS(EcalLogicID &id, float v);
0042   LMFPnPrimDat &setPNAoverBM3(EcalLogicID &id, float v);
0043   LMFPnPrimDat &setPNAoverB(EcalLogicID &id, float mean, float rms, float m3);
0044   LMFPnPrimDat &setFlag(EcalLogicID &id, int v);
0045 
0046   LMFPnPrimDat &setSystem(std::string s) override;
0047 
0048   float getMean(EcalLogicID &id);
0049   float getRMS(EcalLogicID &id);
0050   float getM3(EcalLogicID &id);
0051   float getPNAoverBMean(EcalLogicID &id);
0052   float getPNAoverBRMS(EcalLogicID &id);
0053   float getPNAoverBM3(EcalLogicID &id);
0054   float getShapeCor(EcalLogicID &id);
0055   int getFlag(EcalLogicID &id);
0056 
0057   float getMean(int id);
0058   float getRMS(int id);
0059   float getM3(int id);
0060   float getPNAoverBMean(int id);
0061   float getPNAoverBRMS(int id);
0062   float getPNAoverBM3(int id);
0063   float getShapeCor(int id);
0064   int getFlag(int id);
0065 
0066   bool isValid() override;
0067   // to do: complete list of set/get methods
0068 
0069 private:
0070   void init();
0071 };
0072 
0073 #endif