Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:54

0001 #ifndef LMFPRIMDAT_H
0002 #define LMFPRIMDAT_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_PPRIM_DAT interface
0014  *        ^    ^
0015  *        |    |
0016  *        |    \_____ color
0017  *        \---------- system
0018  */
0019 class LMFPrimDat : public LMFColoredTable {
0020 public:
0021   LMFPrimDat();
0022   LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0023   LMFPrimDat(EcalDBConnection *c);
0024   LMFPrimDat(std::string color, std::string system);
0025   LMFPrimDat(int color, std::string system);
0026   LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, std::string color, std::string system);
0027   LMFPrimDat(EcalDBConnection *c, std::string color, std::string system);
0028   LMFPrimDat(oracle::occi::Environment *env, oracle::occi::Connection *conn, int color, std::string system);
0029   LMFPrimDat(EcalDBConnection *c, int color, std::string system);
0030   ~LMFPrimDat() override {}
0031 
0032   std::string getTableName() const override { return "LMF_" + getSystem() + "_" + getColor() + "_PRIM_DAT"; }
0033 
0034   LMFPrimDat &setFlag(EcalLogicID &id, int v);
0035   LMFPrimDat &setMean(EcalLogicID &id, float v);
0036   LMFPrimDat &setRMS(EcalLogicID &id, float v);
0037   LMFPrimDat &setM3(EcalLogicID &id, float v);
0038   LMFPrimDat &setPN(EcalLogicID &id, float mean, float rms, float m3);
0039   LMFPrimDat &setAPDoverAMean(EcalLogicID &id, float v);
0040   LMFPrimDat &setAPDoverARMS(EcalLogicID &id, float v);
0041   LMFPrimDat &setAPDoverAM3(EcalLogicID &id, float v);
0042   LMFPrimDat &setAPDoverA(EcalLogicID &id, float mean, float rms, float m3);
0043   LMFPrimDat &setAPDoverBMean(EcalLogicID &id, float v);
0044   LMFPrimDat &setAPDoverBRMS(EcalLogicID &id, float v);
0045   LMFPrimDat &setAPDoverBM3(EcalLogicID &id, float v);
0046   LMFPrimDat &setAPDoverB(EcalLogicID &id, float mean, float rms, float m3);
0047   LMFPrimDat &setAPDoverPnMean(EcalLogicID &id, float v);
0048   LMFPrimDat &setAPDoverPnRMS(EcalLogicID &id, float v);
0049   LMFPrimDat &setAPDoverPnM3(EcalLogicID &id, float v);
0050   LMFPrimDat &setAPDoverPn(EcalLogicID &id, float mean, float rms, float m3);
0051   LMFPrimDat &setAlpha(EcalLogicID &id, float v);
0052   LMFPrimDat &setBeta(EcalLogicID &id, float v);
0053   LMFPrimDat &setShapeCorr(EcalLogicID &id, float v);
0054 
0055   float getMean(EcalLogicID &id);
0056   float getRMS(EcalLogicID &id);
0057   float getM3(EcalLogicID &id);
0058   int getFlag(EcalLogicID &id);
0059   float getAPDoverAMean(EcalLogicID &id);
0060   float getAPDoverARMS(EcalLogicID &id);
0061   float getAPDoverAM3(EcalLogicID &id);
0062   float getAPDoverBMean(EcalLogicID &id);
0063   float getAPDoverBRMS(EcalLogicID &id);
0064   float getAPDoverBM3(EcalLogicID &id);
0065   float getAPDoverPnMean(EcalLogicID &id);
0066   float getAPDoverPnRMS(EcalLogicID &id);
0067   float getAPDoverPnM3(EcalLogicID &id);
0068   float getAlpha(EcalLogicID &id);
0069   float getBeta(EcalLogicID &id);
0070   float getShapeCorr(EcalLogicID &id);
0071 
0072   float getMean(int id);
0073   float getRMS(int id);
0074   float getM3(int id);
0075   int getFlag(int id);
0076   float getAPDoverAMean(int id);
0077   float getAPDoverARMS(int id);
0078   float getAPDoverAM3(int id);
0079   float getAPDoverBMean(int id);
0080   float getAPDoverBRMS(int id);
0081   float getAPDoverBM3(int id);
0082   float getAPDoverPnMean(int id);
0083   float getAPDoverPnRMS(int id);
0084   float getAPDoverPnM3(int id);
0085   float getAlpha(int id);
0086   float getBeta(int id);
0087   float getShapeCorr(int id);
0088 
0089   bool isValid() override;
0090   // to do: complete list of set/get methods
0091 
0092 private:
0093   void init();
0094 };
0095 
0096 #endif