Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-04-14 02:22:49

0001 #ifndef ONLINEDB_ECALCONDDB_FECONFIGODDWEIGHTMODEDAT_H
0002 #define ONLINEDB_ECALCONDDB_FECONFIGODDWEIGHTMODEDAT_H
0003 
0004 #include <vector>
0005 #include <stdexcept>
0006 
0007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
0008 #include "OnlineDB/EcalCondDB/interface/FEConfigOddWeightInfo.h"
0009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
0010 
0011 class FEConfigOddWeightModeDat : public IDataItem {
0012 public:
0013   friend class EcalCondDBInterface;  // XXX temp should not need
0014   FEConfigOddWeightModeDat();
0015   ~FEConfigOddWeightModeDat() override;
0016 
0017   // User data methods
0018   inline std::string getTable() override { return "FE_WEIGHT2_MODE_DAT"; }
0019 
0020   inline void setEnableEBOddFilter(int x) { m_en_EB_flt = x; }
0021   inline float getEnableEBOddFilter() const { return m_en_EB_flt; }
0022   inline void setEnableEEOddFilter(int x) { m_en_EE_flt = x; }
0023   inline float getEnableEEOddFilter() const { return m_en_EE_flt; }
0024 
0025   inline void setEnableEBOddPeakFinder(int x) { m_en_EB_pf = x; }
0026   inline float getEnableEBOddPeakFinder() const { return m_en_EB_pf; }
0027   inline void setEnableEEOddPeakFinder(int x) { m_en_EE_pf = x; }
0028   inline float getEnableEEOddPeakFinder() const { return m_en_EE_pf; }
0029 
0030   inline void setDisableEBEvenPeakFinder(int x) { m_dis_EB_even_pf = x; }
0031   inline float getDisableEBEvenPeakFinder() const { return m_dis_EB_even_pf; }
0032   inline void setDisableEEEvenPeakFinder(int x) { m_dis_EE_even_pf = x; }
0033   inline float getDisableEEEvenPeakFinder() const { return m_dis_EE_even_pf; }
0034 
0035   inline void setFenixEBStripOutput(int x) { m_fe_EB_strout = x; }
0036   inline float getFenixEBStripOutput() const { return m_fe_EB_strout; }
0037   inline void setFenixEEStripOutput(int x) { m_fe_EE_strout = x; }
0038   inline float getFenixEEStripOutput() const { return m_fe_EE_strout; }
0039 
0040   inline void setFenixEBStripInfobit2(int x) { m_fe_EB_strib2 = x; }
0041   inline float getFenixEBStripInfobit2() const { return m_fe_EB_strib2; }
0042   inline void setFenixEEStripInfobit2(int x) { m_fe_EE_strib2 = x; }
0043   inline float getFenixEEStripInfobit2() const { return m_fe_EE_strib2; }
0044 
0045   inline void setFenixEBTcpOutput(int x) { m_fe_EB_tcpout = x; }
0046   inline float getFenixEBTcpOutput() const { return m_fe_EB_tcpout; }
0047   inline void setFenixEBTcpInfoBit1(int x) { m_fe_EB_tcpib1 = x; }
0048   inline float getFenixEBTcpInfobit1() const { return m_fe_EB_tcpib1; }
0049 
0050   inline void setFenixEETcpOutput(int x) { m_fe_EE_tcpout = x; }
0051   inline float getFenixEETcpOutput() const { return m_fe_EE_tcpout; }
0052   inline void setFenixEETcpInfoBit1(int x) { m_fe_EE_tcpib1 = x; }
0053   inline float getFenixEETcpInfobit1() const { return m_fe_EE_tcpib1; }
0054 
0055   // redundant methods for simplification of the code
0056 
0057   inline void setFenixPar1(int x) { m_en_EB_flt = x; }
0058   inline float getFenixPar1() const { return m_en_EB_flt; }
0059   inline void setFenixPar2(int x) { m_en_EE_flt = x; }
0060   inline float getFenixPar2() const { return m_en_EE_flt; }
0061 
0062   inline void setFenixPar3(int x) { m_en_EB_pf = x; }
0063   inline float getFenixPar3() const { return m_en_EB_pf; }
0064   inline void setFenixPar4(int x) { m_en_EE_pf = x; }
0065   inline float getFenixPar4() const { return m_en_EE_pf; }
0066 
0067   inline void setFenixPar5(int x) { m_dis_EB_even_pf = x; }
0068   inline float getFenixPar5() const { return m_dis_EB_even_pf; }
0069 
0070   inline void setFenixPar6(int x) { m_dis_EE_even_pf = x; }
0071   inline float getFenixPar6() const { return m_dis_EE_even_pf; }
0072 
0073   inline void setFenixPar7(int x) { m_fe_EB_strout = x; }
0074   inline float getFenixPar7() const { return m_fe_EB_strout; }
0075   inline void setFenixPar8(int x) { m_fe_EE_strout = x; }
0076   inline float getFenixPar8() const { return m_fe_EE_strout; }
0077 
0078   inline void setFenixPar9(int x) { m_fe_EB_strib2 = x; }
0079   inline float getFenixPar9() const { return m_fe_EB_strib2; }
0080   inline void setFenixPar10(int x) { m_fe_EE_strib2 = x; }
0081   inline float getFenixPar10() const { return m_fe_EE_strib2; }
0082 
0083   inline void setFenixPar11(int x) { m_fe_EB_tcpout = x; }
0084   inline float getFenixPar11() const { return m_fe_EB_tcpout; }
0085   inline void setFenixPar12(int x) { m_fe_EB_tcpib1 = x; }
0086   inline float getFenixPar12() const { return m_fe_EB_tcpib1; }
0087 
0088   inline void setFenixPar13(int x) { m_fe_EE_tcpout = x; }
0089   inline float getFenixPar13() const { return m_fe_EE_tcpout; }
0090   inline void setFenixPar14(int x) { m_fe_EE_tcpib1 = x; }
0091   inline float getFenixPar14() const { return m_fe_EE_tcpib1; }
0092 
0093   // extra parameters
0094 
0095   inline void setFenixPar15(int x) { m_fe_par15 = x; }
0096   inline float getFenixPar15() const { return m_fe_par15; }
0097   inline void setFenixPar16(int x) { m_fe_par16 = x; }
0098   inline float getFenixPar16() const { return m_fe_par16; }
0099   inline void setFenixPar17(int x) { m_fe_par17 = x; }
0100   inline float getFenixPar17() const { return m_fe_par17; }
0101   inline void setFenixPar18(int x) { m_fe_par18 = x; }
0102   inline float getFenixPar18() const { return m_fe_par18; }
0103 
0104 private:
0105   void prepareWrite() noexcept(false) override;
0106 
0107   void writeDB(const EcalLogicID* ecid,
0108                const FEConfigOddWeightModeDat* item,
0109                FEConfigOddWeightInfo* iconf) noexcept(false);
0110 
0111   void writeArrayDB(const std::map<EcalLogicID, FEConfigOddWeightModeDat>* data,
0112                     FEConfigOddWeightInfo* iconf) noexcept(false);
0113 
0114   void fetchData(std::map<EcalLogicID, FEConfigOddWeightModeDat>* fillMap,
0115                  FEConfigOddWeightInfo* iconf) noexcept(false);
0116 
0117   // User data
0118 
0119   int m_en_EB_flt;
0120   int m_en_EE_flt;
0121   int m_en_EB_pf;
0122   int m_en_EE_pf;
0123   int m_dis_EB_even_pf;
0124   int m_dis_EE_even_pf;
0125   int m_fe_EB_strout;
0126   int m_fe_EE_strout;
0127   int m_fe_EB_strib2;
0128   int m_fe_EE_strib2;
0129   int m_fe_EB_tcpout;
0130   int m_fe_EB_tcpib1;
0131   int m_fe_EE_tcpout;
0132   int m_fe_EE_tcpib1;
0133   int m_fe_par15;
0134   int m_fe_par16;
0135   int m_fe_par17;
0136   int m_fe_par18;
0137 };
0138 
0139 #endif